How to determine if font have glyph for character?
Is this even possible?
var a = glyph_exist('0x00A1')
console.log(a)
true or false
Fontkit appears to support this use case:
Fontkit is an advanced font engine for Node and the browser, used by PDFKit. It supports many font formats, advanced glyph substitution and layout features, glyph path extraction, color emoji glyphs, font subsetting, and more.
[...]
font.hasGlyphForCodePoint(codePoint)
Returns whether there is glyph in the font for the given unicode code point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With