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

Ligatures in monospace fonts hurt legibility of config keys #1817

Closed
rybak opened this issue Nov 13, 2023 · 1 comment
Closed

Ligatures in monospace fonts hurt legibility of config keys #1817

rybak opened this issue Nov 13, 2023 · 1 comment

Comments

@rybak
Copy link
Contributor

rybak commented Nov 13, 2023

The choice of the font in app/assets/stylesheets/variables.scss for the rule:

$fixed-width-font-family: Courier, monospace;

can make it harder to read some of the text in the documentation. This is especially applicable to the names of the configuration keys and to mentions of the shell commands, which people would usually edit in a text editor or in a shell with a monospace font. Fonts used by <code> tags are also affected.

URL for broken page

Example: https://git-scm.com/docs/git-config

Problem

Ligatures in the fonts for the Courier in CSS make it harder to read parts of the website.

Operating system and browser

Operating System: KDE neon 5.27 (≈ Kubuntu 22.04)
Browser: Firefox 119.0

Steps to reproduce

  1. Look at mentions of reflog in monospace font on page https://git-scm.com/docs/git-config#Documentation/git-config.txt-gcreflogExpireUnreachable
    screenshot of mention of gc.reflogExpireUnreachable in Git documentation

Other details

@sparr
Copy link

sparr commented Jan 8, 2024

ArtifexSoftware/urw-base35-fonts#31

font-variant-ligatures: none; seems like a good fix, until various monospace fonts stop shipping this sort of ligature

rybak added a commit to rybak/git-scm.com that referenced this issue Jun 3, 2024
The choice of the font in app/assets/stylesheets/variables.scss for the
rule:

	$fixed-width-font-family: Courier, monospace;

can make it harder to read some of the text in the documentation. This
is especially applicable to the names of the configuration keys and to
mentions of the shell commands, which people would usually edit in a
text editor or in a shell with a monospace font. Fonts used by <code>
tags are also affected.

For example, the following ligatures "meld" the letters together:

  - in config key `gc.reflogExpireUnreachable` the ligature is `fl`
  - in config key `color.diff.new` -- `ff`
  - in command name `git config` -- `fi`

Add `font-variant-ligatures: none;` [1] to all usages of variable
`$fixed-width-font-family` to fix this readability issue.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures

Fixes: git#1817
@dscho dscho closed this as completed in dc846ae Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants