Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Jan 9, 2022
1 parent 078d150 commit 9cec4e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/glyph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,15 @@ export class Glyph extends Element {
point = data.point;
}

const scale = ((point * 72.0) / (metrics.font.getResolution() * 100.0)) * metrics.scale * (options?.scale ?? 1);
const customScale = options?.scale ?? 1;
const scale = ((point * 72.0) / (metrics.font.getResolution() * 100.0)) * metrics.scale * customScale;

Glyph.renderOutline(
ctx,
metrics.outline,
scale,
x_pos + metrics.x_shift * (options?.scale ?? 1),
y_pos + metrics.y_shift * (options?.scale ?? 1)
x_pos + metrics.x_shift * customScale,
y_pos + metrics.y_shift * customScale
);
return metrics;
}
Expand Down

0 comments on commit 9cec4e7

Please sign in to comment.