Font clipped in Android

42 views
Skip to first unread message

Robert Flesch

unread,
Dec 6, 2012, 11:42:25 AM12/6/12
to haxe...@googlegroups.com
I am experiencing some clipping of the top pixels of a font (sometimes) when compiling to Android, works perfectly in Flash.
The same code generates the one tab, or the many, so the position, formatting, is all the same.
I have tried changing the position of the text, but the clipping occurs no matter where the text is located.

I am creating a TextField, adding it to a sprite and setting the format.

This really bugs me, and I have spent too many hours trying to figure out what is up.

Anyone else see this ever?

bob
clippedFont.jpg

Achmad Aulia Noorhakim

unread,
Dec 6, 2012, 10:41:57 PM12/6/12
to haxe...@googlegroups.com

Try using different font. I think its because NME can't render the characters correctly using that font.

j...@justinfront.net

unread,
Dec 6, 2012, 11:47:10 PM12/6/12
to haxe...@googlegroups.com
You can try exporting the font symbols with hxswfml and create the textfields by hand.

Robert Flesch

unread,
Dec 7, 2012, 11:42:25 AM12/7/12
to haxe...@googlegroups.com
Achmad thank for the suggestion, but I would think that if NME cant render that font correctly, then the smaller tabs would have a similar problem. 
But I will try changing my font and see if that effects anything. I suspect this is a bug in NME or Haxe code.


Robert Flesch

unread,
Dec 7, 2012, 11:48:41 AM12/7/12
to haxe...@googlegroups.com
I am unfamiliar with the hxswfml project. A quick glance at the project reveal nothing useful.
What does it do, and how would it change the output of the Android code?

Robert Flesch

unread,
Dec 7, 2012, 1:01:47 PM12/7/12
to haxe...@googlegroups.com
Problem sort of found.

The TextField was being added to the tab sprite via addChild
And the tab sprite was being scaled.
The scaling of the tab sprite effects the children, in this case the TextField.
And was scaling it in some way that the font got clipped by the scaling.

Solution was to separate the TextField from the Sprite.

Reply all
Reply to author
Forward
0 new messages