Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux-specific fonts: Liberation Sans #572

Merged
merged 2 commits into from
Jul 25, 2023
Merged

Linux-specific fonts: Liberation Sans #572

merged 2 commits into from
Jul 25, 2023

Conversation

jvorob
Copy link
Contributor

@jvorob jvorob commented Jul 13, 2023

Specified linux-specific font "Liberation Sans", fixes vertical alignment in buttons/pills/column headers/emoji.

Previously we had Mac- and Windows-specific fonts, but Linux systems didn't have anything explicitly selected until they fell through to Helvetica, which by default got rendered in "Nimbus Sans" (at least on my ubuntu system). Unfortunately, Nimbus Sans is horribly vertically misaligned.

The previous iteration of this patch used DejaVu Sans for most text and Liberation Sans only for data in grids. This version uses liberation sans for all fonts, which fixes the too-wide issue that DejaVu had)

Screenshot with Liberation Sans
image

For comparison, old grist which defaulted to Nimbus Sans (BAD)
image

Currently, ubuntu has a lot of issues with fonts.
Both the regular font-family and the data-font-family end up
evaluating to NimbusSans on my system
  (ubuntu's fallback font from helvetica)

NimbusSans unfortunately is noticably too high, cause text in buttons,
emoji on the left pane, and other vertical text alignment to be too high

This diff explicitly says to use DejaVu and Liberation Sans which should
have no effect on windows/mac systems, but should significantly improve
appearance on ubuntu (and hopefully other linuxes)

Both of these fonts are some of the more widely supported linux fonts,
see:
https://www.webfx.com/blog/web-design/a-web-designers-guide-to-linux-fonts/
@jvorob jvorob added the preview Launch preview deployment of this PR label Jul 13, 2023
@github-actions
Copy link
Contributor

Deployed as https://grist-ubuntu-fontfix2.fly.dev (until 2023-08-12T14:49:43.829Z)

Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

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

Thanks for digging into this @jvorob - alignment looks good now.

@jvorob jvorob merged commit b2e9823 into main Jul 25, 2023
25 of 28 checks passed
@jvorob jvorob deleted the ubuntu-fontfix2 branch July 25, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Launch preview deployment of this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants