-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texts are slightly cut on the right on native platforms (NME) #395
Comments
Rendering and measuring of the text for flash and NME is done here : The "getBimap" method draws a native flash/NME TextField onto a flash/NME BitmapData, which is then used to draw text during the document's rendering. In this same class, you can see "get_width" return the width of the native flash/NME TextField, which seems to be too small for NME, explaining the crop. I'd suggest measuring "textWidth" for the same word in flash and NME and see if it's different. I'll also look in 'getBitmap" at the part offsetting flash player "gutter" for the text field (see line 83). Maybe it shouldn't be applied for NME. |
There is another class dealing with font measurement but it takes care of vertical measurement and is unlikely to be responsible for your bug : |
I've tried to change some values here and there, but the crop is still here. |
Ok, I assume you tried to augment the witdth of the BitmapData, Maybe its the styling of the text, is it in italic or something like this ? |
Yes, I've tried to change width, offset (_matrix), etc but it's still cropped. |
Do you have the same bug when the text is regular (not bold) ? 2014/1/17 Clément Charmet [email protected]
|
I don't really know where to start investigating.
It seems on NME, the dimensions of the texts are not correctly measured, and thus the draw surface is slightly too small.
The text was updated successfully, but these errors were encountered: