[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FT2 design question
From: |
David Turner |
Subject: |
Re: FT2 design question |
Date: |
Fri, 25 Feb 2000 16:30:00 +0100 |
Hi Stefan,
>
> a question about hinting: I understand that to create a raster, I need to
> provide
> exact pixel relative positions so that the hinter can do it's work.
> Is there functionality to create rasters under arbitrary transformations ? Can
> I provide a rotation matrix and get a (correctly hinted) raster of a rotated
> glyph ?
>
Just to clarify things, a "raster" in FT2 is the module handling
scan-conversion of
a given glyph image to a pixmap (either monochrome or anti-aliased).
The auto-hinter works on outlines exclusively, so I'll rather call its results
"hinted outlines" for clarification.
The process of auto-hinting is designed to make text more legible by respecting
a few simple rules (that are more or less hard to implement :-) like :
- stems with the same original width, should appear with the same scaled
hinted
widths
- stem pixel widths should be normalized for a given font (i.e. at small
sizes,
you should not have a "B" that has a 2 pixels vertical bar, and a "T" which
is
only 1-pixel wide, unless the master design really asks for it..).
- to make things a bit more legible, try to align vertical and horizontal
stems
to integer pixel grid coordinates.
- there are some specific alignment zones in a Latin font (the blue zones)
that
need special management..
As you can see, these rules can be applied to rotated outlines as well, with the
exception of the blue zones. However, I don't think it'd be a good idea, nor
that
it will give good results. Fact is that, for example, the advance width and left
side bearing of glyphs are modified by the hinting process. A rotated outline
will
surely be hinted differently from its un-rotated version, which will mean
different
metrics.
Now, do the following :
a/ render auto-hinted text on a single horizontal baseline into a series of
vector outlines. Then rotate the whole outlines before scan-converting
them..
b/ render auto-hinted rotated text on a single rotated baseline, i.e. render
each rotated glyph separately
There are great chances to see _very_ different results because the auto-hinting
will be so different..
So my guess, is that we should stick to rotating auto-hinted outlines. On the
other
hand, if we only do device-independent glyph placement, the technique could be
useful,
so it needs investigation. Something I'll try as soon as the auto-hinting gives
decent results for all kinds of fonts (for now, it has issues with serifs :-()
> and yet another about text processing: will you integrate at least the API
> for accessing
> ligature information (I don't know how this processing is semantically done) ?
> I understand that not all fonts provide such information but since for text
> processing
> such considerations are quite standard, I would expect that fonts not
> implementing it
> would simpy return the unmodified string...
>
To be clear, there will not be a text-rendering API available with FreeType 2
when
it is first released (I mean, something that can convert "Office" into the
glyphs
for "O", "f", "fi", "ce" or "O", "ffi", "c", "e" depending on the font's
content).
The main reason is that there are too many ways to provide this, and we want to
stick purely to font services for the high-level interface.
However, what I _hope_ will be there is an API to expose (and somewhat manage)
the
OpenType Layout tables found there. The real layout/rendering stuff should be
written on top of the library (and to me it has no place within the engine, even
though it will be nice to have), but they should help greatly.
And if someone feels interested in contributing some enhancements to the Type 1
driver(s) to support ligatures too, feel free to do it (I don't think it's a
priority for now..)
Hope this answers the question..
- David
> Best regards, Stefan
> _______________________________________________________
>
> Stefan Seefeld
> Departement de Physique
> Universite de Montreal
> email: address@hidden
>
> _______________________________________________________
>
> ...ich hab' noch einen Koffer in Berlin...
- FT2 design question, Just van Rossum, 2000/02/25
- Re: FT2 design question, David Turner, 2000/02/25
- Re: FT2 design question, Stefan Seefeld, 2000/02/25
- Re: FT2 design question,
David Turner <=
- Re: FT2 design question, Stefan Seefeld, 2000/02/25
- Re: FT2 design question, Werner LEMBERG, 2000/02/26
- Re: FT2 design question, Just van Rossum, 2000/02/26
- Re: FT2 design question, Werner LEMBERG, 2000/02/26
- Re: FT2 design question, Just van Rossum, 2000/02/26
- Re: FT2 design question, Werner LEMBERG, 2000/02/26
- Re: FT2 design question, Just van Rossum, 2000/02/26
- Re: FT2 design question, Pavel Kankovsky, 2000/02/27
- Re: FT2 design question, Stefan Seefeld, 2000/02/28
- Re: FT2 design question, Werner LEMBERG, 2000/02/29