freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_LOAD_FORCE_AUTOHINT and FT_LOAD_FORCE_AUTOHINT


From: David Turner
Subject: Re: [ft-devel] FT_LOAD_FORCE_AUTOHINT and FT_LOAD_FORCE_AUTOHINT
Date: Mon, 11 Jun 2007 01:47:24 +0200

Hello Derek,

FreeType can return glyph paths for these fonts, but you need to
use either the patented or unpatented bytecode interpreter to get
correct results (auto-hinting or even no hinting will return
garbage). this means one of the following:

- activate the patented bytecode interpreter (since you have an @apple.com
  e-mail address, I guess this shouldn't be a problem to you :o) ) 

- the font face name is "recognized" by FreeType (which contains a hard-coded
  list in src/truetype/ttobjs.c). In this case, the font engine automatically
  uses the unpatented hinter when calling FT_Load_Glyph (unless you disable
  hinting, force auto-hinting, or use the "light" hinting mode)

- you activate the unpatented hinter by using the appropriate parameter
  (FT_PARAM_TAG_UNPATENTED_HINTING) when calling FT_Open_Face. See Werner's
  last e-mail on the subject for the details.

I've just added a new API called FT_Face_CheckTrueTypePatents that scans
*all* the glyph hints in a given TrueType fonts to see if they use any of
the patented opcodes. This should help you determine if you should use the
unpatented hinter or not.

Note that this call is *slow* by design, since it parses the whole font file,
so caching its result is better.

There is also now a program called "ftpatentcheck" in 'ft2demos' that can
be used to check wether a given font uses patented opcodes (still very rough,
but functional)

I'll later try to add the ability to switch the unpatented hinter *after*
creating/opening a FT_Face; that should be more convenient to use.

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)


On Tue, 29 May 2007 10:04:26 -0700, "Derek Clegg" <address@hidden> said:
> On May 27, 2007, at 11:34 PM, Werner LEMBERG wrote:
> 
> > Whatever font it is, the images do *not* show `PMingLiU' from
> > mingliu.ttc!  This font can't be displayed with the autohinter because
> > the glyph components need the bytecode interpreter to be positioned
> > correctly.  Please always use ftview, ftstring, or ftdiff to inspect
> > the font.  At the font size you are showing, mingliu.ttc contains
> > embedded bitmaps to improve the rendering, BTW.
> 
> Can FreeType return glyph paths from mingliu and other fonts which  
> need the bytecode interpreter for positioning?  In my experiments,  
> I've failed to get correct results, but that may be my error &#8212; I may  
> not have supplied the correct combination of build parameters and  
> flags.  In my case, I'm only interested in the path, not bitmaps.   
> Thanks for any info!
> 
> Derek
> 
> 
> 
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel




reply via email to

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