googlefonts / pyfontaine

Python tool to check font files for language/character set support
https://github.com/googlefonts/pyfontaine
GNU General Public License v3.0
104 stars 20 forks source link

Add 'make glyphlist from font' feature, use Noto fonts to make a Noto collection #51

Closed davelab6 closed 9 years ago

davelab6 commented 10 years ago

After #46 is resolved....

The Noto fonts - git repo at http://code.google.com/p/noto - offer a large collection of different writing systems, with carefully curated character and glyph lists. It would be great to compare other fonts to those.

Eg

$ pyfontaine --compare-chars font1.ttf font2.ttf;
$ pyfontaine --compare-glyphs font1.ttf font2.ttf;
$ pyfontaine --new-charmap-py NotoSans-Regular.ttf  > notosans-regular.py;
$ pyfontaine --new-glyphmap-py NotoTamilSans-Regular.ttf > nototamilsans-regular.py;
$ pyfontaine --new-charmap-txt NotoSans-Regular.ttf  > notosans-regular.txt;
$ pyfontaine --new-glyphmap-txt NotoTamilSans-Regular.ttf > nototamilsans-regular.txt;
andriyko commented 10 years ago

@davelab6 , Please see what has been done already. Few questions. When creating new charmap from font:

  1. Where the output should be written to? plain text file, or python file, like fontaine/charmaps/internals/adobe_latin_1.py? I am confused about this because of changes introduced in issue #46
  2. If it is txt, what format should it be?
73      I      LATIN CAPITAL LETTER I

The same about glyphmap. Should it contain glyphs name and id?

uni031F                1279
uni1EE3                861
omega1                 594
davelab6 commented 10 years ago

Where the output should be written to?

stdout, as in my example above

what format should it be?

Lets do both. I've updated the main issue text to add this example,

$ pyfontaine --new-charmap-py NotoSans-Regular.ttf  > notosans-regular.py;
$ pyfontaine --new-charmap-txt NotoSans-Regular.ttf  > notosans-regular.txt;
andriyko commented 10 years ago

Done. I had to read few articles and wiki pages in order to understand character vs glyph and what should be done :)

I am confused by this. Under fontaine/charmaps/internals there are *.py files, so what they are? charmaps or glyphmaps? fontaine/charmaps/internals/adobe_latin_1.py The class name is class Charmap: but method is def glyphs(self):

davelab6 commented 10 years ago

The method name is misleading and arbitrary :) change it to

def charset:

vitalyvolkov commented 9 years ago

I have checked functional that already done. It seems that now what left is

Download and run each script over all the Noto fonts to make 2 Noto collections, noto and noto, and check them in

In this check you write noto and noto :) but what exactly noto should be run over on?

davelab6 commented 9 years ago

See example; the 2 collections are glyphs and chars based

vitalyvolkov commented 9 years ago

What place I need upload generated python files for Noto?

davelab6 commented 9 years ago

Same directory as others On 19 Jan 2015 07:12, "Vitaly Volkov" notifications@github.com wrote:

Where to upload generated python files for Noto?

— Reply to this email directly or view it on GitHub https://github.com/davelab6/pyfontaine/issues/51#issuecomment-70484034.

vitalyvolkov commented 9 years ago

As I understand we then will have about 244 files for one noto font. Is that right?

davelab6 commented 9 years ago

Which noto font is that? On 19 Jan 2015 11:06, "Vitaly Volkov" notifications@github.com wrote:

As I understand we then will have about 244 files for one noto font. Is that right?

— Reply to this email directly or view it on GitHub https://github.com/davelab6/pyfontaine/issues/51#issuecomment-70517703.

vitalyvolkov commented 9 years ago
vitaly@vitaly-X550LB:~/Documents/Dave/noto$ ls -lah fonts/individual/hinted/*.ttf | wc -l
94
vitaly@vitaly-X550LB:~/Documents/Dave/noto$ ls -lah fonts/individual/unhinted/*.ttf | wc -l
155
davelab6 commented 9 years ago

Put them in a noto subfodler? :)

vitalyvolkov commented 9 years ago

Please check the https://github.com/davelab6/pyfontaine/commit/ef7020d7ef961ea6bc9dc00d799747756794f9a4

davelab6 commented 9 years ago

Great!