在TextField中滚动时,位图/嵌入文本是否模糊? (闪光灯/ AS3)

时间:2013-07-16 21:20:09

标签: actionscript-3 textfield flash flashdevelop

基本上,如果我按原样保留文本,我会得到:

Screen grab

正如你所看到的,还有更多的文字溢出,所以如果我在键盘上点击 END ,它会执行TextField通常所做的操作并移动到最后,并带有一点额外的间隙来显示。仅在这种情况下,文字模糊不清:

Screen grab 2

为什么会这样?

以下是嵌入式自定义字体:

[Embed(source = "../../../assets/font/FleftexYC_bold.ttf", 
    fontFamily      = "FleftexYC", 
    fontStyle       = "normal", // normal|italic
    fontWeight      = "bold",  // normal|bold
    unicodeRange    = "U+0020-007E,U+00A3", 
    embedAsCFF      = "false"
)]
private static const _FleftexYC_bold:Class;

这是实际的TextField代码:

this._textField = new TextField();
this._textField.defaultTextFormat = new TextFormat("FleftexYC", 8, 0x000000, true);
this._textField.embedFonts = true;
this._textField.height = 13;
this._textField.type = TextFieldType.INPUT;
this._textField.x = 9;
this._textField.y = 7;

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

试试这个:

_textField.antiAliasType=flash.text.AntiAliasType.ADVANCED;
_textField.gridFitType=flash.text.GridFitType.PIXEL;

The manual表示这会使您的文本字段与显示器的像素网格对齐,这意味着按“结束”不会再导致模糊。