Add experimental -nameOfGlyph: method to try to get printing to work.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@15905 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-02-08 20:12:25 +00:00
parent 71287aef45
commit f33fd16470
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-02-08 21:10 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Add somewhat experimental -nameOfGlyph:
method to try to get printing to work.
2003-02-06 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gpbs.m (ihandler): Fix for mingw, which doesn't have kill()

View file

@ -2607,3 +2607,24 @@ fb04 'ffl'
}
@end
@interface FTFontInfo (experimental_glyph_printing_extension)
-(const char *) nameOfGlyph: (NSGlyph)g;
@end
@implementation FTFontInfo (experimental_glyph_printing_extension)
-(const char *) nameOfGlyph: (NSGlyph)g
{
static char buf[1024]; /* !!TODO!! */
FT_Face face;
if (FTC_Manager_Lookup_Size(ftc_manager, &imgd.font, &face, 0))
return ".notdef";
if (FT_Get_Glyph_Name(face, g, buf, sizeof(buf)))
return ".notdef";
return buf;
}
@end