PDA

View Full Version : embed and share fonts + use external css



magarik
March 8th, 2009, 08:37 PM
hello kind people

in a project of mine, for the sake of dynamism and aiming at smaller file size, i am trying to make a shared font library that all other swfs can use, and at the same time control the externally loaded texts with an external css file.

i have run into several different problems and difficulties...

1) i cant get the textfield to regard <p>,<br/> tags unless i set the textformat of a textfield after i have set it's htmlText (why?). that wouldnt be a problem, but i cant use css and textformat at the same time,
and if i just set the css instead of the textFormat, the tags are ignored.

2) i have looked and looked and haven't found any guide or post on how to reference a runtime embedded font in an external css (which i have to do if i drop textFormat).

would be very grateful for any help on the matter,
michael

.ral:cr
March 8th, 2009, 09:36 PM
i don't see any problem in setting fomat and style in the same time.
this is for haxe, but you can read the code for shure, it's a class that manages formats, styles and external fonts: http://ralcr.com/classes/fontmanager/

jo3.14
March 25th, 2009, 01:35 PM
1) i cant get the textfield to regard <p>,<br/> tags unless i set the textformat of a textfield after i have set it's htmlText (why?). that wouldnt be a problem, but i cant use css and textformat at the same time,
and if i just set the css instead of the textFormat, the tags are ignored.


i have this exact same problem. it has to do with embedding fonts versus using a style sheet of machine fonts. i have yet to find solution.