[api-minor] Re-factor the disableFontFace
fallback value, and skip initializing factories with useWorkerFetch
set
#13525
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[api-minor] Set the
disableFontFace
fallback value directly in the APIAt this point in time, the
apiCompatibilityParams
is essentially unused with the sole exception of thedisableFontFace
handling for Node.js environments.Given that
isNodeJS
is a constant now (originally it was a function), we can simply set the correct fallback value fordisableFontFace
directly in the API and clean-up the code a bit here.Don't initialize
CMapReaderFactory
/StandardFontDataFactory
when theuseWorkerFetch
API option is setGiven that there's no fallback on the worker-thread, it shouldn't be necessary to initialize
CMapReaderFactory
/StandardFontDataFactory
whenuseWorkerFetch = true
is set.Slightly unrelated, but this patch also ensures that the
useSystemFonts
default value only does theisNodeJS
check in builds where that's actually necessary.