freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] some bits about ClearType hinting


From: Werner LEMBERG
Subject: [ft-devel] some bits about ClearType hinting
Date: Thu, 30 Nov 2006 20:38:53 +0100 (CET)

I've found this in the typophile forum; the info is quite old but
still very interesting.


    Werner

======================================================================

Q: Has anybody here hinted for cleartype?  (Eben Sorkin)

A: I have and if you are manually hinting with Microsoft’s Visual
  TrueType there are 2 things you can do.

  It helps to have the ClearType version of VTT and know how to do low
  level TrueType.

  You need to check the rasterizer with code to see if ‘you are in
  ClearType’.  This is a standard function in the ‘fpgm’ that VTT has
  and what you need to do is do the same thing as is done for
  Greyscale checking in VTT’s function 84.

  Then in the glyph’s instruction that you would like to alter you
  would have to use low level TrueType to call function 77.  That is
  the function used in VTT for binary or grey scale delta hints.

  By adding to function 84 and copying the same method that VTT does
  for Grey and using the GETINFO instruction and the value 8192
  instead of 4096 for grey, you can hint for grey, binary or CT.

  Also CT ignores Delta hints.  You can force it to not ignores them
  by sticking this in the ‘prep’

    /* use Deltas in ClearType */
    #PUSHOFF
    #PUSH, 4, 3
    INSTCTRL[]
    #PUSHON

  this is a bit dangerous because most Deltas are for Grey or binary.

  [...]

  Generally all I’ve done is address some problems that CT creates
  such as diagonals have a tendancy to become heavy (as apposed to in
  Grey they are light).  Some stems like the Capital H, I , L maybe
  light or heavy because they have a sub pixel that is darker than
  others.  In these cases I use function 77 in the glyphs local
  instructions to move the outline.  Function 77 acts like a delta
  hint and moves a point through a range of sizes.  it checks a flag
  that is set by function 84 to see what mode the rasterizer is in. If
  we are in CT then the exception is processed.  (Vincent Connare)

reply via email to

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