• 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
Screen trash with some fonts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Screen trash with some fonts


  • Subject: Screen trash with some fonts
  • From: Scott Thompson <email@hidden>
  • Date: Thu, 13 May 2004 16:45:13 -0500

I'm working with some code that draws, and more importantly erases, text. To draw the text I am constructing my own textContainer, layout manager, etc... then asking that whole structure to render the text for me.

When it is time to erase the text I have just drawn, I used the same layout structure and call the method boundingRectForGlyphRange:inTextContainer: to try and get a rectangle that covers the entire area to be redrawn.

It works in about 98% of the cases. There are still a few that don't quite work. Most notably, if you use the Zapfino font and actually type in word "Zapfino" you get a lovely swash-y swoopy ligature that I presume is a single glyph. That glyph does not "fit" inside of the rectangle returned by boundingRectForGlyphRange:inTextContainer:.

My understanding from reading the documentation is that boundingRectForGlyphRange:inTextContainer: is the routine to call when trying to invalidate the font area. Is this the case, or is there an even better routine I should be using?

Scott
_______________________________________________
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: Screen trash with some fonts
      • From: Steve Sims <email@hidden>
  • Prev by Date: Getting RulerView to scroll with its TextView...
  • Next by Date: How to make NSImageView respond to keyboard events?
  • Previous by thread: Getting RulerView to scroll with its TextView...
  • Next by thread: Re: Screen trash with some fonts
  • Index(es):
    • Date
    • Thread