adobe-fonts / source-serif

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.
https://adobe-fonts.github.io/source-serif
SIL Open Font License 1.1
2.15k stars 161 forks source link

Missing a non-breaking hyphen #73

Closed daveredfern closed 3 years ago

daveredfern commented 4 years ago

Hi everyone,

Thanks for creating this lovely font. I am using a subfont script for my website so I ship the characters I use. I noticed that script is flagging that a non-breaking hyphen is missing from the fonts.

If it is, could you add to your to-do list when you have chance, please?

Thanks,

Dave.

frankrolf commented 4 years ago

I see this bug is already closed – if you still need to support the code point U+2011 NON-BREAKING HYPHEN, it could be added quite easily by amending this line: https://github.com/adobe-fonts/source-serif-pro/blob/main/Roman/GlyphOrderAndAliasDB#L498

The hyphen already is triple-encoded, to support

Just curious – which environment are you missing the non-breaking hyphen in? Thanks.

frankrolf commented 4 years ago

I re-read the original report and you indeed mentioned where you find that to be an issue. Can you point me to the subsetter you are using? Perhaps the rules within are a bit too strict.

daveredfern commented 4 years ago

Thanks @frankrolf. I did close the issue realizing that it might not be related to your font but the subsetter. I’m using it with Netlify Plugin Subset that from my understanding uses subfont.

Cheers!

daveredfern commented 4 years ago

@frankrolf just noticed that I was using the non-breaking hyphen from Toptal’s page that has the unicode U+02011.

That probably explains the issue.

Munter commented 4 years ago

The subsetter in subfont is python fonttools pyftsubset with a configuration that can be inferred from these lines of code: https://github.com/Munter/subfont/blob/de6a482f31075245ed957aa8057a24e31addd612/lib/subsetLocalFont.js#L47-L60

quasicomputational commented 3 years ago

I'd also appreciate U+2011 being encoded, please. The non-breaking-ness makes it a bit annoying to substitute. I've also verified that it's not present even in the original, non-subsetted WOFF2 files (or, at least, if it is, then Firefox isn't using it for some reason).

frankrolf commented 3 years ago

The non-breaking hyphen is present in Source Serif, and has been encoded since Jun 28, 2018. (I was curious so I checked the commit history – the commit that added it is c207f89035ab35fdc7f0e90df5781e2fd1730cc7)

This means it should be found in version 2.007 and upward. Please check the version you’re using, and please report back if you can’t the non-breaking hyphen even in newer versions of the fonts.

Thanks!

quasicomputational commented 3 years ago

Huh - looks like it's a Firefox bug where it won't use a non-breaking hyphen from a webfont, or something like that! Thanks for the patience.

quasicomputational commented 3 years ago

No, sorry, further investigation has revealed that this is a Source Serif Pro problem: that commit doesn't add U+2011, which is the non-breaking hyphen and the codepoint I would like to see mapped. (The does had U+2010, which is a normal breaking hyphen, though.)

I was misled by Chromium having a clever fallback and apparently working - it looks like it shows U+2010 or U+002D if U+2011 isn't present, which makes sense.

frankrolf commented 3 years ago

Got it now, sorry. Will add the code point – the non-breaking hyphen will be in the next release!