Skip to content

Commit 7aa7793

Browse files
authored
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 #31289 Partially reverts matrix-org/matrix-react-sdk#3008 * fix quotes * fix tests * fix quotes * appease prettier * fix snapshot tests, hopefully * more snapshots
1 parent f282be0 commit 7aa7793

25 files changed

Lines changed: 22 additions & 29 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"@babel/runtime": "^7.12.5",
8585
"@element-hq/element-web-module-api": "1.5.0",
8686
"@element-hq/web-shared-components": "link:packages/shared-components",
87-
"@fontsource/inconsolata": "^5",
87+
"@fontsource/fira-code": "^5",
8888
"@fontsource/inter": "^5",
8989
"@formatjs/intl-segmenter": "^11.5.7",
9090
"@matrix-org/analytics-events": "^0.30.0",

playwright/e2e/audio-player/audio-player.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test.describe("Audio player", { tag: ["@no-firefox", "@no-webkit"] }, () => {
4949
/**
5050
* Take snapshots of mx_EventTile_last on each layout, outputting log for reference/debugging.
5151
* @param detail The snapshot name. Used for outputting logs too.
52-
* @param monospace This changes the font used to render the UI from a default one to Inconsolata. Set to false by default.
52+
* @param monospace This changes the font used to render the UI from a default one to Fira Code. Set to false by default.
5353
*/
5454
const takeSnapshots = async (page: Page, app: ElementAppPage, detail: string, monospace = false) => {
5555
// Check that the audio player is rendered and its button becomes visible
@@ -65,15 +65,15 @@ test.describe("Audio player", { tag: ["@no-firefox", "@no-webkit"] }, () => {
6565

6666
if (monospace) {
6767
// Assert that the monospace timer is visible
68-
await expect(locator.locator("[role='timer']")).toHaveCSS("font-family", "Inconsolata");
68+
await expect(locator.locator("[role='timer']")).toHaveCSS("font-family", '"Fira Code"');
6969
}
7070
};
7171

7272
if (monospace) {
7373
// Enable system font and monospace setting
7474
await app.settings.setValue("useBundledEmojiFont", null, SettingLevel.DEVICE, false);
7575
await app.settings.setValue("useSystemFont", null, SettingLevel.DEVICE, true);
76-
await app.settings.setValue("systemFont", null, SettingLevel.DEVICE, "Inconsolata");
76+
await app.settings.setValue("systemFont", null, SettingLevel.DEVICE, "Fira Code");
7777
}
7878

7979
// Check the status of the seek bar

playwright/e2e/right-panel/right-panel.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ test.describe("RightPanel", () => {
164164
css: `
165165
/* Use monospace font for consistent mask width */
166166
.mx_UserInfo_profile_mxid {
167-
font-family: Inconsolata !important;
167+
font-family: "Fira Code" !important;
168168
}
169169
`,
170170
});

playwright/e2e/user-view/user-view.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test.describe("UserView", () => {
2424
css: `
2525
/* Use monospace font for consistent mask width */
2626
.mx_UserInfo_profile_mxid {
27-
font-family: Inconsolata !important;
27+
font-family: "Fira Code" !important;
2828
}
2929
`,
3030
});

playwright/element-web-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const expect = baseExpect.extend<Expectations>({
144144
}
145145
/* Use monospace font for timestamp for consistent mask width */
146146
.mx_MessageTimestamp {
147-
font-family: Inconsolata !important;
147+
font-family: "Fira Code" !important;
148148
}
149149
`;
150150

Loading
Loading
Loading
-7.82 KB
Loading
-821 Bytes
Loading

0 commit comments

Comments
 (0)