lime: lime_font_get_family_name returning gibberish

This is possibly some form of https://github.com/openfl/lime/issues/256

I’m experiencing this on lime 2.4.1

Adding Trace Diagnostics to Font.hx The font is definitely loading but lime_font_get_family_name is returning gibberish.

I get a crash when I first render Text on android and this is where my suspicion is currently aimed. I can’t confirm that this bug is related to the crash when rendering is attempted but it seems a bit fishy given I call up the font by name.

Here’s the output of the traces from the same code on Windows and Android

Windows Output

ont.hx:40: Font created with name null
Font.hx:370: font __fromFile img/Blab.ttf returned 21077344
Font.hx:375: lime_font_get_family_name  on 21077344 returned Bank Gothic Medium BT
Font.hx:377: lime_font_get_ascender  on  21077344  returned +1661
Font.hx:379: lime_font_get_descender  on  21077344  returned -483
Font.hx:381: lime_font_get_height  on  21077344  returned 2144
Font.hx:383: lime_font_get_num_glyphs  on  21077344  returned 260
Font.hx:385: lime_font_get_underline_position  on  21077344  returned -241
Font.hx:387: lime_font_get_underline_thickness  on  21077344  returned 143
Font.hx:389: lime_font_get_units_per_em  on  21077344  returned 2048
Font.hx:392: name char 1 is  97 : 61 
Font.hx:392: name char 0 is  66 : 42 
Font.hx:392: name char 2 is  110 : 6E 
Font.hx:392: name char 3 is  107 : 6B 
Font.hx:392: name char 4 is  32 : 20 
Font.hx:392: name char 5 is  71 : 47 
Font.hx:392: name char 6 is  111 : 6F 
Font.hx:392: name char 7 is  116 : 74 
Font.hx:392: name char 8 is  104 : 68 
Font.hx:392: name char 9 is  105 : 69 
Font.hx:392: name char 10 is  99 : 63 
Font.hx:392: name char 11 is  32 : 20 
Font.hx:392: name char 12 is  77 : 4D 
Font.hx:392: name char 13 is  101 : 65 
Font.hx:392: name char 14 is  100 : 64 
Font.hx:392: name char 15 is  105 : 69 
Font.hx:392: name char 16 is  117 : 75 
Font.hx:392: name char 17 is  109 : 6D 
Font.hx:392: name char 18 is  32 : 20 
Font.hx:392: name char 19 is  66 : 42 
Font.hx:392: name char 20 is  84 : 54 
Font.hx:40: Font created with name null
Font.hx:370: font __fromFile img/Alaska.ttf returned 20315304
Font.hx:375: lime_font_get_family_name  on 20315304 returned Alaska
Font.hx:377: lime_font_get_ascender  on  20315304  returned +2014
Font.hx:379: lime_font_get_descender  on  20315304  returned -512
Font.hx:381: lime_font_get_height  on  20315304  returned 2526
Font.hx:383: lime_font_get_num_glyphs  on  20315304  returned 260
Font.hx:385: lime_font_get_underline_position  on  20315304  returned -460
Font.hx:387: lime_font_get_underline_thickness  on  20315304  returned 104
Font.hx:389: lime_font_get_units_per_em  on  20315304  returned 2048
Font.hx:392: name char 0 is  65 : 41 
Font.hx:392: name char 1 is  108 : 6C 
Font.hx:392: name char 2 is  97 : 61 
Font.hx:392: name char 3 is  115 : 73 
Font.hx:392: name char 4 is  107 : 6B 
Font.hx:392: name char 5 is  97 : 61 
Font.hx:40: Font created with name null
Font.hx:370: font __fromFile img/Alaska.ttf returned 21109392
Font.hx:375: lime_font_get_family_name  on 21109392 returned Alaska
Font.hx:377: lime_font_get_ascender  on  21109392  returned +2014
Font.hx:379: lime_font_get_descender  on  21109392  returned -512
Font.hx:381: lime_font_get_height  on  21109392  returned 2526
Font.hx:383: lime_font_get_num_glyphs  on  21109392  returned 260
Font.hx:385: lime_font_get_underline_position  on  21109392  returned -460
Font.hx:387: lime_font_get_underline_thickness  on  21109392  returned 104
Font.hx:389: lime_font_get_units_per_em  on  21109392  returned 2048
Font.hx:392: name char 0 is  65 : 41 
Font.hx:392: name char 1 is  108 : 6C 
Font.hx:392: name char 2 is  97 : 61 
Font.hx:392: name char 3 is  115 : 73 
Font.hx:392: name char 4 is  107 : 6B 
Font.hx:392: name char 5 is  97 : 61 

Android Output

I/trace   (28317): Font.hx:40: Font created with name null
I/trace   (28317): Font.hx:370: font __fromFile img/Blab.ttf returned 1688800
I/trace   (28317): Font.hx:375: lime_font_get_family_name  on 1688800 returned ????????????????????T????????????????????????????????????9????????????????
I/trace   (28317): Font.hx:377: lime_font_get_ascender  on  1688800  returned +1661
I/trace   (28317): Font.hx:379: lime_font_get_descender  on  1688800  returned -483
I/trace   (28317): Font.hx:381: lime_font_get_height  on  1688800  returned 2144
I/trace   (28317): Font.hx:383: lime_font_get_num_glyphs  on  1688800  returned 260
I/trace   (28317): Font.hx:385: lime_font_get_underline_position  on  1688800  returned -241
I/trace   (28317): Font.hx:387: lime_font_get_underline_thickness  on  1688800  returned 143
I/trace   (28317): Font.hx:389: lime_font_get_units_per_em  on  1688800  returned 2048
I/trace   (28317): Font.hx:392: name char 0 is  251 : FB 
I/trace   (28317): Font.hx:392: name char 1 is  166 : A6 
I/trace   (28317): Font.hx:392: name char 2 is  133 : 85 
I/trace   (28317): Font.hx:392: name char 3 is  130 : 82 
I/trace   (28317): Font.hx:392: name char 4 is  251 : FB 
I/trace   (28317): Font.hx:392: name char 5 is  180 : B4 
I/trace   (28317): Font.hx:392: name char 6 is  156 : 9C 
I/trace   (28317): Font.hx:392: name char 7 is  160 : A0 
I/trace   (28317): Font.hx:392: name char 8 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 9 is  182 : B6 
I/trace   (28317): Font.hx:392: name char 10 is  165 : A5 
I/trace   (28317): Font.hx:392: name char 11 is  168 : A8 
I/trace   (28317): Font.hx:392: name char 12 is  249 : F9 
I/trace   (28317): Font.hx:392: name char 13 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 14 is  149 : 95 
I/trace   (28317): Font.hx:392: name char 15 is  141 : 8D 
I/trace   (28317): Font.hx:392: name char 16 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 17 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 18 is  181 : B5 
I/trace   (28317): Font.hx:392: name char 19 is  181 : B5 
I/trace   (28317): Font.hx:392: name char 20 is  84 : 54 
I/trace   (28317): Font.hx:392: name char 21 is  244 : F4 
I/trace   (28317): Font.hx:392: name char 22 is  159 : 9F 
I/trace   (28317): Font.hx:392: name char 23 is  147 : 93 
I/trace   (28317): Font.hx:392: name char 24 is  184 : B8 
I/trace   (28317): Font.hx:392: name char 25 is  244 : F4 
I/trace   (28317): Font.hx:392: name char 26 is  159 : 9F 
I/trace   (28317): Font.hx:392: name char 27 is  147 : 93 
I/trace   (28317): Font.hx:392: name char 28 is  184 : B8 
I/trace   (28317): Font.hx:392: name char 29 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 30 is  178 : B2 
I/trace   (28317): Font.hx:392: name char 31 is  189 : BD 
I/trace   (28317): Font.hx:392: name char 32 is  176 : B0 
I/trace   (28317): Font.hx:392: name char 33 is  252 : FC 
I/trace   (28317): Font.hx:392: name char 34 is  178 : B2 
I/trace   (28317): Font.hx:392: name char 35 is  185 : B9 
I/trace   (28317): Font.hx:392: name char 36 is  173 : AD 
I/trace   (28317): Font.hx:392: name char 37 is  252 : FC 
I/trace   (28317): Font.hx:392: name char 38 is  183 : B7 
I/trace   (28317): Font.hx:392: name char 39 is  141 : 8D 
I/trace   (28317): Font.hx:392: name char 40 is  161 : A1 
I/trace   (28317): Font.hx:392: name char 41 is  251 : FB 
I/trace   (28317): Font.hx:392: name char 42 is  183 : B7 
I/trace   (28317): Font.hx:392: name char 43 is  141 : 8D 
I/trace   (28317): Font.hx:392: name char 44 is  180 : B4 
I/trace   (28317): Font.hx:392: name char 45 is  251 : FB 
I/trace   (28317): Font.hx:392: name char 46 is  182 : B6 
I/trace   (28317): Font.hx:392: name char 47 is  157 : 9D 
I/trace   (28317): Font.hx:392: name char 48 is  173 : AD 
I/trace   (28317): Font.hx:392: name char 49 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 50 is  166 : A6 
I/trace   (28317): Font.hx:392: name char 51 is  133 : 85 
I/trace   (28317): Font.hx:392: name char 52 is  172 : AC 
I/trace   (28317): Font.hx:392: name char 53 is  249 : F9 
I/trace   (28317): Font.hx:392: name char 54 is  167 : A7 
I/trace   (28317): Font.hx:392: name char 55 is  145 : 91 
I/trace   (28317): Font.hx:392: name char 56 is  180 : B4 
I/trace   (28317): Font.hx:392: name char 57 is  57 : 39 
I/trace   (28317): Font.hx:392: name char 58 is  244 : F4 
I/trace   (28317): Font.hx:392: name char 59 is  159 : 9F 
I/trace   (28317): Font.hx:392: name char 60 is  147 : 93 
I/trace   (28317): Font.hx:392: name char 61 is  144 : 90 
I/trace   (28317): Font.hx:392: name char 62 is  244 : F4 
I/trace   (28317): Font.hx:392: name char 63 is  191 : BF 
I/trace   (28317): Font.hx:392: name char 64 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 65 is  136 : 88 
I/trace   (28317): Font.hx:392: name char 66 is  252 : FC 
I/trace   (28317): Font.hx:392: name char 67 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 68 is  165 : A5 
I/trace   (28317): Font.hx:392: name char 69 is  186 : BA 
I/trace   (28317): Font.hx:392: name char 70 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 71 is  150 : 96 
I/trace   (28317): Font.hx:392: name char 72 is  144 : 90 
I/trace   (28317): Font.hx:392: name char 73 is  175 : AF 
I/trace   (28317): Font.hx:392: name char 74 is  252 : FC 
I/trace   (28317): Font.hx:392: name char 75 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 76 is  165 : A5 
I/trace   (28317): Font.hx:392: name char 77 is  186 : BA 
I/trace   (28317): Font.hx:40: Font created with name null
I/trace   (28317): Font.hx:370: font __fromFile img/Alaska.ttf returned 1594648
I/trace   (28317): Font.hx:375: lime_font_get_family_name  on 1594648 returned ????????
I/trace   (28317): Font.hx:377: lime_font_get_ascender  on  1594648  returned +2014
I/trace   (28317): Font.hx:379: lime_font_get_descender  on  1594648  returned -512
I/trace   (28317): Font.hx:381: lime_font_get_height  on  1594648  returned 2526
I/trace   (28317): Font.hx:383: lime_font_get_num_glyphs  on  1594648  returned 260
I/trace   (28317): Font.hx:385: lime_font_get_underline_position  on  1594648  returned -460
I/trace   (28317): Font.hx:387: lime_font_get_underline_thickness  on  1594648  returned 104
I/trace   (28317): Font.hx:389: lime_font_get_units_per_em  on  1594648  returned 2048
I/trace   (28317): Font.hx:392: name char 0 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 1 is  150 : 96 
I/trace   (28317): Font.hx:392: name char 2 is  177 : B1 
I/trace   (28317): Font.hx:392: name char 3 is  129 : 81 
I/trace   (28317): Font.hx:392: name char 4 is  247 : F7 
I/trace   (28317): Font.hx:392: name char 5 is  166 : A6 
I/trace   (28317): Font.hx:392: name char 6 is  133 : 85 
I/trace   (28317): Font.hx:392: name char 7 is  171 : AB 
I/trace   (28317): Font.hx:40: Font created with name null
I/trace   (28317): Font.hx:370: font __fromFile img/Alaska.ttf returned 1796560
I/trace   (28317): Font.hx:375: lime_font_get_family_name  on 1796560 returned ????????
I/trace   (28317): Font.hx:377: lime_font_get_ascender  on  1796560  returned +2014
I/trace   (28317): Font.hx:379: lime_font_get_descender  on  1796560  returned -512
I/trace   (28317): Font.hx:381: lime_font_get_height  on  1796560  returned 2526
I/trace   (28317): Font.hx:383: lime_font_get_num_glyphs  on  1796560  returned 260
I/trace   (28317): Font.hx:385: lime_font_get_underline_position  on  1796560  returned -460
I/trace   (28317): Font.hx:387: lime_font_get_underline_thickness  on  1796560  returned 104
I/trace   (28317): Font.hx:389: lime_font_get_units_per_em  on  1796560  returned 2048
I/trace   (28317): Font.hx:392: name char 0 is  248 : F8 
I/trace   (28317): Font.hx:392: name char 1 is  150 : 96 
I/trace   (28317): Font.hx:392: name char 2 is  177 : B1 
I/trace   (28317): Font.hx:392: name char 3 is  129 : 81 
I/trace   (28317): Font.hx:392: name char 4 is  240 : F0 
I/trace   (28317): Font.hx:392: name char 5 is  134 : 86 
I/trace   (28317): Font.hx:392: name char 6 is  133 : 85 
I/trace   (28317): Font.hx:392: name char 7 is  171 : AB 

Note that the other font metrics showing height, num_glyphs etc. are the same in both versions indicating that the fonts appear to have been found and loaded correctly.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@jgranick Could you specify what NDK version you’re using? Because it’s still a problem until now.