freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Bytecode Hinting - Vertically Only?


From: Werner LEMBERG
Subject: Re: [ft-devel] Bytecode Hinting - Vertically Only?
Date: Fri, 05 Sep 2008 07:41:52 +0200 (CEST)

> > Why do you want to do this?
>
> Based on examining how Windows cleartype renders the MS fonts, that
> appears to be what it is doing,

I don't think so.  It rather interprets certain bytecode commands
differently in an undocumented way.

> A good example of what I'm talking about would be to compare the way
> cleartype and autohinter both render Verdana 16px on say, the letter
> "u".  With cleartype, the bottom of the u is clearly 1 px thick, and
> it is more than 1px thick on the vertical stems.  With the
> autohinter, it is uniformly more than 1px thick throughout, leaving
> an antialiased grey ghost pixel above the fully black bottom pixel
> at the bottom of the "u".

Well, the truetype instructions artificially thin out the whole font
at that resolution, something which can't be deduced from looking at
the glyph shapes only.  You will *never* get this effect with the
autohinter.  The attached image shows this quite well: the original
outline is black, the result after applying the hinting instructions
for 16px is green (this is normal hinting, not cleartype).

> Another way to duplicate the effect to my satisfaction would be (for
> certain font sizes, say 9 to 14 pt) to snap horizontal parts to 1px
> thick, regardless if the glyph says it should be 0.9, 1.2 or 1.8,
> etc, until it reaches 2px thick.

This is something completely different.  Now you are talking about
improving the autohinter results.

> I would imagine that this alternate way would be easier to implement
> in the autohinter, as from my understanding it is snapping to pixel
> lines for horizontal stems anyway.  What it probably *isn't* doing
> is forcing the widths to be integers, which is really what I'm going
> for here (namely 1px thick, just for horizontal parts).

This won't work either, I believe.  At such small sizes, integer stem
widths are far too coarse; the distortions caused by this would be
overwhelming.

> if anything I would want to create a new hinting mode based off the
> light hinting that could be turned on with xft "hintmedium", which
> from my understanding does the same thing as hintfull anyway when
> using subpixel rendering.

Either you use hinting instructions or not.  There is nothing
inbetween.

> It's possible that what I'm interested in doing should be done in
> the rasterization step, not in freetype.

Well, if you need bytecode instructions to artifially reduce the
overall thickness of a font, rasterization won't help either.

> I'd give it a whirl, but I'm having some fontforge crashy issues at
> the moment!

You should report this to a fontforge list.


    Werner

PNG image


reply via email to

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