freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] default stem width and height for autohinting


From: David Turner
Subject: Re: [Devel] default stem width and height for autohinting
Date: Wed, 07 May 2003 09:10:42 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

Hello Vadim,

Vadim Plessky wrote:
> On Friday 02 May 2003 12:42, Werner LEMBERG wrote:
> |  The function `ah_hinter_compute_widths' relies on the existence of
> |  glyph `o' in the font.  What about searching for alternative glyphs
> |  depending on the font?  Especially in non-latin fonts, using `o' is a
> 
> Does autohinter use 'o' to calculate stem width and height (hstem, vstem) ?
> This would be really surprise me (and explain some rendering artefacts in 
> current FT).

Yes, it does when it finds one.

> I think 'H' can be used for Vstem and Hstem values, and 'F'  - for HStem.
> Widths of both horizontal and vertical stems in 'O' and ('C', 'o', 'c') are 
> higher than for 'H' (about 96 for H and 100 to 106 for O as VStem value in 
> PostScript coordinates /1000 units/ for typical Sans font) 
>
The problem is that these rules are not exactly valid on a large range
of fonts. Believe me, I've tested a lot of cases, and the 'o' is pretty
much the only stable option I could find (along with 'O')

> On the other hand, I think autohinter should scan all Latin, Cyrillic, Greek 
> Unicode ranges, and take weighted values for HStem/Vstem using those ranges.
> As far as Iknow, some font formats support different Hstem/Vstem values for 
> different Unicode ranges 9in particular - fro CJK ranges).
> So indeed, Hstem/Vstem for CJK fonts should be calculated separatly .
> 
The problem is that such processing takes a *lot* of time, relatively
speaking. Computing stem widths and heights is a lot more costly than
simply getting the bounding box of glyphs. The former is used to compute
the standard widths, while the latter is used to compute the blue zones.

Doing a statistical analysis of the glyphs would be a good thing, but
not necessarily something that would fit on-the-fly hinting. I'm more
interested by the performance of the auto-hinter on low-end processors
than on 1GHz beasts. That doesn't me it shouldn't be tried, but it's not
my priority, and we'll better need a way to get rid of this

However, there are certain ways to make things better, like scanning
for certain script-specific letters to get the script-specific
standard widths. Another way is to perform "offline" computations
and put them in external "hint files"

Regards,

- David Turner
- The FreeType Project (www.freetype.org)


--
This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
CANAL+TECHNOLOGIES will not therefore be liable for the message if modified.





reply via email to

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