rendering text in flash
- Started
- Last post
- 14 Responses
- uan
how do I achive a clean rendered font (its a light one) in an swf.
I'm checking the position (full-pixel), and the anti-aliasign methods.
The problem is, it looks totally different on mac and pc, and on different browsers too (chrome, ie).
has any1 come across a tutorial, howto, article that explains why this happens, where I could get more knowledge?
I'm using flash8, would 9 or 10 render the fonts better?
- Fariska0
flash 8, if i remember correctly is the first which supports advanced anti aliasing for text fields. which is the key for your problem:
create a text field (even static), switch its rendering to advanced, fine tune it and write down the cutoff values you get.
now, this is an AS3 implementation of the
textRenderer.setAdvancedAntiAlia...
but in as2 is pretty much the same:
http://pastebin.com/m392707fa- another example: http://www.actionscr…Fariska
- I was just reading about that at adobe. I will make some tests. thanks for the class!uan
- fyoucher10
Do the typical even integer position, aliase settings etc etc...Then what I do is manually go back in and resize the font slightly, either horizontally, vertically, or both (0.1% at a time, re-export, and check). Most of the time the font will clear up. If you're using dynamic text, just scale it down to that percentage. This works with a lot of fonts, not all though. However, light fonts can sometimes be a bit too thin.
If you're using dynamic text and embedding the fonts it should look the same on all browsers/OS's.
- WOPR0
if you want pristine type w/full control - create your textfields from scratch with AS - you will have 100% control of everything from kerning to leading... anti-aliasing etc...
I'd advise exporting whatever fonts you use via the library so they're available at runtime... you have a TON of options when you do these two things (exports fonts for runtime via the library & create textfields from scratch via a.s.)... most folks don't know you can even use multiple font faces in the same text field when you go the all-dynamic route. :)
- uan0
thank you all for the support!
I will build a test file to compare all this methods, hopefully tomorrow, today I have to solve other issues:/btw, this kind of professional support is what makes qbn worth visiting!
- skt0
'if you want pristine type w/full control - create your textfields from scratch with AS - you will have 100% control of everything from kerning to leading... anti-aliasing etc...
I'd advise exporting whatever fonts you use via the library so they're available at runtime... you have a TON of options when you do these two things (exports fonts for runtime via the library & create textfields from scratch via a.s.)... most folks don't know you can even use multiple font faces in the same text field when you go the all-dynamic route. :) ''
none of this stops flash from rendering certain fonts badly though.
- that's where the custom-anti-alias come in handyFariska
- you can custom anti-alias type that's dynamically created... my point was you have even more options via a.s...PonyBoy
- ... but i agree... you can't get 'perfect' aliasing in Flash... this is just the 'best' route I've found.PonyBoy
- (i'm wopr... sorry)PonyBoy
- (i know :-) )Fariska
- PonyBoy0
^^ I left out that there is no definite method of getting 'perfect' type in Flash... I only meant that dynamically created textfields have even more options than those drawn on the timeline...
... I advise if you're going to design / A.D. for a Flash project that you sit down and test your chosen fonts in Flash first... just to be sure (I've only started doing this myself)...
- skt0
yeah, custom aliasing can fix certain things, but say you are using a small serif, light on a dark background, you thicken it up a little, then sharpen with your custom settings making sure you have your ascenders snapped to pixel, everything is coming out looking nice and crisp, so far so good.
Then you add an italic and you have a dirty great mess in the middle of your text field.
I hate flash.
- that's why i say test your type ahead of time... or...
... export all your type as big dirty png files. :)PonyBoy
- that's why i say test your type ahead of time... or...
- Fariska0
the text renderer anti alias table is for that purpose skt:
for each font (and even style) at a certain size you specify the custom anti alias parameters like here:
var antiAlias1:CSMSettings = new CSMSettings (10, 0.4, -0.53)
^^ this is for size 10,
and you can add as many sizes as you wish.
- skt0
really fariska, i need to look into this...
so if i'm bringing in styled html, i can have differemt alias settings for my italics? this would be a massive help. where can i find out more?
- Fariska0
See the links i posted above, especially the one on actionscript.org
It's a quite undocumented feature of flash, but a very useful one.
Not sure about html text, but most likely yes.I should pull together a brief tut/explanation about that. is pretty straightforward once you get it.
- nice one fariska, cheers. shame the project i'm looking at is as2...skt
- creez0
here is the adobe doc about it:
http://help.adobe.com/en_US/AS3L…
interesting.