This functions maps the text grapheme (a user-perceived character like a
or a
multi-character emoji like ❤️
) before trying to find its corresponding glyph
in a glyphs
map. It would be typically used to call grapheme.toLowerCase()
in fonts which have glyphs defined for lower-case characters only.
An amount of pixels from the baseline (included) to the top-most pixel of font's glyphs.
An amount of pixels from the baseline (excluded) to the bottom-most pixel of font's glyphs.
A map which contains the glyphs for specified graphemes (keys of the map).
Grapheme is a user-perceived character like a
or a multi-character emoji
like ❤️
. Before retrieving a glyph from this map, a grapheme is normalized
with use of mapGrapheme
function. Typically, it would be useful when you
want to specify same glyphs for both upper-case and lower-case characters,
so you are able to define lower-case ones only and then implement
mapGrapheme
as grapheme.toLowerCase()
.
An amount of pixels between the bottom-most pixel of the previous line (excluded) and the top-most pixel of the next line (excluded).
A free to use (CC-0) font created by saint11 and distributed on https://saint11.org/blog/fonts/
Note: only a subset of characters is implemented here: