Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I emulate Photoshop CS4 Smooth Font Rendering in Flash?

Any ideas about how to emulate Smooth font rendering option from Photoshop in Flash/Flex? I've tried different settings for advanced rendering (antiAliasType, gridFitType and friends) but not much luck so far. Any ideas?..

like image 430
Michael Pliskin Avatar asked Apr 23 '10 07:04

Michael Pliskin


People also ask

How do you make text smooth in Photoshop?

To find this, first, select the text or click the type tool. If set to None, select Smooth. The font will turn smooth. You can also choose the other options depending on your desired result.

How do I make text crisp in Photoshop?

A common reason for pixelated text in Photoshop is an incorrect Anti-Aliasing setting. Anti-Aliasing smooths the blocky edges of text to create a crisp edge. By accessing the Type Tool and setting the Anti-Aliasing to “Smooth” in the upper settings bar, your text will have a more crisp edge.

How can you import graphics in Flash?

Start Flash and open the document into which you want to import an image. 2. Select File > Import > Import To Library. The Import dialog box (Windows) or Import To Library dialog box (Mc OS) appears.


2 Answers

TextField class has a properties for sharpness and thickness.

sharpness: can be set from -400 to 400 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#sharpness

myField.sharpness = 400;

thickness: can be set from -200 to 200 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#thickness

myField.thickness = -200

In general it is a good idea to set your TextField instances on a whole pixel. I sometimes sub-class TextField and override the setters for x and y with something like this.

override public function set x( value:Number ):void
{
     super.x = Math.round( value );
}

I've also found that if you are using pixel fonts that it is a good idea to set TextField.antiAliasType to AntiAliasType.ADVANCED.

like image 81
JeremyFromEarth Avatar answered Sep 28 '22 08:09

JeremyFromEarth


Not really an answer but still valid,

You'll never get your fonts in Flash to look exactly the same as they do in Photoshop. Photoshop uses much more advanced font rendering techniques than flash does. This is mainly probably down to the fact that text in flash can be dynamic and be animated. The aliasing used in photoshop probably doesn't cope well under these conditions. Either that, or Adobe don't see any value in implementing font rendering to match Photoshop (unlikely).

I work for a design agency and can't even begin to imagine the amount of times I've had to break it to a designer that their fonts won't look the same in flash as they do in Photoshop. It's something we all just have to deal with.

That said you can often get it close through the techniques @jeremynealbrown states and often that's enough.

like image 32
James Hay Avatar answered Sep 28 '22 07:09

James Hay