google / fonts

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

Pridi - broken latin-text glyphs in some circumstances #7904

Open katmai7 opened 4 days ago

katmai7 commented 4 days ago

Describe the bug Latest Pridi font version has a problem with latin-ext glyphs

To Reproduce Steps to reproduce the behavior. for latest google version

Expected behavior Latin-ext text should render correctly. In older version of the font, this case worked ok, exmaple

Screenshots

image

Additional context Tested on macOS Sonoma 14.5 Google Chrome Version 126.0.6478.114 (Official Build) (x86_64)

I noticed same problem in another google fonts, most of the time the problem is in latin-ext subset. In latest version it's broken in some condition, but. worked ok in old version. Same problem with:

  1. Forum new old
emmamarichal commented 4 days ago

I can reproduce it, thanks for the issue, I added it to our to-do!

katmai7 commented 4 days ago

@emmamarichal It was quick, thank you :) Previously I added wrong "ok" example, so updated the issue with correct link. I also found another font "Forum", feels like it's a common issue for new fonts versions.

katmai7 commented 5 hours ago

I found why it happened. latin subset unicode-range includes Combining Macron U+0304, which leads browser to incorrect render font.

If this unicode is removed from unicode-ranges font looks ok. Playground: https://jsfiddle.net/tdhmykwr/

CSS from google fonts:

@font-face {
  font-family: 'Forum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/forum/v18/6aey4Ky-Vb8Ew8IROpI43XnS.woff2)
    format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

I think it's related to this change: https://github.com/googlefonts/glyphsets/pull/110