bulia byak wrote:
TODO: This is only tested on Linux. I may well have broken something on Windows. This also requires additional testing (and likely coding) to accommodate non-ASCII font names and style names.
This is probably unrelated, but I am getting a segfault on nr-type-w32.cpp on line 139, called from 179, whenever I load an SVG file with text:
void nr_type_w32_build_def (NRTypeFaceDef *def, const unsigned char *name, const unsigned char *family) { def->type = NR_TYPE_TYPEFACE_W32; def->name = (gchar *)g_strdup ((const gchar *)name); <--- HERE def->family = (gchar *)g_strdup ((const gchar *)family); def->typeface = NULL; }
void nr_type_read_w32_list (void) { NRNameList wnames, wfamilies; int i;
nr_type_w32_typefaces_get (&wnames); nr_type_w32_families_get (&wfamilies);
for (i = wnames.length - 1; i >= 0; i--) { NRTypeFaceDef *tdef;
const unsigned char *family = (const unsigned char *) (wnames.families[i]);
// const unsigned char *family; // family = NULL; // for (j = wfamilies.length - 1; j >= 0; j--) { // int len; // len = strlen ((gchar *)wfamilies.names[j]); // if (!strncmp ((gchar *)wfamilies.names[j], (gchar *)wnames.names[i], len)) { // family = (const unsigned char *)wfamilies.names[j]; // break; // } // }
if (family) { tdef = nr_new (NRTypeFaceDef, 1); tdef->next = NULL; tdef->pdef = NULL; //##### CALLED FROM HERE ####### nr_type_w32_build_def (tdef, (const unsigned char *)wnames.names[i], family); nr_type_register (tdef); } }
nr_name_list_release (&wfamilies); nr_name_list_release (&wnames); }