discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting glyphs for characters


From: Yen-Ju Chen
Subject: Re: Getting glyphs for characters
Date: Tue, 14 Oct 2003 07:58:15 -0400

Hi,

 I use the private method in the text system:

 static glyph_run_t run;
 run.font = theFont;
 run.head.char_length = 1;
 [layoutManager _generateGlyphsForRun: &run at: index];

 Not sure whether it will work for you because it need NSLayoutManager.
 You might not have one in PDF viewer.
 And char_length is the length of unichar,
 which might be different than the glyph length due to ligature.
 You need other methods to get the correct one.

But basically, in xlib backart, the glyph is the same as character (unichar).
 It would be nice to have the -glyphForCharacter in xlib-backart, too.

 Yen-Ju

From: stefan@wms-network.de
To: discuss-gnustep@gnu.org
Subject: Getting glyphs for characters
Date: Tue, 14 Oct 2003 10:04:12 +0200 (CEST)


Hello everybody,

Can someone tell me how i can get a glyph for a character? I need
this for the PDFImageRep i'm currently working on. In ViewIt 0.6
it uses NSStringDrawing to place characters on the screen, but the
the position of the characters is shifted up a bit and drawing speed
it also not overhelming. With backart, NSFont provides a method
glyphForCharacter. Using this works fine in my development version,
characters are placed exactly where i want them and drawing a
page is also done much much faster. The only problem with this
method is that i think it's specific to backart. So i need
a common way to get a glyph for a character. I already looked at
NSStringDrawing/NSLayoutManager but i have no idea what the
code in this classes does.

thanks
Stefan



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/discuss-gnustep

_________________________________________________________________
Send instant messages to anyone on your contact list with MSN Messenger 6.0. Try it now FREE! http://msnmessenger-download.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]