mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 04:47:21 +02:00
Compare commits
6 Commits
91175dc67d
...
efc5c3c231
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efc5c3c231 | ||
|
|
312c85bfd6 | ||
|
|
1a5c9e90dd | ||
|
|
785991a97c | ||
|
|
6b76bdac3a | ||
|
|
245d9ba925 |
@ -1769,12 +1769,16 @@ class CFFCompiler {
|
|||||||
if (isCIDFont) {
|
if (isCIDFont) {
|
||||||
// In a CID font, the charset is a mapping of CIDs not SIDs so just
|
// In a CID font, the charset is a mapping of CIDs not SIDs so just
|
||||||
// create an identity mapping.
|
// create an identity mapping.
|
||||||
|
// nLeft: Glyphs left in range (excluding first) (see the CFF specs).
|
||||||
|
// Having a wrong value for nLeft induces a print issue on MacOS (see
|
||||||
|
// https://bugzilla.mozilla.org/1961423).
|
||||||
|
const nLeft = numGlyphsLessNotDef - 1;
|
||||||
out = new Uint8Array([
|
out = new Uint8Array([
|
||||||
2, // format
|
2, // format
|
||||||
0, // first CID upper byte
|
0, // first CID upper byte
|
||||||
0, // first CID lower byte
|
0, // first CID lower byte
|
||||||
(numGlyphsLessNotDef >> 8) & 0xff,
|
(nLeft >> 8) & 0xff,
|
||||||
numGlyphsLessNotDef & 0xff,
|
nLeft & 0xff,
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
const length = 1 + numGlyphsLessNotDef * 2;
|
const length = 1 + numGlyphsLessNotDef * 2;
|
||||||
|
|||||||
@ -427,7 +427,7 @@ class Page {
|
|||||||
// available (see issue18894.pdf).
|
// available (see issue18894.pdf).
|
||||||
const localResources = streamDict?.get("Resources");
|
const localResources = streamDict?.get("Resources");
|
||||||
|
|
||||||
if (!(localResources instanceof Dict)) {
|
if (!(localResources instanceof Dict && localResources.size)) {
|
||||||
return this.resources;
|
return this.resources;
|
||||||
}
|
}
|
||||||
const objectLoader = new ObjectLoader(localResources, keys, this.xref);
|
const objectLoader = new ObjectLoader(localResources, keys, this.xref);
|
||||||
|
|||||||
@ -481,7 +481,7 @@ describe("CFFCompiler", function () {
|
|||||||
0, // cid (high)
|
0, // cid (high)
|
||||||
0, // cid (low)
|
0, // cid (low)
|
||||||
0, // nLeft (high)
|
0, // nLeft (high)
|
||||||
numGlyphs - 1, // nLeft (low)
|
numGlyphs - 2, // nLeft (low)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,10 @@
|
|||||||
font: message-box;
|
font: message-box;
|
||||||
}
|
}
|
||||||
#PDFBug {
|
#PDFBug {
|
||||||
background-color: rgb(255 255 255);
|
color-scheme: only light;
|
||||||
|
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
border: 1px solid rgb(102 102 102);
|
border: 1px solid rgb(102 102 102);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 32px;
|
top: 32px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user