[Top][All Lists]
[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: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] FT_LOAD_FORCE_AUTOHINT and FT_LOAD_FORCE_AUTOHINT |
Date: |
Sun, 10 Jun 2007 08:01:47 +0200 (CEST) |
> > > Well, saying
> > >
> > > ftgrid -f 1915 20 EPPGLH+DFHSMincho-W3-WIN-RKSJ-H.ttf
> > >
> > > I get image A.
> > >
> > > Pressing the `h' key I get image B.
> > >
> >
> > BTW, I've compiled FreeType with `make devel', so the images use
> > the native TT bytecode interpreter.
>
> That's why it works for Werner - I run into this problem
> periodically. These kinds of fonts require the native TT bytecode
> interpreter (#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER) and
> hinting.
Well, had EPPGLH+DFHSMincho-W3-WIN-RKSJ-H.ttf a correctly set family
name which is in FreeType's list of fonts needing the bytecode
interpreter, it would work out of the box. For example, if I say
ftgrid 20 mingliu.ttc
using the default ftoption.h (this is, bytecode interpreter with
unpatented hinting), I get correct results. The list of `tricky'
fonts is hard-coded in ttobjs.c:
"DFKaiSho-SB", /* dfkaisb.ttf */
"DFKai-SB", /* kaiu.ttf */
"HuaTianSongTi?", /* htst3.ttf */
"MingLiU", /* mingliu.ttf & mingliu.ttc */
"PMingLiU", /* mingliu.ttc */
"MingLi43", /* mingli.ttf */
If you don't want or can't rely on this list, you have to open the
font like this:
{
FT_Parameter parameter;
FT_Open_Args open_args;
parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;
open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
open_args.pathname = my_font_pathname;
open_args.num_params = 1;
open_args.params = ¶meter;
error = FT_Open_Face( library, &open_args, index, &face );
...
}
Werner