Return to using Fira Code as the default monospace font (#31302)
* Return to using Fira Code as the default monospace font. because Inconsolata lacks Box Drawings and Geometric Shapes glyphs. Fixes https://github.com/element-hq/element-web/issues/31289 Partially reverts https://github.com/matrix-org/matrix-react-sdk/pull/3008 * fix quotes * fix tests * fix quotes * appease prettier * fix snapshot tests, hopefully * more snapshots
This commit is contained in:
@@ -13,14 +13,14 @@ import customCSS from "!!raw-loader!./exportCustomCSS.css";
|
||||
const cssSelectorTextClassesRegex = /\.[\w-]+/g;
|
||||
|
||||
function mutateCssText(css: string): string {
|
||||
// replace used fonts so that we don't have to bundle Inter & Inconsalata
|
||||
// replace used fonts so that we don't have to bundle Inter & Fira Code
|
||||
const sansFont = `-apple-system, BlinkMacSystemFont, avenir next,
|
||||
avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif`;
|
||||
return css
|
||||
.replace(/font-family: ?(Inter|'Inter'|"Inter")/g, `font-family: ${sansFont}`)
|
||||
.replace(/--cpd-font-family-sans: ?(Inter|'Inter'|"Inter")/g, `--cpd-font-family-sans: ${sansFont}`)
|
||||
.replace(
|
||||
/font-family: ?Inconsolata/g,
|
||||
/font-family: ?Fira Code/g,
|
||||
"font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user