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

[face] Expose cmap mapping #3973

Closed
behdad opened this issue Dec 24, 2022 · 3 comments
Closed

[face] Expose cmap mapping #3973

behdad opened this issue Dec 24, 2022 · 3 comments
Assignees

Comments

@behdad
Copy link
Member

behdad commented Dec 24, 2022

We have hb_face_collect_unicodes, we should expose the mapping counterpart the returns both a set and a map so people can walk the set and map to glyph.

@matthiasclasen
Copy link
Collaborator

I would expect something like

hb_bool_t
hb_face_get_glyph (hb_face_t      *face,
                   hb_codepoint_t  unicode,
                   hb_codepoint_t  variation_selector,
                   hb_codepoint_t *glyph)

?

@behdad
Copy link
Member Author

behdad commented Jan 4, 2023

hb_bool_t
hb_face_get_glyph (hb_face_t *face,
hb_codepoint_t unicode,
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph)

Given that one can just create a font and get that already, I'm not very keen on adding it. Exposing cmap is for performance reasons to avoid having to call get_glyph on every glyph. I don't remember where it was needed that I filed this though.

@behdad
Copy link
Member Author

behdad commented Jan 4, 2023

both a set and a map so people can walk the set and map to glyph.

I added iterator to hb_map_t now. So the hb_set_t to such new API should be made optional.

@behdad behdad closed this as completed in c54debc Jan 5, 2023
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

3 participants