RedHatOfficial / RedHatFont

Red Hat's Open Source Fonts - Red Hat Display and Red Hat Text
SIL Open Font License 1.1
479 stars 55 forks source link

Draft: Updating webfonts README and modified web fonts #48

Closed wesruv closed 2 years ago

wesruv commented 2 years ago

Working with @zhawkins to test this, but wanted to push this out before I forgot.

wesruv commented 2 years ago

Published this font to our QA server and I'm still seeing:

`s

Being turned into 1 character: image

wesruv commented 2 years ago

Able to replicate it on github pages for the repo as well (https://redhatofficial.github.io/RedHatFont/) image

jeremymickel commented 2 years ago

Did you pull the files from https://github.com/jeremymickel/RedHatFonts ? I confirmed with Google that they were functioning correctly.

wesruv commented 2 years ago

Yeah, I built off the latest versions on master, and I assume the version on github.io is also using the latest webfont, and when I hacked in a:

`s

Into that page using Chrome Dev Tools and it shows the issue.

zhawkins commented 2 years ago

@jeremymickel I asked Russ McMullin on our side to take a look at this and see if anything stood out. Here's what he said:

When I opened the newer font in FontLab, I saw an OpenType feature of "mark". It isn't included in the OpenType features of the older font. I'm not an expert with OpenType feature code and I haven't read the spec, so I can only guess at what this does. Nearly everything in this feature is focused on "grave", which is the glyph name for the backtick symbol. It looks like the font designer introduced this feature, or it may have been generated automatically. If I understand the gist of it, in situations where the "grave" glyph is next to another glyph, this OpenType feature takes over and and executes this script to change the glyph positions to combine them—similar to a ligature.

Screen Shot 2022-07-12 at 11 38 09 AM

Not sure if I understand that exactly so I guess my question is, if we remove the "mark" feature would that fix the overlap?

jeremymickel commented 2 years ago

@RosaWagner any thoughts on this? They're seeing a mark feature which seems to be influencing position of grave.

I did not create that feature, it must have happened in generating using the Google FontMake feature.

@jeremymickel I asked Russ McMullin on our side to take a look at this and see if anything stood out. Here's what he said:

When I opened the newer font in FontLab, I saw an OpenType feature of "mark". It isn't included in the OpenType features of the older font. I'm not an expert with OpenType feature code and I haven't read the spec, so I can only guess at what this does. Nearly everything in this feature is focused on "grave", which is the glyph name for the backtick symbol. It looks like the font designer introduced this feature, or it may have been generated automatically. If I understand the gist of it, in situations where the "grave" glyph is next to another glyph, this OpenType feature takes over and and executes this script to change the glyph positions to combine them—similar to a ligature.

Screen Shot 2022-07-12 at 11 38 09 AM

Not sure if I understand that exactly so I guess my question is, if we remove the "mark" feature would that fix the overlap?

wesruv commented 2 years ago

So I just reread the thread, and realized @jeremymickel asked me if I took the fonts from the repo under his username (https://github.com/jeremymickel/RedHatFonts), instead of RedHatOfficial.

Poor reading on my part. I retested, TL;DR still had the issue.

Here's what I did:

  1. I cloned https://github.com/jeremymickel/RedHatFonts
  2. Copied the ./fonts/ dir from jeremeymickel to Red Hat official
  3. Rebuilt the webfont following these steps:
    1. ./build-scripts/build-modified-vf.sh
    2. ./build-scripts/make-woff2s.sh
    3. npm run copy-to-webfonts
    4. Tested using browsersync from the webfonts folder using the html file in there

Still able to reproduce the issue. image

wesruv commented 2 years ago

Full disclosure, I have no idea what I'm doing, or what these build scripts do.

So just in case it would have helped I copied over more folders (fonts, mastering, and source) from jeremymickel's copy of the repo into my branch, rebuilt, and can still reproduce the issue.

zhawkins commented 2 years ago

@wesruv I took a crack at it and think it's now fixed. Check out https://github.com/RedHatOfficial/RedHatFont/pull/49.

TLDR @jeremymickel fixed it, we just didn't merge in the updates correctly. I think I've got them now. 🤞

wesruv commented 2 years ago

I was able to show it's fixed in his branch as well, closing this, thanks @jeremymickel, sorry for the confusion on our side.