I'm currently trying to add all remaining high level api into freetype-py so
FT_Get_Sfnt_Name should be in a few hours hopefully.
If I forgot to add other useful functions, just tell me.
The agg-trick.py is very similar from what I found in ft2font in matploltib:
setting a resolution at (10*dpi, dpi) and a transform matri =(.1,0,0,1).
One output is available on:
http://www.loria.fr/~rougier/coding/freetype/agg-trick.png
(This is with subpixel antialias)
I will also integrate the ft_utils within freetype-py.
Nicolas
On Feb 1, 2011, at 8:36 PM, Michael Droettboom wrote:
> I've made a basic first crack at this.
>
> Thanks to your examples, it was really easy to get basic text rendering with
> matplotlib's Agg backend (the other backends will need to be updated
> accordingly, and they may be more involved since they actually need to
> extract curves). I've made an SVN branch for this here: (I know, I know, git
> would make this easier, but afaik we're not quite there yet...)
>
> https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/ctypes_freetype
>
> This doesn't use the Agg tricks rendering (finer grained hinting in the
> horizontal direction etc.) so it's a little lower quality than matplotlib
> trunk right now. However, your agg-tricks.py example certainly shows the way
> forward to making that work. I've tried to localise all of the higher-level
> stuff in freetype_util.py (in matplotlib) to make this easier. It may also
> make sense to put this kind of higher-level (but extremely common)
> functionality in freetype-py itself.
>
> The next stumbling block to removing the existing wrapper is the
> FT_Get_Sfnt_Name API which doesn't seem to be in your ctypes wrappers. This
> is used to extract metadata about the fonts and build the font cache table
> etc. Hopefully it's simple to add this?
>
> Mike
>
> On 02/01/2011 10:53 AM, Nicolas Rougier wrote:
>>
>>
>>
>> Hi all,
>>
>> I've bound (part of) the high-level API of freetype using ctypes.
>>
>> I don't know if it might be useful for matplotib text rendering but just in
>> case:
>> http://code.google.com/p/freetype-py/
>>
>>
>>
>> Nicolas
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>>
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel