Screen trash with some fonts
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.