bugGNUstep - Bugs: bug #17787, Unimplemented methods of NSFont...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17787: Unimplemented methods of NSFont and patch

Submitted by:  -Deleted Account- <yjchen>
Submitted on:  Mon 18 Sep 2006 04:13:50 AM UTC  
 
Category: BackendSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 31 Jan 2007 03:55:27 PM UTC, comment #2:

Thanks ... I added that with a few changes ... untested though.
We need to have this functionality for the win32 and cairo backends though.

Richard Frith-Macdonald <CaS>
Project Member
Mon 18 Sep 2006 11:18:15 PM UTC, comment #1:

Here is the patch for GUI and Back.
It works fine on art backend so far.

-Deleted Account- <yjchen>
Mon 18 Sep 2006 04:13:50 AM UTC, original submission:

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.

-Deleted Account- <yjchen>

 

Attached Files
file #10798:  fontpatch.tar.gz added by yjchen (1KiB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Jan 2007 03:55:27 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 18 Sep 2006 11:18:15 PM UTCyjchenAttached File-=>Added fontpatch.tar.gz, #10798

    Back to the top


    Powered by Savane 3.1-cleanup1