if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
return false;
+ if (face->family_name) {
+ families[0] = strdup(face->family_name);
+ if (families[0] == NULL)
+ goto error;
+ num_family++;
+ }
+
for (i = 0; i < num_names; i++) {
FT_SfntName name;
num_family++;
}
}
-
- }
-
- // check if we got a valid family - if not use whatever FreeType gives us
- if (num_family == 0 && face->family_name) {
- families[0] = strdup(face->family_name);
- if (families[0] == NULL)
- goto error;
- num_family++;
}
// we absolutely need a name