[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #17787] Unimplemented methods of NSFont and patch
From: |
Yen-Ju Chen |
Subject: |
[bug #17787] Unimplemented methods of NSFont and patch |
Date: |
Mon, 18 Sep 2006 00:13:51 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5 |
URL:
<http://savannah.gnu.org/bugs/?17787>
Summary: Unimplemented methods of NSFont and patch
Project: GNUstep
Submitted by: yjchen
Submitted on: Monday 09/18/2006 at 00:13
Category: Backend
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
Two methods have no implementation in NSFont:
- (unsigned) numberOfGlyphs
- (NSCharacterSet*) coveredCharacterSet
Here is code to get these information from font in art backend,
which use FreeType:
{
// FT_Face *pface;
NSLog(@"Face 0x%x", pface);
NSLog(@"Number of glyphs %d", (*pface)->num_glyphs);
FT_ULong charcode; /* Char index */
FT_UInt gindex; /* Glyph index */
charcode = FT_Get_First_Char(*pface, &gindex);
while (gindex != 0)
{
charcode = FT_Get_Next_Char(*pface, charcode, &gindex);
NSLog(@"Char %c(%ld), Glyph %d", charcode, charcode, gindex);
}
}
I don't know where to use the code and have the information
back to NSFont.
I test it in back/art/Source/ftfont.m:
static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data,
FT_Face *pface)
As long as FT_Face is available,
these information can be obtained anywhere.
Maybe someone knows better where to put it.
And I don't know how fast to go through all characters,
especially for CJK users.
Maybe a cache would be nice.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?17787>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #17787] Unimplemented methods of NSFont and patch,
Yen-Ju Chen <=