Re: How to use setShowsInvisibleCharacters
Re: How to use setShowsInvisibleCharacters
- Subject: Re: How to use setShowsInvisibleCharacters
- From: Glenn Andreas <email@hidden>
- Date: Tue, 20 Apr 2004 09:59:01 -0500
At 8:03 PM +0200 4/16/04, Peter Wollschlaeger wrote:
Hello,
I tried to show invisible characters in a text view, but without
success.
Here my code:
- (IBAction)showInvChar:(id)sender
{
NSLayoutManager *layM;
layM = [myTextView layoutManager];
[layM setShowsInvisibleCharacters:YES];
}
Thanks in advance for your help
Peter
It only works for those fonts whose "font book" supports it.
So far as I can tell, there aren't any.
I've overridden -[NSLayoutManager drawGlpyhsForGlyphRange:atPoint:]
to add this (plus other) functionality to IDEKit. Basically, you
convert the glpyh range back to a character range, find which
characters are "invisibile", draw them where their glyphs go (via
lineFramgmentRectForGlyphAtIndex:effectiveRange:), and then call the
superclass to draw the "visible" text.
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.