Skip to content

Commit

Permalink
GH-80 fix issue with default width not being set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Corless committed Mar 19, 2021
1 parent f793330 commit cca5c1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public FontFile deriveFont(float defaultWidth, float[] widths) {
ZFontType2 font = (ZFontType2) deriveFont(size);
if (widths != null) {
font.widths = widths;
font.defaultWidth = defaultWidth;
}
font.defaultWidth = defaultWidth * 0.001f;
return font;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ protected ZSimpleFont(ZSimpleFont font) {
this.firstCh = font.firstCh;
this.ascent = font.ascent;
this.descent = font.descent;
this.defaultWidth = font.defaultWidth;
this.bbox = font.bbox;
this.widths = font.widths;
this.cMap = font.cMap;
Expand Down

0 comments on commit cca5c1b

Please sign in to comment.