Skip to content

Commit

Permalink
Merge pull request #19263 from Snuffleupagus/Type2Compiled-fix-glyphN…
Browse files Browse the repository at this point in the history
…ameMap

Remove the unused `glyphNameMap` parameter from `Type2Compiled`
  • Loading branch information
timvandermeij authored Dec 29, 2024
2 parents b4abfec + aba6369 commit 5b94c86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/font_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -931,7 +931,7 @@ class FontRendererFactory {
fontMatrix
);
}
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
return new Type2Compiled(cff, cmap, font.fontMatrix);
}
}

Expand Down

0 comments on commit 5b94c86

Please sign in to comment.