weimingtom / nekonme

Automatically exported from code.google.com/p/nekonme
0 stars 0 forks source link

Font rendering bugs on iOS #267

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

var _font:Font = Assets.getFont( "assets/fonts/FreebooterUpdated.ttf" );
var _textFormat:TextFormat = new TextFormat( _font.fontName, 12, 0xdd0000 );
//_textFormat.bold = true;

var textfield:TextField = new TextField();
textfield.embedFonts = true;
textfield.width = 480;
textfield.height = 100;
textfield.text = "Testing text ABCDEFGHIJKLMNOPQRSTUVWXYZ";
textfield.setTextFormat(_textFormat);
addChild(textfield);

What is the expected output? What do you see instead?

I expect the text in the TextField to display in its embedded font, but...

1. If I set the TextFormat's size to exactly 12, the text in the TextField 
appears in its default font, not the embedded font.  (All other sizes I tested 
worked properly.)

2. If I set the 'bold' property on the TextFormat object, the text will not 
appear at all.

What version of the product are you using? On what operating system?

NME 3.4.3 / iOS 4.2.1

Please provide any additional information below.

Not sure if the problem is with the Font object, the TextFormat object, or the 
TextField object. :(

Original issue reported on code.google.com by nmccr...@gmail.com on 5 Oct 2012 at 3:22

Attachments: