Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support searching or filtering by glyph name #663

Open
ahaoboy opened this issue Dec 25, 2023 · 4 comments
Open

Support searching or filtering by glyph name #663

ahaoboy opened this issue Dec 25, 2023 · 4 comments

Comments

@ahaoboy
Copy link

ahaoboy commented Dec 25, 2023

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)
@Connum
Copy link
Contributor

Connum commented Dec 25, 2023

So what is the issue or question? Do you want a wrapper function for comfortability?

@ahaoboy
Copy link
Author

ahaoboy commented Dec 25, 2023

So what is the issue or question? Do you want a wrapper function for comfortability?

Something like this
image

@Connum
Copy link
Contributor

Connum commented Dec 25, 2023

Oh, so you're talking about the glyph inspector demo page. Sure, that shouldn't be too hard to implement

@ahaoboy
Copy link
Author

ahaoboy commented Dec 26, 2023

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
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants