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

 
 

bug #17787: Unimplemented methods of NSFont and patch

Submitter:  -Deleted Account- <yjchen>
Submitted:  Mon 18 Sep 2006 04:13:50 AM UTC
 
Category:  Backend Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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
  • -email is unavailable- added by CaS (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-31 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2006-09-18 yjchen Attached File- Added fontpatch.tar.gz, #10798

    Back to the top


    Powered by Savane 3.9