Results 1 to 4 of 4
April 12th, 2012, 02:17 PM #1
Font embedding horror [bug]
I am using three fonts of the Helvetica typeface,
embedding them with the embed metatag, font files inside project, openType.
I noticed that for some reason the bold font looks identical to the roman font.
After 4 hours of ____, and testing with five fonts, it turns out that:
if i change the name of all the font files at once, and change the reference to them in the code, all of the fonts work the first time i publish. the second time i publish (without any changes except pressing publish a second time) some fonts overwrite others, randomly, for instance :
roman looks like roman
bold looks like roman,
light looks like roman,
black looks like black,
rounded looks like black.
could be anything, i cant predict what will overwrite what.
the only way i can make sure that flash embeds all of the fonts, is to change *all* of their names and publish.
second time i publish the swf filesize is much smaller than first time ( -flash really doesn't embed anything)
traces to which fonts are registered show all fonts are there,
using distinct fontnames
publishing cache disabled
restart doesn't help
flex 4/air 3 sdk
The problem isn't critical since i found the workaround, but it was/is so annoying, and i'd really be happy if anyone knows what could it be, even if i find out after i finish.
Last edited by magarik; April 12th, 2012 at 03:17 PM. Reason: forgot to subscribe
April 12th, 2012, 04:33 PM #21,391Registered User
i *think* that this is related to the TFLTextFields - are the fields TFLs? if i remember right, there was something about the order of instantiation that isn't quite right/with a generated swc file (?) or something - i think that there is a solution but it's a bit messy - as a result i think most people don't use them, opting for a regular ole classic field instead - save the headache
this one has loads of info
April 12th, 2012, 07:55 PM #3
because it's the same typeface, even thought you've embedded each version (bold, italic, etc) when you set your text try setting:
yourTextField.htmlText = "<b>"+whatever+"</b>";
yourTextField.htmlText = "<i>"+whatever+"</i>";
April 13th, 2012, 12:04 PM #4
Thanks for the replies, but both solutions wont work -
1 i used normal textfields created at runtime
1a size of swf different at export - meaning problem at embed level
2 i used for testing 5 fonts of the same typeface, only one of them was bold and theoretically could be referenced with <b>
i embedded them with unique names, and all as fontweight:normal, fontstyle:normal,
since flash was giving me transcoding error when i tried to declare the bold font as bold
i cant think of anything that could behave this way other than cache related bug, since publishing a 2nd time changes things...
So far i solved it by making a separate swf for fonts, making sure they were allright once, and then i dont touch that swf when i keep working on the main program. still very annoying bug