diff options
author | pfaedit <pfaedit> | 2007-12-09 19:23:19 +0000 |
---|---|---|
committer | pfaedit <pfaedit> | 2007-12-09 19:23:19 +0000 |
commit | dfbfc9f8808de48418bdaf8e9a25154807ab28cb (patch) | |
tree | 3c38f50dfa183293423870c82045d5560e530f3b /fonttools | |
parent | a3efddfbd27ff6877b8ae388c5d9e853f4575767 (diff) |
Add dummy glyph names for those glyphs with unicode code points.
Diffstat (limited to 'fonttools')
-rw-r--r-- | fonttools/showttf.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fonttools/showttf.c b/fonttools/showttf.c index bbf2123c..3ced5677 100644 --- a/fonttools/showttf.c +++ b/fonttools/showttf.c @@ -2184,6 +2184,19 @@ static void readttfpost(FILE *ttf, FILE *util, struct ttfinfo *info) { free(names); #endif } + if ( info->glyph_unicode!=NULL ) { + if ( info->glyph_names==NULL ) + info->glyph_names = calloc(info->glyph_cnt,sizeof(char *)); + for ( i=0; i<info->glyph_cnt ; ++i ) { + if ( info->glyph_names[i]!=NULL ) + /* Keep it */; + else if ( info->glyph_unicode[i]!=0 && info->glyph_unicode[i]!=0xffff ) { + char buffer[40]; + sprintf(buffer,">U+%04X<", info->glyph_unicode[i]); + info->glyph_names[i] = strdup(buffer); + } + } + } } static void showlangsys(FILE *ttf,int script_start, uint16 ls_off, uint32 ls_name ) { |