comparison nuklear_ui/sfnt.c @ 1559:098c11aaf8f0

Fix silly bug in handling of Mac Roman font names. Make Mac font search more exhaustive if the faster prefix check fails. Added a bunch of debug printfs in case those aren't sufficient to get things working on other machines
author Michael Pavone <pavone@retrodev.com>
date Wed, 04 Apr 2018 00:01:17 -0700
parents 4f6e8acd7b6a
children 369a52e302e2
comparison
equal deleted inserted replaced
1558:55d357bb4398 1559:098c11aaf8f0
198 if ((full_off + name_length) > name_size) { 198 if ((full_off + name_length) > name_size) {
199 return NULL; 199 return NULL;
200 } 200 }
201 if (entry == macroman_entry) { 201 if (entry == macroman_entry) {
202 //TODO: convert these properly to UTF-8 202 //TODO: convert these properly to UTF-8
203 char *ret = malloc(name_size + 1); 203 char *ret = malloc(name_length + 1);
204 memcpy(ret, name_table + full_off, name_length); 204 memcpy(ret, name_table + full_off, name_length);
205 ret[name_size] = 0; 205 ret[name_length] = 0;
206 return ret; 206 return ret;
207 } else { 207 } else {
208 return utf16be_to_utf8(name_table + full_off, name_length/2); 208 return utf16be_to_utf8(name_table + full_off, name_length/2);
209 } 209 }
210 } 210 }