]> git.cworth.org Git - lmno.games/commit - scribe/scribe.jsx
Don't waste space for glyphs that are not full height.
authorCarl Worth <cworth@cworth.org>
Sat, 20 Jun 2020 17:48:26 +0000 (10:48 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 20 Jun 2020 17:48:26 +0000 (10:48 -0700)
commit89b7f6b2d8cf6f237310dad0a8f1d796fb98862a
tree57e622a384f576ccf037a419fef42b6319f22cc5
parent262b36e22be80ba638872f837332f79aa8e8a8c6
Don't waste space for glyphs that are not full height.

For "Single" through" Squat-T" only two rows of dots are needed to
display the full glyph, so it's wasteful to have a full-size glyph. We
fix this by dynamically computing a correct viewBox for the glyph's
SVG given the dots that are present, and then letting the "glyph"
class styling automatically determine a height based on its children,
rather than explicitly setting it to the full height, assuming a
square.
scribe/scribe.css
scribe/scribe.jsx