• 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
Re: How to use setShowsInvisibleCharacters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: How to use setShowsInvisibleCharacters
      • From: Mark Munz <email@hidden>
References: 
 >NSDisclosureButton (From: Pedro Campos <email@hidden>)
 >How to use setShowsInvisibleCharacters (From: Peter Wollschlaeger <email@hidden>)

  • Prev by Date: [OT] .so vs .dylib
  • Next by Date: Re: execute system commands
  • Previous by thread: How to use setShowsInvisibleCharacters
  • Next by thread: Re: How to use setShowsInvisibleCharacters
  • Index(es):
    • Date
    • Thread