freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Adding options to the PS Hinter


From: David Turner
Subject: Re: [Devel] Adding options to the PS Hinter
Date: Sun, 07 Jul 2002 10:35:34 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

Hi Keith,

Keith Packard wrote:

Is FT_ULong is defined as a 32-bit type on 64 bit systems?

It depends. Most 64-bit compilers have command-line options to
decide wether to use 32 or 64 bit longs (and/or pointers), so
one cannot assume the size of such types on 64-bit processors.


Breaking binary compatibility on 64 bit systems would be bad; let's make sure that doesn't happen here.

Yes, this means we should limit ourselves to FT_UInt32


  In all cases, more experimentation is needed and will be
  performed. It seems that we might be able to completely
  forget about this patent non-sense in a relatively short
  time.. Good, really good :-) !!


Have you started thinking about how to fix diagonal elements?  Seems like
we could discover parallel edges in the glyph and integerize the distance
between them so that the diagonals appeared the same size as an equivalent
stem.  That's one of the most noticeable problems right now when dealing
with gothic fonts.

A harder problem would be to retain the angular relationship between diagonoal elements in glyphs; I've seen the autohinter do weird things
with ¥ in some fonts.

I've been thinking about it for a long time, however, the problem is not
necessarily trivial. Here are a few points to consider:

 - I believe it's a bad idea to work on diagonal auto-hinting until the
   hinting of normal stems isn't completely correct. For now, there are
   still problems with serifed fonts, and these introduce distortions that
   are much more important, and which also "nuke" the outline so seriously
   that attempting to hint diagonal isn't going to work or be noticeable.

   We could start working on hinting diagonals of sans-serif fonts, but
   there are chances that the algorithm doesn't work well with serifed
   fonts and would need re-working..


 - hinting straight diagonals isn't that difficult once the glyph has been
   properly analyzed. On the other hand, hinting diagonal curves is much,
   much, more problematic. there are lots of "special" cases to handle.

 - sometimes, the diagonals are, like the ones in ¥ are split in several
   segments, and this makes the analysis a lot harder, and the alignment
   subtler.

 - finally, it'd be nice if the auto-hinting algorithm could still be
   performed relatively quickly. Deep diagonal analysis requires more
   CPU and I'm not confident that the performance of the hinter will
   still be acceptable. Same goes for counter-hints analysis (a really
   tricky subject too). An alternate solution would be to pre-compute
   glyph hints in an external file (that one could FT_Attach) to avoid
   re-computing them everytime though..

Hope this helps,

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




reply via email to

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