adobe-fonts / source-sans

Sans serif font family for user interface environments
https://adobe-fonts.github.io/source-sans
SIL Open Font License 1.1
3.49k stars 230 forks source link

No unicode values on any glifs in UFO masters #59

Closed weiweihuanghuang closed 9 years ago

weiweihuanghuang commented 9 years ago

Are the unicode values assigned by another file or process? Or is this a bug?

frankrolf commented 9 years ago

The Unicode values are assigned at build time though makeotf, which reads that data from the GlyphOrderAndAliasDB file.

weiweihuanghuang commented 9 years ago

Not a bug then! But how does it know which unicode to assign each glyph, is it in the 2nd column (standardised naming)?

weiweihuanghuang commented 9 years ago

And what's the best way to get the unicode values into the .UFO if we wanted to use a .UFO editor…?

frankrolf commented 9 years ago

There is a list of standardized glyph names, commonly know as the agl (Adobe Glyph List). Within the FDK, this data is called via the agd module. You can search the FDK repo for agl for more information. The AGL even has a Wikipedia entry.

Additionally, here is a listing of the AL1 – AL5 character sets we use: https://github.com/adobe-type-tools/adobe-latin-charsets

If you want to get Unicode values in a UFO I suggest the Robofab method glyph.autoUnicodes(); which also relies on the info given in the agl list.

miguelsousa commented 9 years ago

But how does it know which unicode to assign each glyph, is it in the 2nd column (standardised naming)?

By processing the names in the 1st column. The Unicode values for standard names are assigned according to the AGLFN. Names that follow the format uniXXXX will be Unicode-encoded as XXXX. GlyphOrderAndAliasDB entries that have a value in the 3rd column (e.g. glyph f_f), will get that Unicode value.

Glyphs with names that don't follow any of the rules above, will get no Unicode value.

weiweihuanghuang commented 9 years ago

Thanks for the clear explanation. Why are the unicode values not encoded into the .UFO though?

miguelsousa commented 9 years ago

Because they aren't needed. The OTFs are built with makeotf and this tool gets all the Unicode information it needs from the GlyphOrderAndAliasDB file.