diff --git a/src/display/text_layer.js b/src/display/text_layer.js index 2f72b712ef71f5..11fb7200045639 100644 --- a/src/display/text_layer.js +++ b/src/display/text_layer.js @@ -300,9 +300,16 @@ class TextLayer { angle += Math.PI / 2; } - const fontFamily = + let fontFamily = (this.#fontInspectorEnabled && style.fontSubstitution) || style.fontFamily; + + // Workaround for bug 1922063. + if (fontFamily === "sans-serif") { + fontFamily = "Calibri, sans serif"; + } else if (fontFamily === "monospace") { + fontFamily = "Lucida Console, monospace"; + } const fontHeight = Math.hypot(tx[2], tx[3]); const fontAscent = fontHeight * TextLayer.#getAscent(fontFamily, this.#lang);