http://bugzilla.opensuse.org/show_bug.cgi?id=918466
--- Comment #8 from Ismail Donmez ---
The reason ftdump works is because its directly using face->family_name instead
of t1info.
Here is a sample program:
#include
#include
#include FT_FREETYPE_H
#include FT_TRUETYPE_IDS_H
#include FT_TYPE1_TABLES_H
int main(int argc, char **argv) {
int rc;
const char *family = NULL;
FT_Face face;
FT_Library ft_library;
PS_FontInfoRec t1info;
rc = FT_Init_FreeType(&ft_library);
if (rc) {
printf("Can't initialize FreeType library\n");
return 1;
}
rc = FT_New_Face(ft_library, argv[1], 0, &face);
if (rc) {
printf("Can't create a face.\n");
return 1;
}
rc = FT_Get_PS_Font_Info(face, &t1info);
if (rc) {
printf("Can't get font info: error %d\n", rc);
return 1;
}
printf("Family (face): %s\n", face->family_name);
printf("Family (t1info): %s\n", t1info.family_name);
return 0;
}
Makefile:
CC:=clang
ft: ft.c
$(CC) -g $(shell pkg-config --cflags freetype2) ft.c -o ft $(shell
pkg-config --libs freetype2)
clean:
rm -f ft *.o
Now see the output:
./ft hrgrr.pfa
Family (face): Hershey-Gothic-German
Family (t1info): (null)
--
You are receiving this mail because:
You are on the CC list for the bug.