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

Make pyfontaine work with fonttools or freetype-py depending on what is available #19

Closed davelab6 closed 10 years ago

davelab6 commented 10 years ago

Currently we use http://code.google.com/p/freetype-py/ to access font data.

Let's use https://github.com/behdad/fonttools/ too

vitalyvolkov commented 10 years ago

There hard to see how to get info about available glyph. I am sure that SFNT has that but could not find. Freetype-py has API of libfreetype so it was easy to use that API.

vitalyvolkov commented 10 years ago

https://github.com/davelab6/pyfontaine/commit/4ab8739c282280839211e0bf056980a6e0cb368a

davelab6 commented 10 years ago

https://gist.github.com/behdad/fde0d94c08328cc38c08 is an example of how to access glyphs

also http://code.google.com/p/googlefontdirectory/source/browse/tools/genmetadata/genmetadata.py

Can you make it so pyfontaine works with fonttools or freetype-py depending on what is available?

vitalyvolkov commented 10 years ago

https://github.com/davelab6/pyfontaine/commit/401619b6fac95bac2d22ed9cc082d513f8a9e6d9

davelab6 commented 10 years ago

fontTools has italicAngle which if is non-zero then its italic. Also you can grep for "Italic" in the name table - https://github.com/xen/fontbakery/commit/e53ee499b3518efa546a336f2b7ca1a008703c5acan help show how to do this.

For weight, fontTools has weightClass

vitalyvolkov commented 10 years ago

Yes, that worked

On Wed, Feb 5, 2014 at 7:31 PM, Dave Crossland notifications@github.comwrote:

fontTools has italicAngle which if is non-zero then its italic. Also you can grep for "Italic" in the name table -

https://github.com/xen/fontbakery/commit/e53ee499b3518efa546a336f2b7ca1a008703c5acan help show how to do this.

For weight, fontTools has weightClass

Reply to this email directly or view it on GitHubhttps://github.com/davelab6/pyfontaine/issues/19#issuecomment-34214631 .

Best Regards,

Vitaly Volkov Python Developer