Skip to content

Commit

Permalink
fixed(display): In very rare cases, Chrome could cause text to be dis…
Browse files Browse the repository at this point in the history
…played offset.

improved glyph creation performance

Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Oct 25, 2023
1 parent 767a8dd commit 9ddbdcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/display/src/displays/webgl/GlyphManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GlyphManager {
if (!fonts[styleId]) {
const size = 96 * scale;
const canvas = createCanvas(size, size);
const ctx = canvas.getContext('2d');
const ctx = canvas.getContext('2d', {willReadFrequently: true});

ctx.textBaseline = 'bottom';
const letterHeightBottom = determineFontHeight(ctx, style, 'gM').height;
Expand Down

0 comments on commit 9ddbdcd

Please sign in to comment.