GoogleOpenCode / material-design-icons

Material Design icons by Google
http://google.github.io/material-design-icons/
Apache License 2.0
0 stars 0 forks source link

When pulling Material Symbols into Windows or Unity (game engine), some codepoints do not show up #1

Closed MCallawaySoftware closed 1 year ago

MCallawaySoftware commented 1 year ago

Verision used variablefont/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf

Used the June 29th 2023 10:43PM version.

I also downloaded a static WOFF2 of the Filled variant (Unity cannot adjust variable fonts) from the Material Symbols website and used Google's WOFF2 v1.0.2 tool to convert it to TTF. I had the same issue with both TTFs.

Reproduction Steps For example let's say I want to use the warning glyph. Unity does not support ligatures so I find its code point on the Material Symbols dictionary website: E002.

I then look up that code point in the TTF using Windows Character Map. I can then copy it to the clipboard and paste it in Unity.

The problem is, there is no code point E002 in the file. It does not show up in Character Map, and when importing the glyphs using Unity's TextMeshPro texture atlas generator, it reports no E002 glyph was found (among others) when trying to import all characters in the 0000-FFFF range.

If I take the font and use it in a web browser (Chrome in my case) and reference E002 directly the glyph does appear IIRC.

Searching through Character Map I can find the identical glyph F083 which works fine. It is a huge pain to manually find a matching glyph though. In fact, the glyph (report_problem according to the .codepoints lookup for F083) doesn't seem to be on the Symbols website!

Speculation I think this is related to the deduplication of glyphs that I've seen referenced in one or two other issues.

Expected Behavior If I am correct in my speculation, the Material Symbols site could display either the main code point for the glyph (F083) or alternately display both the main code point and the duplicate one (E002). This would give developers more information for using the font with software that does not support ligatures (or whatever is going on with Windows and Unity).

Otherwise the issue with being unable to locate some glyphs via code points should be addressed some other way.

This issue also affected Material Icons last time I used it. For some missing glyphs I was unable to locate deduplicated versions entirely. I have not yet seen that issue in Material Symbols.

MCallawaySoftware commented 1 year ago

Fixed.