|
From: | Erik |
Subject: | Re: [ft-devel] Bytecode Hinting - Vertically Only? |
Date: | Thu, 04 Sep 2008 19:14:51 -0500 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Thank you for your response.Let's say one was interested in modifying the BCI hinting algorithms to apply the BCI hinting to only horizontal stems, and using the normal autohinting on vertical stems. In other words, hinting vertically based on BCI hints and horizontally not at all.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, and I prefer (that aspect) of how it renders the MS fonts at least. (Autohinter is much better in general). 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". Of course, the autohinter is more true to the glyph, but I personally prefer the look when the bottom of the "u" doesn't have the ghost pixel above it. I'm sure that MS is doing some other hammering too, as the glyphs still appear thinner and more "eroded" than with the autohinter, although less eroded than without antialiasing (the B+W BCI rendering). 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. 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). But I wouldn't want to compromise how the autohinter works for light hinting- 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. It's possible that what I'm interested in doing should be done in the rasterization step, not in freetype. It's also possible that I'm just getting too obsessed with font rendering. :) First, does this question even make sense, and if so, is this something simple, such as changing a macro, or is it a more in-depth code change?What you want to do is not possible. Try FontForge, the font editor, using a FreeType library which has bytecode support enabled. Then take a well-hinted TrueType font (say, MS Arial) and debug the truetype intructions of a glyph. I believe that you will immediately see why your suggestion can't work. I'd give it a whirl, but I'm having some fontforge crashy issues at the moment! Still working through that. Thanks, Erik |
[Prev in Thread] | Current Thread | [Next in Thread] |