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 render anything with this font #2675

Closed
olivierberten opened this issue Sep 9, 2020 · 13 comments
Closed

hb-view doesn't render anything with this font #2675

olivierberten opened this issue Sep 9, 2020 · 13 comments
Assignees

Comments

@olivierberten
Copy link

it seems to work anywhere else (hb-shape included) but hb-view renders an empty image
SN Kh SONY Moul.ttf.zip
source

@khaledhosny
Copy link
Collaborator

khaledhosny commented Sep 10, 2020

The font has COLR table that seems to be breaking something, if I drop that table things get fixed.

I though the table is bogus, but it seems that hb-view will not show anything for glyphs not covered by COLR, not just in this font which makes no sense. I wonder where is this breaking, pango-view seems fine, so I guess it is not Cairo or FreeType.

@behdad
Copy link
Member

behdad commented Sep 10, 2020

Is definitely Cairo or FreeType issue since hb-view by itself doesn't do any magic. It might be that FT_HAS_COLOR is broken for this font.

What happens if you pass --background=01?

@behdad
Copy link
Member

behdad commented Sep 10, 2020

When reporting bugs please also specify sample text to reproduce the bug. Thanks.

@behdad
Copy link
Member

behdad commented Sep 10, 2020

What happens if you pass --background=01?

Doesn't do anything.

I can reproduce. Will look into later.

@khaledhosny
Copy link
Collaborator

khaledhosny commented Sep 10, 2020

The issue happens with other fonts too, for glyphs not covered by COLR table (e.g. a م in Amiri Quran Colored).

@behdad
Copy link
Member

behdad commented Sep 10, 2020

So, the color glyphs work?

@khaledhosny
Copy link
Collaborator

Yes.

@behdad behdad self-assigned this Sep 20, 2020
@simoncozens
Copy link
Collaborator

Removing the 0 && from this line

if (0 && cairo_surface_get_type (cairo_get_target (cr)) == CAIRO_SURFACE_TYPE_IMAGE) {

makes it display. That might not be the fix because I presume it's if'd out for a reason. But it should be a good place to start looking.

@behdad
Copy link
Member

behdad commented Dec 22, 2020

makes it display. That might not be the fix because I presume it's if'd out for a reason. But it should be a good place to start looking.

Basically what that suggests is that it's a bug in cairo's color-glyph processing. Which is what I knew anyway since we don't do any of that.

@matthiasclasen
Copy link
Collaborator

Here is what I see with that font:

Screenshot from 2021-07-31 08-37-08

It is not that nothing is there, it is that you get white-on-white text.

@matthiasclasen
Copy link
Collaborator

@behdad
Copy link
Member

behdad commented Aug 1, 2021

Thanks Matthias.

@behdad behdad closed this as completed Aug 1, 2021
jollaitbot pushed a commit to sailfishos-mirror/cairo that referenced this issue Aug 14, 2021
The intention here is: "if show_text_glyphs is unsupported,
try show_gyphs". We need to make sure to set the status to
unsupported before checking it, otherwise we end up looking
at the status that was set by composite_color_glyphs if
show_text_glyphs is NULL.

This showed up in harfbuzz/harfbuzz#2675
@behdad
Copy link
Member

behdad commented Feb 11, 2022

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

5 participants