--
You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To post to this group, send email to object...@googlegroups.com.
To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/objecthandles?hl=en.
To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
}
i m providing user to enter text in a text area..and on the textarea
change event, i am creating a text area dynamically and adding it to
the objecthandle object simultaneously .as the user keep on entering
text the.text is being further added to that dynamic text area on n
on. Now as this work of entering text is complete now user has the
option to set the style of text by pressing bold,italic,underline
button respectively.further is the combobox provided for fontstyle..i
bind an array of filled fonts to the combobox dataprovider..
<mx:Application creationComplete="init()"
the following function is called in the init function that is further
called in on creationComplete as above:-
which fills the arrFontFamily and i have assigned this array to
dataprovider
private function InitializeFonts():void
{
var _arrFonts:Array=Font.enumerateFonts(true);
for each(var fontobj:Font in _arrFonts)
{
_arrFontFamily.push(fontobj.fontName);
}
_arrFontFamily.sort();
}
Now as the user after selecting font and bold or italic etc, rotate
the object handler to rotate the text box in it.the font disappears..
Then i followed the approach u guys told me of embedding the fonts..so
i selected those fonts only which have all these
style available ..consider the following example of verdana that i am
embedding in the fontcss file and declared the css under application
tag
@font-face{
font-family: "test";
src: url("Assets/fonts/verdana.ttf");
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: "test";
src: url("Assets/fonts/verdanab.ttf");
font-weight: bold;
font-style: normal;
}
@font-face{
font-family: "test";
src: url("Assets/fonts/verdanai.ttf");
font-weight: normal;
font-style: italic;
}
@font-face{
font-family: "test";
src: url("Assets/fonts/verdanaz.ttf");
font-weight: bold;
font-style: italic;
}
Now four fonts are added to the arrFontFamily of name test..
then i started the second approach:--
As four fonts of same name" test" were coming in the combobox so,Then
i hardcoded the array with names of the fonts i am embedding smthing
lik this ,
private var _arrFontFamily:Array=new Array("Verdana",etc);
i put all the ttf files that supports bold/normal ,bold/
italic ,normal/italic ,normal/normal in a folder name fonts under
assets
src: url("Assets/fonts/verdanaz.ttf");
like verdana arial and Rockwell etc. not tahoma as it create problem
when user rotates the textbox..as we dont have italic for tahoma.
After this approach the problem of disappearing text was solved,but,
the compilation time got increased ..then..i used the swf...from the
fontSwf folder and added the folder under assets and used it in the
css..
@font-face{
font-family: "Verdana";
src: url("Assets/fontSwf/verdana.swf");
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: "Verdana";
src: url("Assets/fontSwf/verdanab.swf");
font-weight: bold;
font-style: normal;
}
but it gives error:-
font 'Verdana' with bold weight and regular style not found
Unable to transcode Assets/fontSwf/verdanab.swf.
So can u please put a light on it..or there is something other then
this via which this issue can be solved
Well i found the solution for the slow compilation time ..check out
the video on this link..
http://www.axelscript.com/2008/10/03/improving-compile-times-with-runtime-css/
my compilation problem is solved