Skip navigation.
 
mlRe: NSLayoutManager background and glyphs do not line up
FROM : Dave Dribin
DATE : Thu Jan 02 15:14:02 2003

On Thursday, January 2, 2003, at 04:20  PM, Douglas Davidson wrote:
>
> On Thursday, January 2, 2003, at 02:06  PM, Dave Dribin wrote:
>

>> By Quartz drawing routines, do you mean CGContextShowTextAtPoint()
>> and friends?  I have figured out how to get a CGContextRef, but how
>> do you translate other objects, like NSFont and NSGlyph for use in
>> Quartz?

>
> You should be able to use an NSGlyph and a CGGlyph interchangeably. 
> You will want to set the font and color (using -[NSFont set] and
> -[NSColor set]) before drawing using e.g.
> CGContextShowGlyphsAtPoint().  Also, I believe CG's notion of "at
> point" differs somewhat from NSString/NSAttributedString
> drawAtPoint:'s.


Hmm... all I get are rectangles as if it does not know the correct
character.  I even tried CGContextSelectFont(), but that didn't help
either.

-Dave


Related mailsAuthorDate
mlNSLayoutManager background and glyphs do not line up Dave Dribin Jan 1, 23:12
mlRe: NSLayoutManager background and glyphs do not line up Douglas Davidson Jan 2, 09:58
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 2, 11:42
mlRe: NSLayoutManager background and glyphs do not line up Douglas Davidson Jan 2, 11:56
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 2, 14:07
mlRe: NSLayoutManager background and glyphs do not line up Douglas Davidson Jan 2, 14:19
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 2, 15:14
mlRe: NSLayoutManager background and glyphs do not line up Hubert Figuiere Jan 2, 15:38
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 2, 19:13
mlRe: NSLayoutManager background and glyphs do not line up Hubert Figuiere Jan 3, 07:03
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 7, 19:32
mlRe: NSLayoutManager background and glyphs do not line up Dave Dribin Jan 12, 15:40