mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
A couple of small scripting/XFA-related tweaks in the worker-code
- Use `PDFManager.ensureDoc`, rather than `PDFManager.ensure`, in a couple of spots in the code. If there exists a short-hand format, we should obviously use it whenever possible. - Fix a unit-test helper, to account for the previous changes. (Also, converts a function to be `async` instead.) - Add one more exists-check in `PDFDocument.loadXfaFonts`, which I missed to suggest in PR 13146, to prevent any possible errors if the method is ever called in a situation where it shouldn't be. Also, print a warning if the actual font-loading fails since that could help future debugging. (Finally, reduce overall indentation in the loop.) - Slightly unrelated, but make a small tweak of a comment in `src/core/fonts.js` to reduce possible confusion.
This commit is contained in:
parent
ac3fa1e3d7
commit
f560fe6875
4 changed files with 43 additions and 35 deletions
|
@ -2966,7 +2966,7 @@ var Font = (function FontClosure() {
|
|||
}
|
||||
|
||||
// When `cssFontInfo` is set, the font is used to render text in the HTML
|
||||
// view (e.g. with Xfa) so nothing must be moved in the private area use.
|
||||
// view (e.g. with Xfa) so nothing must be moved in the private use area.
|
||||
if (!properties.cssFontInfo) {
|
||||
// Converting glyphs and ids into font's cmap table
|
||||
var newMapping = adjustMapping(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue