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

Graphite fonts don't show up #317

Closed
classilla opened this issue Feb 12, 2016 · 10 comments
Closed

Graphite fonts don't show up #317

classilla opened this issue Feb 12, 2016 · 10 comments
Assignees

Comments

@classilla
Copy link
Owner

It always falls back on harfbuzz rendering. We should also verify the collision fixing at the bottom of the page if we get Fx45 up.

http://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_fontdemo

@classilla
Copy link
Owner Author

It does not work on 45 with or without graphite enabled either. Not a launch blocker but we should fix the underlying security issue and then see what's gone wrong.

@classilla classilla self-assigned this Jul 26, 2016
@classilla
Copy link
Owner Author

If we do this, we should just update to whatever's in 52 first. There are many upstream changes.

@classilla
Copy link
Owner Author

The security aspects of Graphite are now becoming a concern. See https://bugzilla.mozilla.org/show_bug.cgi?id=1331915 . Unless there's an easy upstream update, this might become wontfix.

classilla added a commit that referenced this issue Oct 6, 2017
@classilla
Copy link
Owner Author

Even with all the updates, they still don't appear. OTS does not filter the font and calls them valid. With debugging in Graphite2 itself, we get this:

Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2
Face::Table::Table 53696c66
Face::Table::Table 68656164
::CheckTable failed
Face::Table::Table 68686561
Face::Table::Table 686d7478
Face::Table::Table 676c7966
Face::Table::Table 6c6f6361
loading
!head
!head
error#2

@classilla
Copy link
Owner Author

Commenting out the call to CheckTable enables the font to load!

@classilla
Copy link
Owner Author

It's not correctly validating the head table.

@classilla
Copy link
Owner Author

It looks like a padding problem. The size of the loaded table is two bytes shorter than Sfnt::FontHeader. All the other fields check out.

Face::Table::Table 53696c66
Face::Table::Table 68656164
CheckTable::head 1 54 56
CheckTable::head 2 1
CheckTable::head 2 1
CheckTable::head 2 1
CheckTable::head 2 1
CheckTable::head 2 0
::CheckTable failed

@classilla
Copy link
Owner Author

(iow, the struct is two bytes longer than what is actually in the table)

@classilla
Copy link
Owner Author

Since the glyph data format field also matches, the extra two bytes must be at the end. This is probably an artifact of alignment, so I'm going to change the table function that allocates sizes to round up to the nearest 32-bit word.

@classilla
Copy link
Owner Author

Tested working on the Graphite Demo page.

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

1 participant