Skip to main content
Participating Frequently
May 4, 2010
Answered

Terrible results with Flash Text Engine

  • May 4, 2010
  • 1 reply
  • 1888 views

I'm trying to display some multiline text areas with Flash Text Engine, but I get very irregular and ugly spacing between characters.  Sometimes a single word appears to be two or more words, while at other times, characters are virtually on top of each other.  To test this, I tried the "Justifying text" example from here: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS0ADADB8F-9A0D-40aa-8170-374B8B4B29CF.html

The results are terrible:

Any clues what I'm doing wrong?

Thanks,

-pd

This topic has been closed for replies.
Correct answer

Embedding fonts makes the biggest difference, as we use our own renderer in that case. For device fonts we rely on the system to render, so results are different depending on the platform. Mac device font rendering is better than Windows, and Windows does better with some fonts (like Arial) than others (like Times).

1 reply

May 4, 2010

Rendering of device fonts in Windows - particularly the default font - is unfortunately terrible. You can get better rendering by embedding fonts or switching away from the default. Try adding this line to the "Justifying text" sample after the format variable is declared:

format.fontDescription = new FontDescription("Arial");

pfdstudioAuthor
Participating Frequently
May 4, 2010

Thanks, Alan.  I had assumed that embedding the fonts would not make a difference, since I'm debugging on the same machine I'm developing on.  I'll try your Arial suggestion, and also try embedding some other fonts.

Thank you.

-pd

Correct answer
May 4, 2010

Embedding fonts makes the biggest difference, as we use our own renderer in that case. For device fonts we rely on the system to render, so results are different depending on the platform. Mac device font rendering is better than Windows, and Windows does better with some fonts (like Arial) than others (like Times).