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

hb-view doesn't auto compute font extents for CBDT color font #3409

Closed
anthrotype opened this issue Feb 2, 2022 · 3 comments
Closed

hb-view doesn't auto compute font extents for CBDT color font #3409

anthrotype opened this issue Feb 2, 2022 · 3 comments

Comments

@anthrotype
Copy link
Member

If I try to render a CBDT/CBLC font (e.g. NotoColorEmoji.ttf) with hb-view, the resulting PNG is always cropped. I need to add very large --margin in order to display something (but then the image is not centered). Manually setting --font-extents doesn't help either, or I can't figure out values that make it look ok.

This is the command I run:

$ hb-view -o /tmp/AD.png -u 1F1E6,1F1E9 Font.ttf

I get this (which is only a small portion of the actual color glyph):

image

The test font is attached in test-cbdt-font.zip along with a static html file that should display the correct image in Google Chrome - which looks like this:

Screenshot 2022-02-02 at 12 00 35

Am I doing something wrong?

@anthrotype
Copy link
Member Author

forgot to say, I'm running hb-view (compiled from source from latest HEAD) on macOS 12.1

@behdad
Copy link
Member

behdad commented Feb 2, 2022

It's a problem hb-ft has with bitmap fonts. It's known issue. I think it works if you pass --font-funcs=ot. Probably duplicate of #489

@anthrotype
Copy link
Member Author

thanks, using --font-funcs=ot works for me!

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