问题
Basically, if I leave the text as-is, I get this:
As you can see, there is more text overflowing, so if I hit END on my keyboard, it does what TextField usually does and moves to the end with a little extra gap to show as such. Only, in this case the text is blurred:
Why is this happening?
Here is the embedded custom font:
[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;
And here is the actual TextField code:
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;
Any thoughts?
回答1:
Try this:
_textField.antiAliasType=flash.text.AntiAliasType.ADVANCED;
_textField.gridFitType=flash.text.GridFitType.PIXEL;
The manual says this makes your text field align its display with pixel grid of the monitor, meaning that pressing "End" will not result in a blur anymore.
来源:https://stackoverflow.com/questions/17687207/blurred-bitmap-embedded-text-when-scrolling-in-textfield-flash-as3