[Top][All Lists]

[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: Dave Crossland
Subject: Re: [ft-devel] freetype-py python binding to FontVal's FreeType backend.
Date: Tue, 28 Mar 2017 20:39:54 -0400


Cool, I hope this could be useful :)

On Mar 28, 2017 12:23 AM, "Hin-Tak Leung" <address@hidden> wrote:

I have forked freetype-py and added a few things and an example to make it possible to wrap
around FontVal's FreeType backend. It is easier than I thought - or maybe it is just time
thinking about it before actually getting my hand dirty.

It is on the "fontval-diag" branch of .

Assuming you are on Mac OS X, if you do:
   ./ build
   LD_LIBRARY_PATH=... PYTHONPATH=build/lib/:$PYTHONPATH  ./examples/ examples/Vera.ttf

You should get something like this:

Family name:         Bitstream Vera Sans
Style name:          Roman
Face number:         1
Glyph number:        268
Available sizes:     []

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

Where ... is a directory containing ,
and renaming "libfreetype.6.dylib" to "" .
( see )

Or you can try it with another font other than "Vera.ttf" shipped with freetype-py .

The instruction for python on windows should be similar, but taking{Win32,Win64}, a bit of copying
and renaming. Sorry there is no instruction for linux -
because the necessary enhancement in freetype isn't  upstreadm yet :-).

The 50 lines or so of python code is essentially the python equivalent
of a simpler version of .

reply via email to

[Prev in Thread] Current Thread [Next in Thread]