[SOLVED] Font problem when exporting to flash under linux



  • Hi everyone,

    I'm mostly working under linux and I have a font problem when I export my project to flash target.
    On linux, each time I build my game (flash release), I get something different and it's completly random: Sometime, both the fonts I'm using will show up in the game, sometime only one or the other, but most of the time I will have no fonts at all. The missing fonts are replaced by the default nokia font.
    I've tried this with several computers under different linux versions, and also different fonts: it's always the same random result.
    But when I compile under windows, everything is fine... Building Android target under linux is also fine. I don't know what's happening with flash...

    I'm loading the font like this:
    title.setFormat("assets/fonts/EPSON-MARUGO.ttf", Util.textSize(30), Util.BLACK, "center");

    Does anyone have ever experienced that problem?
    Thanks for your hints! (and nice new forum y the way)



  • @Txori Is your version of flash up to date? Also run neko test flash -verbose to see what files are being embedded each time, and note what changes when you get the error next



  • Hi @Brandon-R and thanks for your time.

    I have the latest flash version installed (21.0.0.242) and all the haxeflixel libs are up to date.
    Once the swf is build under linux, I've tried reading it with chrome, with flashplayer_11_debugger linux player and with flashplayer_18_sa_debug.exe under Windows. The problem definitly comes from the exported swf.

    I've tried neko test flash -verbose without result. I'm not sure what I'm doing here... But thanks for giving me idea to look inside the swf :)
    So after some research I used (a scarry tool) JPEXS free flash decompiler to discover that all the fonts are correctly embeded. What I discover though is that when both fonts appears, they have the same name: EPSON. But when the font are messy, the missing ones have a different name for each different build (EPSON ƚ� , EPSON ��������󐸗����ⵖPP ...)

    After some dig up using FontForge, it seems that the two fonts I'm using have some japanese characters inside their family name that are readable under Windows, but not under linux. So I renamed them and now everything is fine.

    PROBEM SOLVED !

    By the way, I've also seen that both haxeflixel basic fonts are exported inside the release build, even though I don't use them (Nokia Cellphone FC Small and Monsterrat). Is there a way to avoir that in order to free up some octets? Or how should I access Monsterrat for my buttons (since it's almost the same font as the Verdana I'm using)?

    Thanks


  • administrators

    There's no good way to exclude the default fonts right now, they're pretty hardwired in Flixel. They don't take up that much space, so I'm not sure it's really a big concern.

    You can access the font names through FlxAssets.FONT_DEBUGGER and FlxAssets.FONT_DEFAULT: http://api.haxeflixel.com/flixel/system/FlxAssets.html



  • All right. Good to know.
    Thanks everyone :)


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.