google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.07k stars 2.6k forks source link

CDN doesn't serve certain characters included in some fonts #4235

Open ouroborus opened 2 years ago

ouroborus commented 2 years ago

Describe the issue The Google Fonts CDN doesn't serve all characters available in some fonts. This is especially noticeable with fonts that support the box drawing unicode range, U+2500-257F (for example, Fira Code), while trying to use the Box Drawing Light Arc characters, U+256D-2570.

To Reproduce Produce the CSS and HTML such that they render box drawing characters (best done with <pre> and a monospace font) and use a font from the Google fonts CDN that supports those characters (such as Fira Code). Note the results.

Clone the above HTML/CSS and adjust it to instead use one of the font files (by either hosting the file yourself or encoding as a data URI and using that) available in the downloadable zip files for the font. Note the results.

Note the differences between the two examples.

Expected behavior The CDN should be serving CSS and font files that contain all characters available in original font files.

ouroborus commented 2 years ago

See also: https://stackoverflow.com/a/70818974/367865

topolarity commented 1 week ago

This would be a great fix to have.

The Julia ecosystem frequently uses Block Elements and Box Drawing characters to make ASCII plots / visualizations, but these unfortunately look terrible in the browser:

                            ▁ ▄▄ ▇ ▆▆▁█▁▇▆▁▆ ▅▃ ▂ ▁
  ▂▁▁▁▁▂▂▂▂▂▂▃▂▃▃▃▄▃▄▃▅▆▅▇█▅█▆█████████████████▇█▆██▅▆▄▅▄▃▄▃▃▃ ▅
  150 ns          Histogram: frequency by time          170 ns <

compared to the terminal: image