Font not showing bullet points
Posted
by Hanpan
on Stack Overflow
See other posts from Stack Overflow
or by Hanpan
Published on 2010-03-08T12:49:53Z
Indexed on
2010/03/08
12:51 UTC
Read the original article
Hit count: 409
I have embedded my font using the embed meta tag, along which the entire range of Unicode characters... here is my CustomTextField class:
[Embed(source='../assets/fonts/Arial.ttf',fontName='CustomFont',fontWeight='regular',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF',
mimeType='application/x-font-truetype'
)]
public static var MY_FONT:Class;
[Embed(source='../assets/fonts/Arial Bold.ttf',fontName='CustomFont',fontWeight='bold',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF',
mimeType='application/x-font-truetype'
)]
public static var MY_FONT_BOLD:Class;
public static const DEFAULT_FONT:String = "CustomFont";
public static const DEFAULT_TEXT_COLOUR:int = 0x000000;
public static const DEFAULT_TEXT_SIZE:int = 14;
private var _tf:TextFormat = new TextFormat(DEFAULT_FONT, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_COLOUR);
public function CustomTextField():void
{
Font.registerFont(CustomTextField.MY_FONT);
Font.registerFont(CustomTextField.MY_FONT_BOLD);
_tf.size = 16;
antiAliasType = AntiAliasType.ADVANCED;
sharpness = 0;
defaultTextFormat = _tf;
autoSize = TextFieldAutoSize.LEFT;
embedFonts = true;
}
public override function set htmlText(value:String):void
{
super.htmlText = value;
setTextFormat(_tf);
}
For some reason, using
Does anyone have any idea as to why Flex is not showing the bullet point characters?
© Stack Overflow or respective owner