-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Latest Lime 2.0.0-alpha6 doesn't render text on Android #256
Comments
I have just released new Lime and OpenFL releases, which make changes to how font names are handled. In the past, the font name depended on the target platform. On some, it would expect a file path, on others (like Flash) it would expect the font name. Now, it should expect the font name everywhere. I did some tests with Flixel, and the fonts were working properly with this release. Please let me know if you have issues, and if you do, whether it occurs with specific Flixel projects, or on specific platforms |
I've made some test with the latest HaxeFlixel and Lime (alpha 6). |
From what I can see, HaxeFlixel is embedding its default font, ie: a The Note: I have tried again with Alpha 7, problem still persists. Maybe font registration via class is broken? |
Interesting that it occurs only on Android. If you include the font manually, does looking up the font by name work on Android? |
I'll repost a comment I've made in another Issue (I should've posted here in the first place): Ok... I've done some testing on the font issue... without any clear results, but I'll try to explain what I did to give you some hints. Here's the code:
...
trace(font.fontName) gave me different results:
Ok. Hope it helps. |
Yep, I'm facing this issue with the android target too.
Can we please get this back by default for the android target?
This workaround does not appear to work for me. |
Newer versions,
|
Same problem here. actuate: [1.7.5] |
I'm having trouble differentiating between what might be a Flixel-specific issue, and what generally occurs, say, in AddingText. I just resolved an issue with AddingText on HTML5, it works properly on the deskop, and when last tested, worked in Android, but I can test there again |
I just tried a vanilla AddingText sample on Android, working fine, so I'm going to go ahead and close the issue. Please feel free to open a new issue if there is a specific case that fails in a vanilla OpenFL project |
I don't think it's a Flixel-specific issue (I don't use Flixel). I think is something that happens when you embed fonts with @:font and then use Font.registerFont Basically, if you change Main.hx of AddingText for this code, text doesn't render on android. You have to click several times for the text to appear, and trace(font.fontName) always returns garbage:
|
I suppose this has to be reopened .... |
This is working for me, but maybe it was related to a later commit |
I just needed to make sure that I used a path that existed, for example, I copied the font file to "KatamotzIkasi-2.ttf" (outside the Assets directory, to be sure it wasn't using the copied file reference) and used that for the path. If it is in the Assets directory, it should be capitalized since the Haxe macros use exact file paths, not "rename" paths from the XML (that won't affect Windows machines, but would Mac or Linux systems that are case-sensitive) |
I started having problems on cpp/mac with some fonts at specific sizes and just setting embedFonts to false got rid of my problems. I know it's not a solution but maybe a clue as to what is going on deeper inside of lime. |
I recently pulled a new TextField implementation from the NME project, perhaps that fixed it (or it was still font related), it used to use the "renderBitmap" C++ call to render, but now uses drawTiles internally, which fixed rotation and maybe this type of issue |
Still happening to me with: I tested it on a Samsung Galaxy Note 10.1 2014 and Galaxy S2. Here's my sample project with font embedding if anyone wants to try it. The idea is that the text should appear once you click on the screen the first time. On some rare cases that happens, but normally you have to click a lot of times before the text appears (remember to close the app between tries). Also, if you test it with "lime test....", you can see on the console output that every time you click, instead of seeing the name of the font, this kind of string gets printed: ????????????楳 |
Im getting this issue too on latest Lime + Openfl from haxelib. fontName prints "????????????????????????????" |
@DanielUranga Does the same font work on the desktop? Is it all fonts, or only a specific one that has this behavior? |
Same font works on desktop. The problem occurs when using StablexUI with the Android4 theme, or when trying to load a custom ttf with the @:font metadata + fontName. Using font "Arial" works both in desktop and Android. Related: RealyUniqueName/StablexUI#176 |
I've just updated my OpenFL to 2.1.4 and Lime to 2.0.0-alpha6, now text rendering is broken in Android.
Previously I was using OpenFL 2.1.3 and Lime-2.0.0-alpha. Downgrading my Lime build appears to solved the issue.
I'm not able to give a really detailed report, but I am using HaxeFlixel and all FlxText no longer appears.
Update: Issue is still present on alpha 5, but alpha 2, 3 and 4 are okay.
The text was updated successfully, but these errors were encountered: