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

Invalid component glyph flags in the Ubuntu fonts #5551

Open
IvanUkhov opened this issue Nov 15, 2022 · 1 comment
Open

Invalid component glyph flags in the Ubuntu fonts #5551

IvanUkhov opened this issue Nov 15, 2022 · 1 comment

Comments

@IvanUkhov
Copy link

IvanUkhov commented Nov 15, 2022

Describe the bug
When parsing the Glyph Data of the fonts in the ufl folder, there are glyphs where the Component Glyph Flags are set to 0x236. However, according to the specification, the bits given by 0xE010 are reserved, which making bit 4 contain an invalid value.

To Reproduce
Check the fourth bit in the Component Glyph Flags. For instance, using fonttools:

from fontTools.ttLib import TTFont

font = TTFont("ufl/ubuntucondensed/UbuntuCondensed-Regular.ttf")
hex(font["glyf"]["colon"].components[0].flags)
# 0x214

Here one should note that it is not 0x236 but 0x214 because of this “cleaning” conjunction:

_g_l_y_f.py#L1419-L1421

When printing the original value there, one gets 0x236.

Expected behavior
Bit 4 should not be set.

@fitojb
Copy link
Contributor

fitojb commented Nov 26, 2022

cc @daltonmaag @canonical

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

No branches or pull requests

2 participants