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

Fonts with mixed normal and colored glyphs are not working properly with fc/core text backend #17

Open
kchibisov opened this issue Nov 12, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@kchibisov
Copy link
Member

We fail to set proper size metrics for not colored glyphs in colored fonts such as https://www.babelstone.co.uk/Fonts/Shapes.html thus all non colored characters fail to redraw.

@chrisduerr
Copy link
Member

Could you go into a bit more detail here? Are we talking about the response from the metrics function being incorrect? That should just call out to full_metrics, right? Which doesn't have special handling for colored glyphs as far as I can see.

The only difference we have in metrics for colored glyphs would be in get_rendered_glyph, which affects only the glyph itself. So chances are you mean that here if the face itself is colored, this path is taken for every single glyph even if the individual glyph is not colored? Thus performing bitmap scaling.

@kchibisov kchibisov added the bug Something isn't working label Nov 12, 2020
@kchibisov
Copy link
Member Author

No, the problem is not metrics but setting sizes for the font, and we do that differently for colored glyphs and normal glyphs, however we make decision about colored glyphs on a font level, and not per glyph basis.

It basically breaks somewhere here

freetype_sys::FT_Select_Size(ft_face.raw_mut(), 0);

in pair with not calling
face.ft_face.set_char_size(to_freetype_26_6(pixelsize), 0, 0, 0)?;
. I haven't looked much into it all, since not in the mood to try random freetype things to make it work...

@chrisduerr
Copy link
Member

This also affects macOS: alacritty/alacritty#4415.

@chrisduerr chrisduerr changed the title Fonts with mixed normal and colored glyphs are not working properly with fc backend Fonts with mixed normal and colored glyphs are not working properly with fc/core text backend Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants