aaranxu / adidoks

AdiDoks is a mordern documentation theme, which is a port of the Hugo theme Doks for Zola.

Home Page:https://adidoks.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jost font displays incorrectly on macOS

iammattcoleman opened this issue · comments

The font included with this theme contains an uppercase "A" character that does not display correctly on all operating systems and browsers.

Here's how it looks on my system:
image

The issue is described in this ticket:
google/fonts#2602

Replacing @import "common/fonts"; with either of the following causes it to render correctly:

@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
@import url("https://indestructibletype-fonthosting.github.io/jost.css");

(For the second URL, I also had to change the font name in _variables.scss to "Jost*".)

After making that change, the font displays correctly:
image

I got the googleapis.com import directive from #8.

How did you obtain or generate the font files included with this theme?

To fix the issue but avoid leaking my visitors' IP addresses to either googleapis.com or github.io, I copied the CSS from indestructible-type and downloaded all the WOFF/WOFF2 files that the CSS references. The downloaded files are noticeably different from the ones you included in the theme:

  • The theme has 1/3 the number of font files:
    $ ls -1 themes/adidoks/static/fonts/vendor/jost/ | wc -l
          12
    $ ls -1 static/fonts/vendor/jost/ | wc -l
          36
    
  • The theme's font files have v4 in their names but the upstream repo, indestructible-type/Jost, is only on version 3.7.
  • The theme's font files are much smaller:
    $ du -hs themes/adidoks/static/fonts/vendor/jost/ static/fonts/vendor/jost/
    164K	themes/adidoks/static/fonts/vendor/jost/
    1.2M	static/fonts/vendor/jost/
    
    Is this due to #8?