-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Take the W
array into account when computing the hash, in PartialEvaluator.preEvaluateFont
, for composite fonts (issue 13343)
#13347
Conversation
145fd18
to
6bdd561
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/9059083e1e7d3f1/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/32014e1861f2ed5/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/9059083e1e7d3f1/output.txt Total script time: 26.11 mins
Image differences available at: http://54.67.70.0:8877/9059083e1e7d3f1/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/32014e1861f2ed5/output.txt Total script time: 29.35 mins
Image differences available at: http://3.101.106.178:8877/32014e1861f2ed5/reftest-analyzer.html#web=eq.log |
…valuator.preEvaluateFont`, for composite fonts (issue 13343) Without this some *composite* fonts may incorrectly end up with matching `hash`es, thus breaking rendering since we'll not actually try to load/parse some of the fonts. *Please note:* Given that the document, in the referenced issue, doesn't embed *any* of its fonts there's no guarantee that it renders correctly in all configurations even with this patch.
…n `PartialEvaluator.preEvaluateFont` To hopefully help prevent any future bugs, make sure that composite/non-composite fonts cannot accidentally get matching `hash`es. Given the differences between those font types, that's very unlikely to be useful or even correct in general.
…or.preEvaluateFont` *Please note:* While I don't have a document that this patches fixes, the current code is however not entirely correct as far as I can tell. Looking at how the `Widths` array is parsed in `PartialEvaluator.extractWidths`, it's clear that the implementation in `PartialEvaluator.preEvaluateFont` is a bit too simplistic. In particular, by only wrapping the data into a TypedArray, there's no attempt to handle *indirect* objects which could potentially lead to colliding `hash`es being computed.
6bdd561
to
8a1cb82
Compare
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/16bde13376f17c9/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/36279e8d9aedf4a/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/36279e8d9aedf4a/output.txt Total script time: 26.06 mins
Image differences available at: http://54.67.70.0:8877/36279e8d9aedf4a/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/16bde13376f17c9/output.txt Total script time: 29.09 mins
Image differences available at: http://3.101.106.178:8877/16bde13376f17c9/reftest-analyzer.html#web=eq.log |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/22621a91e1755cb/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/22621a91e1755cb/output.txt Total script time: 4.49 mins Published |
Thank you for improving this! /botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/8766cb37ecc72f0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 1 Live output at: http://3.101.106.178:8877/e67b0512268bd15/output.txt |
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/e67b0512268bd15/output.txt Total script time: 26.31 mins
|
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/8766cb37ecc72f0/output.txt Total script time: 60.00 mins
|
/botio-linux makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/390d82b03fe90ff/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/390d82b03fe90ff/output.txt Total script time: 22.94 mins
|
Without this some composite fonts may incorrectly end up with matching
hash
es, thus breaking rendering since we'll not actually try to load/parse some of the fonts.Please note: Given that the document, in the referenced issue, doesn't embed any of its fonts there's no guarantee that it renders correctly in all configurations even with this patch.
Fixes #13343 (to the extent that doing so is possible, since the document uses non-embedded and non-standard fonts).