mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Remove the unused glyphNameMap
parameter from Type2Compiled
As part of the changes in PR 4259, which landed over ten years ago, the `glyphNameMap` property on `Font`-instances was removed. The reason that this didn't cause any bugs is that we always fallback on `getGlyphsUnicode`, and when using that data we also rely on `StandardEncoding`, hence we should just remove the unused parameter from the `Type2Compiled` constructor.
This commit is contained in:
parent
4547f230ba
commit
aba6369638
1 changed files with 3 additions and 3 deletions
|
@ -870,14 +870,14 @@ class TrueTypeCompiled extends CompiledFont {
|
|||
}
|
||||
|
||||
class Type2Compiled extends CompiledFont {
|
||||
constructor(cffInfo, cmap, fontMatrix, glyphNameMap) {
|
||||
constructor(cffInfo, cmap, fontMatrix) {
|
||||
super(fontMatrix || [0.001, 0, 0, 0.001, 0, 0]);
|
||||
|
||||
this.glyphs = cffInfo.glyphs;
|
||||
this.gsubrs = cffInfo.gsubrs || [];
|
||||
this.subrs = cffInfo.subrs || [];
|
||||
this.cmap = cmap;
|
||||
this.glyphNameMap = glyphNameMap || getGlyphsUnicode();
|
||||
this.glyphNameMap = getGlyphsUnicode();
|
||||
|
||||
this.gsubrsBias = getSubroutineBias(this.gsubrs);
|
||||
this.subrsBias = getSubroutineBias(this.subrs);
|
||||
|
@ -931,7 +931,7 @@ class FontRendererFactory {
|
|||
fontMatrix
|
||||
);
|
||||
}
|
||||
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
|
||||
return new Type2Compiled(cff, cmap, font.fontMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue