opentype.js
opentype.js copied to clipboard
Support searching or filtering by glyph name
You can quickly find the desired glyph within a font by searching or filtering through its glyph names.
[...font.glyphs].filter(i=>i.name.includes('close')).map(i=>i.index)
So what is the issue or question? Do you want a wrapper function for comfortability?
So what is the issue or question? Do you want a wrapper function for comfortability?
Something like this
Oh, so you're talking about the glyph inspector demo page. Sure, that shouldn't be too hard to implement
This is a demo build by https://github.com/ahaoboy/opentype.js/tree/search, I'm not sure if there are any issues with this implementation, but this is the simplest way I can think of, and it seems to work fine.
https://opentype-js.vercel.app/docs/glyph-inspector.html