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: Derek Clegg
Subject: Re: [ft-devel] FT_LOAD_FORCE_AUTOHINT and FT_LOAD_FORCE_AUTOHINT
Date: Fri, 15 Jun 2007 13:07:34 -0700

Just to follow up a bit, it appears that part of my problem was my choice of flags to "FT_Load_Glyph" — since I wanted the glyph path in font units, I passed in "FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM". It appears, however, that this ended up by-passing the hinter, and so my glyph paths were incorrect. I'm not sure whether this is by design, however.

In any case, thanks again for your help.

Derek

On Jun 14, 2007, at 3:48 PM, Derek Clegg wrote:

Thanks very much to you and Werner — this is excellent and very helpful information. I appreciate it a lot.

Derek

On Jun 10, 2007, at 4:47 PM, David Turner wrote:

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



_______________________________________________
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]