I'm building a Flash ad that uses the Neo Sans font, the text that is shows contains the Euro symbol, but I can get the Euro symbol to show. This is how I'm embedding the font:
[Embed(source='C:/WINDOWS/Fonts/NeoSans Medium.otf', fontFamily='_NeoSansMedium', embedAsCFF='false', mimeType="application/x-font", unicodeRange="U+20AC")]
public static var _NeoSansMedium:Class;
As you can see I'm using the unicodeRange to try to show the Euro symbol, but still it is not showing up.
This is how I'm using this embedded font:
var subPriceFormat:TextFormat = new TextFormat();
subPriceFormat.font = "_NeoSansMedium";
subPriceFormat.size = 40;
subPriceFormat.letterSpacing = 0;
subPriceFormat.color = 0xdc1开发者_开发百科88c;
var testFont:TextField = new TextField();
testFont.type = TextFieldType.DYNAMIC;
testFont.defaultTextFormat = subPriceFormat;
testFont.selectable = false;
testFont.multiline = false;
testFont.embedFonts = false;
testFont.width = 400;
testFont.text = "£31,90sdfsdf €";
trace(testFont.text);
addChild(testFont);
How can I check that this font supports the Euro symbol, and is the unicodeRange the reason the Euro symbol is not being displayed?
Thanks
Stephen
if you already blow up your swf by embedding a font, you should use it as well, so set
embedFont = true;
also make sure you include the correct unicode-range, a good tool is http://inspiritgames.com/blog/2010/09/unicode-range-generator-for-as3/
精彩评论