[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] freetype-py python binding to FontVal's FreeType backend.
From: |
Hin-Tak Leung |
Subject: |
Re: [ft-devel] freetype-py python binding to FontVal's FreeType backend. |
Date: |
Wed, 29 Mar 2017 01:23:51 +0000 (UTC) |
--------------------------------------------
On Wed, 29/3/17, Dave Crossland <address@hidden> wrote:
> Hi
> Cool, I hope this could be useful
> :)
>> LD_LIBRARY_PATH=... PYTHONPATH=build/lib/:$
>> PYTHONPATH ./examples/font-diag.py examples/Vera.ttf
>> Size 10, SLOOP, Glyph ID 241, At ByteOffset 67 :
>> _rast_W_FT_VALUE_OUT_OF_RANGE_ SLOOP
>> Size 10, SLOOP, Glyph ID 244, At ByteOffset 67 :
>> _rast_W_FT_VALUE_OUT_OF_RANGE_ SLOOP
A bit more detail. In the FontVal C# code, the _rast_* status symbol is further
converted into the report as
W6020 "Setting the loop variable to zero is an error"
That information comes from Font-Validator/GenerateFValData/OurData.xml . You
can do something like this
(sorry this is GNU grep syntax, which Mac OS X's grep is not):
grep -B1 -A3 _rast_W_FT_VALUE_OUT_OF_RANGE_
Font-Validator/GenerateFValData/OurData.xml | grep -E '(helpID|atom|shortDesc)'
helpID="W6020"
atom="_rast_W_FT_VALUE_OUT_OF_RANGE_SLOOP"
shortDesc="Setting the loop variable to zero is an error"
While looking up and doing a more friendly message, you can silence specific
warning(s) that you don't like etc. (I know Werner does not like this one - it
is the thing from hinting with ttfautohint).
I also filed a few bug reports with upstream freetype-py, and pushing a few
python enhancements which was in the C# bridge or contributed by me a while
back. As of now, if you use my fontval-diag branch of freetype-py, you should
be able to do everything in python that the C# freetype bridge in FontVal does.