graphicore / mdlFontSpecimen

Font specimen for the web based on Material Design Lite.
https://graphicore.github.io/mdlFontSpecimen/
Apache License 2.0
25 stars 2 forks source link

Language detection buggy? #4

Open davelab6 opened 8 years ago

davelab6 commented 8 years ago

The https://graphicore.github.io/mdlFontSpecimen/html/drop-fonts.html page is nice but seems buggy - i dropped Acme-Regular from github/google/fonts and it says 5 languages

screen shot 2016-11-03 at 23 33 00
graphicore commented 7 years ago

I just pushed a new tool to gh-pages: https://graphicore.github.io/mdlFontSpecimen/html/language-coverage-details.html

There we can see what the language coverage detection is based on. In the lax mode (which we are using) mainly some punctuation is missing for Acme: ("…" U+2026,"†" U+2020,"‡" U+2021)

The lax mode uses a list of chars that we (I) decided is not important enough to break language support, looks like this at the moment:

https://github.com/graphicore/specimenTools/blob/master/lib/services/FontsData.js#L155

    FontsData.DEFAULT_LAX_CHAR_LIST = new Set([
        0x2010 // HYPHEN -> we usually use/include HYPHEN-MINUS: 0x002D
      , 0x2032 // PRIME
      , 0x2033 // DOUBLE PRIME
      , 0x27e8 // MATHEMATICAL LEFT ANGLE BRACKET
      , 0x27e9 // MATHEMATICAL RIGHT ANGLE BRACKET
      , 0x2052 // COMMERCIAL MINUS SIGN
    ]);

The question is of course whether we can add all chars that break the fun to the lax-list and still that claim the language is supported. E.g. I personally use the ellipsis regularly but rather never dagger and double dagger.

Acme is now down to 4 languages, because "Root" was removed:

selection_119