jossef / material-design-icons-iconfont

Material Design icons + Development Experience
https://jossef.github.io/material-design-icons-iconfont
Apache License 2.0
455 stars 58 forks source link

Renamed unicode char DBFF for 'goat' to EBFF #57

Closed Kimmova closed 3 years ago

Kimmova commented 4 years ago

Unicode "DBFF" is a High Private Use Surrogate, which does not translate to a valid character. This potentially gives validation errors in various UTF validations and conversions, and I see no need for specifying characters in this range (correct me if I'm wrong).

Refs:

The error was spotted when importing a transpiled angular css bundle into ASP.NET's StyleBundle loader, which in turn calls the C# method System.Char.ConvertFromUtf32() with value "0xdbff". This fails with the following error (for search reference):

A valid UTF32 value is between 0x000000 and 0x10ffff, inclusive, and should not include surrogate codepoint values (0x00d800 ~ 0x00dfff)

NOTE: If there are any automatic scrapers to download font definitions, these might need updates as well.

jossef commented 3 years ago

hey, thanks for this and sorry for the delay I'll add a fix in the font scraping script

...
      ligatureSet.forEach(ligature => {
                let character = font.stringsForGlyph(ligature.glyph)[0];
                let characterCode = character.charCodeAt(0).toString(16).toUpperCase();

                // see https://github.com/jossef/material-design-icons-iconfont/pull/57
                if (characterCode === 'DBFF'){
                    characterCode = 'EBFF'
                }
...