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

[src/core/fonts.js] Improve the validateOS2Table function and other code #11823

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Please refer to the individual commit messages for additional information.

The intention behind these changes is to improve some (fairly) old parts of the font parsing code.

…alls with `Stream.skip(...)` instead

There's a handful of cases in the code where the intention is simply to advance the `Stream` position, but rather than only doing that the code instead fetches the bytes in question (and without using the result for anything).
…ls with `Stream.skip(2)` instead

There's a handful of cases in the code where the intention is simply to advance the `Stream` position, but rather than only doing that the code instead fetches/computes a Uint16 value (and without using the result for anything).
Rather than creating a new `Stream` just to validate the OS/2 TrueType table, it's simpler/better to just pass in a reference to the font data and use that instead (similar to other TrueType helper functions).
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/f29d0b00a7059e1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/f29d0b00a7059e1/output.txt

Total script time: 19.72 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/f29d0b00a7059e1/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit a13db5d into mozilla:master Apr 20, 2020
@timvandermeij
Copy link
Contributor

Nice find!

@Snuffleupagus Snuffleupagus deleted the validateOS2Table-improvement branch April 20, 2020 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants