[Top][All Lists]

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

FontMatrix revisited (CFF & T1)

From: Just van Rossum
Subject: FontMatrix revisited (CFF & T1)
Date: Tue, 1 Aug 2000 08:43:00 +0100

For the record (ie. as a reminder for David when he gets back ;-), here are
a couple of issues regarding the FontMatrix for CFF and Type 1 fonts:

- Even though the font matrix is read, it doesn't seem to get
  applied (at least when using ftview, both T1 and CFF)

- The type1z driver assumes 1000 units per em: it multiplies
  the FontMatrix by 1000 by presetting power_ten to 3. Even
  though *most* T1 fonts indeed have 1000 units per em, this
  is not generally true. When the FontMatrix is not rotating,
  the number of units per em is 1/yy (yy as in the 4th
  element of the FontMatrix). I don't know what would be a
  wise thing to do if the FontMatrix *is* rotating, though..
  The 'power_ten' argument of Z1_ToFixedArray(),
  t1_tofixedarray() and t1_tofixed() should become a (16.16)
  'scale' argument.
  (Maybe it's better to implement t1_tofixed() with atof()?
  Floats aren't that frequent in T1, so the performance hit
  should be minimal.)

- Currently, the CFF FontMatrix isn't scaled at all yet --
  right now not a big deal, as it isn't used in the first
  place. However, just like in the t1z driver, the scaling
  should happen before or during conversion to a 16.16 fixed
  point number. I guess t2_parse_fixed() should get a 'scale'
  argument. (I would also suggest to use atof() here, instead
  of parsing the entire float ourselves.)


reply via email to

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