The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Revert "Use better names when loading the name table"

These changes was commited to the Birdfont repository Sun, 13 Sep 2015 20:23:33 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 13 Sep 2015 20:23:33 +0000 (22:23 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 13 Sep 2015 20:23:33 +0000 (22:23 +0200)
commit 5fd76ca31024084727134956123ffa488690a6ef
tree d5742f29ca62f0904c854aefe90ede1c30b3b3a9
parent 1aa2c7e373d6de4c75acb9919814965a0cb923b9
Revert "Use better names when loading the name table"

This reverts commit 7d78fe0fe19f57a5e3e49c67ac0849b472a7426e.

libbirdfont/OpenFontFormat/load_font.c
--- a/libbirdfont/OpenFontFormat/load_font.c +++ b/libbirdfont/OpenFontFormat/load_font.c @@ -18,7 +18,6 @@ #include <string.h> #include <stdlib.h> #include <ft2build.h> - #include <ttnameid.h> #include FT_FREETYPE_H #include FT_GLYPH_H #include FT_OPENTYPE_VALIDATE_H @@ -825,32 +824,32 @@ g_string_append_printf (bf, "<subfamily>%s</subfamily>\n", g_markup_escape_text (face->style_name, -1)); } - if (FT_Get_Sfnt_Name (face, TT_NAME_ID_FULL_NAME, &name_table_data) == 0) { // full name + if (FT_Get_Sfnt_Name (face, 4, &name_table_data) == 0) { // full name g_string_append (bf, "<full_name>"); append_description (bf, &name_table_data); g_string_append (bf, "</full_name>\n"); - } + } - if (FT_Get_Sfnt_Name (face, TT_NAME_ID_UNIQUE_ID, &name_table_data) == 0) { // unique identifier + if (FT_Get_Sfnt_Name (face, 3, &name_table_data) == 0) { // unique identifier g_string_append (bf, "<unique_identifier>"); append_description (bf, &name_table_data); g_string_append (bf, "</unique_identifier>\n"); } - if (FT_Get_Sfnt_Name (face, TT_NAME_ID_UNIQUE_ID, &name_table_data) == 0) { // version + if (FT_Get_Sfnt_Name (face, 5, &name_table_data) == 0) { // version g_string_append (bf, "<version>"); append_description (bf, &name_table_data); g_string_append (bf, "</version>\n"); } // FIXME: for some fonts will this return entry 0 (copyright) - if (FT_Get_Sfnt_Name (face, TT_NAME_ID_DESCRIPTION, &name_table_data) == 0) { // description + if (FT_Get_Sfnt_Name (face, 10, &name_table_data) == 0) { // description g_string_append (bf, "<description>"); append_description (bf, &name_table_data); g_string_append (bf, "</description>\n"); } - if (FT_Get_Sfnt_Name (face, TT_NAME_ID_COPYRIGHT, &name_table_data) == 0) { // copyright + if (FT_Get_Sfnt_Name (face, 0, &name_table_data) == 0) { // copyright g_string_append (bf, "<copyright>"); append_description (bf, &name_table_data); g_string_append (bf, "</copyright>\n");