googlefonts / glyphsets

Apache License 2.0
77 stars 18 forks source link

Add math glyphset #31

Open RosaWagner opened 2 years ago

RosaWagner commented 2 years ago

To fix issue https://github.com/google/fonts/issues/4150 -> Noto Sans Math And also better support of STIX two Math that had to be delisted (https://github.com/google/fonts/issues/3773)

rsheeter commented 2 years ago

We use https://github.com/googlefonts/glyphsets/blob/main/Lib/glyphsets/encodings/math_unique-glyphs.nam currently. Not quite sure what https://github.com/googlefonts/glyphsets/blob/main/Lib/glyphsets/encodings/math.nam is; should the former be updated based on review of the latter?

RosaWagner commented 2 years ago

AH I somehow didn't find it in the list of nam files, thanks Rod. The latter looks like a proposal from @tiroj to improve the math subsetting, so not a bad idea to compare them. Although it doesn't follow exactly the usual nam structure, so this is a nam file regenerated from STIXTwoMath-Regular.ttf

stixtwomath.nam.zip

What is not good with this new file is that it doesn't take variant glyphs for opentype features into account which I suspect could be a problem (it represents 1/3 of the total glyphset). John Hudson's version does but with the use of suffixes that could be different from a math font to another (I don't how big of a problem it is).

rsheeter commented 2 years ago

If you mean lines like ;u1D56B.ssty2;zdblstruck.ssty2; I think we just consider that invalid. These files only operate on codepoints, with the subsetter retaining all glyphs that are reachable using those codepoints.

tiroj commented 2 years ago

A note with regard to the STIX Two Math character set: this is as specified by STI Pub, which includes organisations that publish a variety of scientific and technical materials, as well as mathematics per se. For the 2.01 version, they asked us to fill out a number of Unicode blocks, inlcuding Miscellaneous Symbols, which are mostly non-mathematical. For historic reasons dating back to the original STIX PS Type 1 fonts, the set also includes a lot of linguistics related characters, as well as Cyrillic support.

I have chatted with David Jones at the American Mathematical Society about possibly going through the STIX Two Math set and identifying the subset of characters that would reasonably be expected to occur within mathematical equations. This is something we could pursue in the new year.

[FYI, we are approaching completion of 2.20 version work, which includes updates to both Text and Math fonts.]