Skip to main content
Participant
June 4, 2011
Question

Adobe air 2.6 gpu font scaled down

  • June 4, 2011
  • 1 reply
  • 617 views

Hi,

When i use the gpu to publish my adobe air 2.6 ios project, when i run it on iphone the font in the texfields is scale down twice is size, but online on the first time that i run the application, when i enter on differents area the font size is normal.

Anyone knows why is doing that?

Thanks,

Nuno

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
June 4, 2011

It may be related, sometimes text input become very large when you're entering text. The solution to that is to not embed fonts, and to use _sans. Then the system takes care of making it look nice.

Participant
June 24, 2011

I've got the same problem. When compiling my application for iPad, input TextFields changes its size on Fokus. (Back on Fokus out).

If i dont set 'embedFonts' it works. Anyone got an idea to fix the problem for embeded Fonts?

Thx Sascha

relaxatraja
Inspiring
June 24, 2011

another workaround here from some other thread::

import flash.text.TextFormat;

import flash.text.TextField;

import flash.events.FocusEvent;

var tf: TextField = myText as TextField;

tf.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);

tf.addEventListener(FocusEvent.FOCUS_OUT, onFocusOut);

tf.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,  onFocusOut);

function onFocusIn(e: FocusEvent) {

    var myFormat:TextFormat = myText.getTextFormat();

    myFormat.size = 6;

    myText.defaultTextFormat = myFormat;

    myText.setTextFormat(myFormat);

}

function onFocusOut(e: FocusEvent) {  

    var myFormat:TextFormat = myText.getTextFormat();

    myFormat.size = 14;

    myText.defaultTextFormat = myFormat;

    myText.setTextFormat(myFormat);}

I set the textsize smaller than normal, and restore the size when  it lost focus.