Skip to content

Conversation

@ara4n
Copy link
Member

@ara4n ara4n commented Nov 23, 2025

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
Provides a different solution to #9765

because Inconsolata lacks Box Drawings and Geometric Shapes glyphs.
Fixes #31289
Partially reverts matrix-org/matrix-react-sdk#3008
@ara4n
Copy link
Member Author

ara4n commented Nov 24, 2025

(i've set a full playwright screenshot update going overnight)

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the font size increasing substantially expected?

@ara4n
Copy link
Member Author

ara4n commented Nov 24, 2025

Is the font size increasing substantially expected?

yes, pretty much; unintuitively there's no real guarantee that two fonts have similar physical sizing at the same point size.

That said, I can't quite decide whether this is a feature or a bug - i.e. are we just used to Inconsolata being smaller.

I agree it jars a bit (and the reason I moved away from Fira in 2019 was because it was a bit ugly due to the size and the @ symbols); I'll experiment with some alternatives.

In other news, just how flakey should the playwright snapshot tests be? All sorts of unrelated screens claim to have changed due to this.

@ara4n
Copy link
Member Author

ara4n commented Nov 24, 2025

ftr, I think the choice of monospace fonts on Google Fonts with suitable licenses and fuller unicode support here are:

  • Google Sans Code
  • Fira Code
  • Cascadia Code
  • IBM Plex Mono
  • JetBrains Mono

@t3chguy
Copy link
Member

t3chguy commented Nov 24, 2025

In other news, just how flakey should the playwright snapshot tests be? All sorts of unrelated screens claim to have changed due to this.

They are mostly stable, some known issues were recently fixed around map rendering, some others may still lurk.

https://e2e-31302--matrix-react-sdk.netlify.app/#?testId=8dfc0d81b54fac499770-4911a8c051239e1a3ae6&q=s:failed & https://e2e-31302--matrix-react-sdk.netlify.app/#?testId=a5a7240da5001bef4375-5678fb9e8a8d87cadd6d&q=s:failed both look to be related to the effective monospace font size change

@ara4n
Copy link
Member Author

ara4n commented Nov 24, 2025

So in terms of choices:

Inconsolata:
inconsolata

Fira Code:
fira code

Google Sans Code:
google sans code

Cascadia Code:
cascadia code

Jetbrains Mono:
jetbrains mono

Honestly, they're all pretty similar... other than Inconsolata which is more condensed than the rest. So I vote we go with Fira Code (which was commissioned by Mozilla, as opposed to the others which come from Google/MSFT/Jetbrains), and if necessary bump the font size down by 1 point for multiline code blocks?

ftr, switching fonts around here is a matter of:

grep -rl 'fira-code' package.json res src playwright test | xargs perl -pi -e's/fira-code/inconsolata/g'
grep -rl 'Fira Code' res src playwright test | xargs perl -pi -e's/Fira Code/Inconsolata/g'

@ara4n ara4n added this pull request to the merge queue Nov 24, 2025
Merged via the queue into develop with commit 7aa7793 Nov 24, 2025
36 checks passed
@ara4n
Copy link
Member Author

ara4n commented Nov 28, 2025

Is the font size increasing substantially expected?

this was pissing me off, so i've tried #31364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monospace font is missing important characters, causing misalignment

3 participants