freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] some questions about freetype


From: Werner LEMBERG
Subject: Re: [Freetype] some questions about freetype
Date: Tue, 25 May 2004 09:26:37 +0200 (CEST)

> 1) I use freetype get the units_per_EM of simsun.ttc(copy from
> windows xp),and units_per_EM=256, but on windows xp, I use fontlab
> 4.6(demo) get the units_per_EM of simsun.ttc, and its value is 1024.
> why?  I think that units_per_EM comes from head talbe's unitsPerEm,
> so its value shouldn't different.

I don't have this font, so I can't comment.  You might try fontforge
(from fontforge.sf.net) and check what this program reports.  Or you
can try other OpenType tools to examine the exact contents of the
tables.

It is possible that `1024' is the value fontlab will use for storing
the font after you've edited it -- `256' is an unusual ppem value for
TrueType fonts, and probably fontlab provides a `better' default.

> 2) I want to display text vertically, and I need get column's width,
> but how to do when using freetype? what is the meanding of vhea
> table's ascent and descent, could they be used to calculate the
> column's width?

You should probably read the OpenType standard for such details.  The
BASE table contains a `vertical baseline to baseline' value.  Maybe
simsun has this value set.  FreeType doesn't provide support (yet) to
get this data, so you have to parse the table by yourself.

> 3) I care about the vertical layout, and want to display large
> amount text vertically, I have read some source code of freetype,
> but I found freetype hasn't consider vertical layout enough, could
> you give me some hints?

You might have a look at Pango or ICU how to solve such problems.


    Werner



reply via email to

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