Skip to main content
Participating Frequently
May 23, 2014
Question

tlftextfield tlfmarkup

  • May 23, 2014
  • 0 replies
  • 131 views

I am attempting to use several fonts in a tlftextfield with the markup property.  Here is the significan portion of the markup:

<span  fontFamily='Symbol' fontSize='14' renderingMode='embedded_cff' >q</span>. = _myUtilities.tfparse(_problemXML.question);  //_problemXML.question

The AS3 code associated with this textfield is:

_myQuestion = new TLFTextField();

  addChild(_myQuestion);

  //_myQuestion.embedFonts = true

  _myQuestion.defaultTextFormat = _standardFormat;

  _myUtilities.setTxtFormat = _standardFormat;

  _myQuestion.wordWrap = true;

  _myQuestion.autoSize = TextFieldAutoSize.LEFT;

  _myQuestion.width = 365;

  _myQuestion.x = 5;

  _myQuestion.y = 5;

  _myQuestion.tlfMarkup = _myUtilities.tfparse(_problemXML.question);  //_problemXML.question;

  _myQuestion.multiline = true;

I have loaded the Symbol font into the library and assigned it to the Symbol class.

When I compile and run my script the font from the markup reverts back to the system font, New Times Roman.  I have several other fonts that use the same markup and work perfectly.  Specifically Arial.  It seems that somehow, I have not loaded the Symbol font properly or need to take some additional action to get it to work.

All suggestions are appreciated.

BTW: When I uncomment the embedFonts line, things really get jerky.

This topic has been closed for replies.