I have a big problem with text right now.
Since last iOs update (8.2 12D508) my texts don’t show anymore.
Things as simple as :
var text : Textfield = new Textfield();
text.defaultTextFormat = new Textformat("Arial", 20, 0x0066ff);
text.text = "blablabla";
don’t show anything
A lot of my in production games are affected, no text visible at all
I’ll try to update to last Lime, but I’m not sure I should update openfl to last beta yet. as I use a lot of extensions and it seems this part isn’t ready yet ? (no Lib.load / jni)
What can I do to show text again ? I don’t even have an error message when creating a textformat :’(
edit : tested more and actually even a simple textfield with no style doesn’t show anything.
Textfields without textformat set work fine? Have you tried setting embedFonts on textfield to true?
Try pairing Lime 2.3 with OpenFL 3.0.0-beta.3, or using an older Lime (2.1 or 2.2) with OpenFL 2.2.8
Your extensions and things should work fine with the beta, so long as you use -Dlegacy when building
Oh yeah, I forgot the -Dlegacy , sorry.
Well I tried that but unfortunately I have a linker error with SDLUiKitDelegate postFinishLaunch .
I’m still struggling with my text showing problem.
I made a test project with nothing but this :
var textfield = new Textfield();
textfield.text = "test";
and nothing shows up :’(
I used last lime (2.3) and last openfl (3 beta.3) in legacy mode.
Nobody else has the issue ?
edit : okay, build without -Dlegacy and now I have a runtime error after lime_font_load . After some googling it seems iOs 8.2 moved the font directory. So i guess my issue is related to the fact that lime can’t found default font anymore. Using embeded font may so temporary fix my issue as hcwdikk suggested.
edit2 : yep, just adding the used font in assets solved the issue. So i guess lime can’t found system fonts anymore on iOs.
edit3: btw it seems this iOs update is live since march 9th, I’m really surprised nobody had this issue .
In the newer code, it looks here for _sans fonts:
fontList = [ systemFontDirectory + "/Arial Black.ttf", systemFontDirectory + "/Arial.ttf", systemFontDirectory + "/Helvetica.ttf" ];
systemFontDirectory value is equal to /System/Library/Fonts/Cache
What should this be for 8.2?
Well, it seems that people using unity had a related issue.
Unity solved this by looking for fonts in those directory :
- “/System/Library/Fonts/Cache” // before iOS 8.2
- “/System/Library/Fonts/AppFonts” // iOS 8.2
- “/System/Library/Fonts/Core” // iOS 8.2
- “/System/Library/Fonts/Extra” // iOS 8.2
I’d like to find a changelog in iOs release about those font change but all I found isa thread about missing charactere in unity 4.3 :
Ugh, multiple directories. Alright, we’ll have to do something
Better late than never - I’ve submitted a pull request for fixing this bug in legacy lime.
Not looked at modern yet, as my current projects are still all legacy dependent.