Glyphs displayed in a bad direction
Glyphs displayed in a bad direction
- Subject: Glyphs displayed in a bad direction
- From: Tristan Leblanc <email@hidden>
- Date: Thu, 24 Nov 2005 17:11:56 +0100
Hello
I have a problem...
Let say two in one.
when I try to draw glyphs from a text layout in a CGContext, with a
code like this:
NSLayoutManager* layoutManager = [attachedTextView layoutManager];
long nGlyphs = [layoutManager numberOfGlyphs];
NSRange glyphRange = NSMakeRange(0,nGlyphs);
#ifdef _DRAW_USING_QUARTZ_
NSGlyph* glyphArray = (NSGlyph*)malloc((nGlyphs+1)*sizeof(NSGlyph));
long returnedGlyphs = [layoutManager getGlyphs:glyphArray
range:glyphRange];
CGContextShowGlyphsAtPoint(contextRef,textLoc.y,textLoc.y,(CGGlyph*)
glyphArray,returnedGlyphs);
#else
[layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:textLoc];
#endif
if _DRAW_USING_QUARTZ_ is defined, then nothings is visible,
by drawing using drawGlyphsForGlyphRange:glyphRange, Glyphs are
displayed, but lines are displayed bottom to top (and all the offsets
for subscript, superscript, underline..) are reversed.
Ideally I should display with Quartz, but I try different ways.
Any help would be very appreciated!
Tristan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden