Skip to content

Commit f1e1973

Browse files
committed
Remove the unused bbox setter in the FontFaceObject class (PR 20427 follow-up)
The commit message for the patch in PR 20427 is pretty non-descriptive, being only a single line, however there's a bit more context in #20427 (comment) but unfortunately the details there don't really make sense. Note that the PR only changed main-thread code, but all the links are to worker-thread code!? The `FontFaceObject` class is only used on the main-thread, and when encountering a broken font we fallback to the built-in font renderer; see https://github.com/mozilla/pdf.js/blob/820b70eb25b1c6bf74f916e002d11afc49e929cf/src/display/font_loader.js#L135-L143 Hence the `FontFaceObject` class *only* needs a way to set the `disableFontFace` property, however nowhere on the main-thread do we ever update the `bbox` of a font.
1 parent 1192e5e commit f1e1973

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/display/font_loader.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,6 @@ class FontFaceObject {
507507
return this.#fontData.bbox;
508508
}
509509

510-
set bbox(bbox) {
511-
shadow(this, "bbox", bbox);
512-
}
513-
514510
get fontMatrix() {
515511
return this.#fontData.fontMatrix;
516512
}

0 commit comments

Comments
 (0)