# How to embed special characters dynamically?

**URL:** https://forum.kirupa.com/t/how-to-embed-special-characters-dynamically/297870
**Category:** flash
**Created:** [October 9, 2009, 2:33pm UTC](https://forum.kirupa.com/t/how-to-embed-special-characters-dynamically/297870 "2009-10-09T14:33:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fjckls](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fjckls](https://forum.kirupa.com/u/fjckls)
#### Post date: [October 9, 2009, 2:33pm UTC](https://forum.kirupa.com/t/how-to-embed-special-characters-dynamically/297870/1 "2009-10-09T14:33:32Z")

</div>

I’ve created dynamic textfield and textformat, I also embedded the fonts but, special characters(like č,ģ,ļ,ķ,ņ) won’t show up, how to embed them? In library I have my specific font with linkage name myFont. Here’s the code :

```php
var myfont:Font = new myFont();

var txtFrmt:TextFormat = new TextFormat();
txtFrmt.font = myfont.fontName; 
txtFrmt.size = 50;
txtFrmt.color = 0x000000;

var txtField:TextField = new TextField();
txtField.x = txtField.y = 60;
txtField.multiline = true;
txtField.embedFonts = true;
txtField.defaultTextFormat = txtFrmt;
txtField.text = "&#310;, &#362;, &#256;, &#274;, &#290;, &#310;, &#315;, &#325;, &#268;, Ž";
addChild(txtField);
txtField.width = txtField.textWidth;

```

From Flash UI I would go to dynamic text properties -\> embed fonts and then manually enter desired special characters. But how to do it with code?  
Seriously I searched a lot and can’t find the answer, surely there must be a way how to do it properly with actionscript.

Any thoughts?  
Thank you.
