FontManager + HTML TextField

3 views
Skip to first unread message

alacasse

unread,
Sep 10, 2009, 2:36:20 PM9/10/09
to masapi
Salut,

Je suis confronté à un problème avec des polices chargées
dynamiquement et un textfield en HTML qui peut comprendre du texte
normal, bold, italic ou bold italic. Le FontManager fonctionne bien
quand c'est des Textfield dynamic avec un seul style, mais quand il
faut combiner du texte dans un même textField c'est plus compliqué.

J'enregistre la même police 2 fois, une fois normal et une fois avec
l'option bold.

FontsManager.register("cmv.fron.EurostileExtendedTwo",
"EurostileExtendedTwo__b");
FontsManager.register("cmv.fron.EurostileExtendedTwo",
"EurostileExtendedTwo");

tmpTextfield.htmlText = "Bienvenue <b>Bienvenue</b>";

Cette ligne ne fonctionne pas, je n'ai pas le bold.
font = FontsManager.getFont( "EurostileExtendedTwo" );
font.applyFormat( tmpTextfield );

Si j'essaie de mettre le vrai nom de la police dans un setFormat
manuel non plus, donc si quelqu'un connait un moyen pour remédier à ce
problème, je suis preneur.

Merci
Reply all
Reply to author
Forward
0 new messages