• 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: boundingRectForGlyphRange oddness - what on earth?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: boundingRectForGlyphRange oddness - what on earth?


  • Subject: Re: boundingRectForGlyphRange oddness - what on earth?
  • From: Serge Meynard <email@hidden>
  • Date: Wed, 30 Mar 2005 09:23:52 -0500


On Mar 30, 2005, at 09:00, Keith Blount wrote:

If the charIndex being passed in is a small "i",
everything works fine - it gets the bounding box for
that "i" character. But then, if you type in a small
"f" directly before the "i", so that you have an "fi"
combination, and then you pass in the charIndex for
the "i" that follows the "fi", the rect returned from
my method is for *both* letters - if I want to draw a
circle around the letter "i", for instance, it gets
drawn around both the "f" and the "i". What on earth
is going on here? I have as yet come across no other
letter combination that does this to me.

This is such an abstract problem that I don't hold out
much hope, but if anyone out there knows the problem,
or how I can accurately get the rect of a single
character without fail, I would be very grateful.

Many thanks,
Keith

I'm far from an expert on fonts and text layout, so don't shoot me if i'm off the mark... You have to remember that characters != glyphs. Some characters need more than one glyph to display, and some glyphs represent more than one character. I'm guessing that "fi" is being considered as a ligature and represented by a single "fi" glyph. In fact, http://developer.apple.com/documentation/Cocoa/Conceptual/FontHandling/ index.html specifically gives an example with the "fl" ligature.
I seem to recall there's a way to prevent the layout system from generating this ligature glyph, but you'll have to look for that yourself ;)


Serge

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >boundingRectForGlyphRange oddness - what on earth? (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: boundingRectForGlyphRange oddness - what on earth?
  • Next by Date: Re: Nested sheets
  • Previous by thread: Re: boundingRectForGlyphRange oddness - what on earth?
  • Next by thread: Re: boundingRectForGlyphRange oddness - what on earth?
  • Index(es):
    • Date
    • Thread