So, yea. There is a bug in the line space rendering in Flash for embedded fonts.

Easiest test case is to build a TextField display and set the leading to the point size of the font, minus the ascent and descent. In the ideal world, this should cause all lines of a multiline text field to align on the baseline of the first line (overlap). Unfortunately, this does not occur at all point sizes - only a few: 9,12,26,32 and a couple others I think.

For all other point sizes, the line spacing determined by Flash is off anywhere from half a point to 10 points. That's pretty wack if you ask me. I might need to file a bug on the text rendering sometime. First I have to figure out why it's doing that (I have a fix that works). The wonderful getTextExtent inaccuracies didn't help much either.

It's interesting to set the line spacing and see it fluctuate as the font sizes change.

Whatever. Hackery abounds. At least I can get it to match Photoshop's rendering of text now, minus display issues with antialiasing and the way the Saffron engine renders characters. But that is another, separate issue - it doesn't render all characters right - that might be because of the quadratic approximation of the font outlines.

cheers,

jon


On Nov 29, 2007, at 8:33 PM, Jon Bradley wrote:

Embedded fonts, on the other hand, incorrectly render leading,
always. I say incorrectly because it's not how any other desktop
print application does it, so far as I can tell. Maybe it's an issue
with the way saffron was designed .. how is Flash calculating this?

Flash is definitely not rendering line spacing/leading correctly, but
I cannot figure out what it is doing to calculate this. If I can get
that taken care of, I have the rest of the situation solved
(tracking, margins, etc.), matching photoshop as my baseline.

Reply via email to