-
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
Send disableFontFace
and fontExtraProperties
as part of the exported font-data
#19548
Send disableFontFace
and fontExtraProperties
as part of the exported font-data
#19548
Conversation
…ted font-data These options are needed in the `FontFaceObject` class, and indirectly in `FontLoader` as well, which means that we currently need to pass them around manually in the API. Given that the options are (obviously) available on the worker-thread, it's very easy to just provide them when creating `Font`-instances and then send them as part of the exported font-data. This way we're able to simplify the code (primarily on the main-thread), and note that `Font`-instances even had a `disableFontFace`-field already (but it wasn't properly initialized).
Remove the `Catalog.prototype.fontFallback` method, and move its code into `PDFDocument.prototype.fontFallback` instead, to reduce the indirection a little bit. Pass the `evaluatorOptions` directly to the `TranslatedFont.prototype.fallback` method, since nothing else in the `TranslatedFont`-class needs it now.
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/97a89a63a0eb1b3/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/371c0a0cb6695b8/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/97a89a63a0eb1b3/output.txt Total script time: 2.37 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/371c0a0cb6695b8/output.txt Total script time: 7.67 mins
|
disableFontFace
and fontExtraProperties
as part of the exported font-data
/botio browsertest |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c5ea81135909ee9/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/4724952bac16014/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c5ea81135909ee9/output.txt Total script time: 16.89 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/4724952bac16014/output.txt Total script time: 30.55 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
Send
disableFontFace
andfontExtraProperties
as part of the exported font-dataThese options are needed in the
FontFaceObject
class, and indirectly inFontLoader
as well, which means that we currently need to pass them around manually in the API.Given that the options are (obviously) available on the worker-thread, it's very easy to just provide them when creating
Font
-instances and then send them as part of the exported font-data. This way we're able to simplify the code (primarily on the main-thread), and note thatFont
-instances even had adisableFontFace
-field already (but it wasn't properly initialized).Improve the "FontFallback" handling on the worker-thread
Remove the
Catalog.prototype.fontFallback
method, and move its code intoPDFDocument.prototype.fontFallback
instead, to reduce the indirection a little bit.Pass the
evaluatorOptions
directly to theTranslatedFont.prototype.fallback
method, since nothing else in theTranslatedFont
-class needs it now.