Skip to content

Commit e76fa29

Browse files
committed
Add setter for some FontFaceObject properties
1 parent 0a2680b commit e76fa29

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/display/font_loader.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,15 @@ class FontFaceObject {
457457
return this.#fontData.disableFontFace ?? false;
458458
}
459459

460+
set disableFontFace(value) {
461+
Object.defineProperty(this, "disableFontFace", {
462+
value: !!value,
463+
writable: false,
464+
enumerable: true,
465+
configurable: true,
466+
});
467+
}
468+
460469
get fontExtraProperties() {
461470
return this.#fontData.fontExtraProperties ?? false;
462471
}
@@ -501,6 +510,15 @@ class FontFaceObject {
501510
return this.#fontData.bbox;
502511
}
503512

513+
set bbox(bbox) {
514+
Object.defineProperty(this, "bbox", {
515+
value: bbox,
516+
writable: false,
517+
enumerable: true,
518+
configurable: true,
519+
});
520+
}
521+
504522
get fontMatrix() {
505523
return this.#fontData.fontMatrix;
506524
}

test/pdfs/issue20426.pdf.link

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/user-attachments/files/23383534/test.1.pdf

test/test_manifest.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,6 +1948,14 @@
19481948
"type": "eq",
19491949
"forms": true
19501950
},
1951+
{
1952+
"id": "issue20426",
1953+
"file": "pdfs/issue20426.pdf",
1954+
"md5": "b9a753df595f1dd30505a67c96373dd8",
1955+
"link": true,
1956+
"rounds": 1,
1957+
"type": "eq"
1958+
},
19511959
{
19521960
"id": "issue13845",
19531961
"file": "pdfs/issue13845.pdf",

0 commit comments

Comments
 (0)