Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

tlftextfield tlfmarkup

New Here ,
May 23, 2014 May 23, 2014

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.

TOPICS
ActionScript
112
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation