• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Glyphs displayed in a bad direction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Glyphs displayed in a bad direction
      • From: Aki Inoue <email@hidden>
  • Prev by Date: Re: Newbie needs help with tableview and bindings
  • Next by Date: Re: Cross platform development: Was: Deprecated methods in NSDocument
  • Previous by thread: Don't cache my NSURLResponse
  • Next by thread: Re: Glyphs displayed in a bad direction
  • Index(es):
    • Date
    • Thread