Re: glyphWithName: broken on Tiger ?
Re: glyphWithName: broken on Tiger ?
- Subject: Re: glyphWithName: broken on Tiger ?
- From: glenn andreas <email@hidden>
- Date: Wed, 1 Jun 2005 15:59:09 -0500
On Jun 1, 2005, at 3:31 PM, Robert Clair wrote:
Considering that glyph names are font specific to start with (and
there is no universal standard), this may not have ever worked on
some fonts. Blame the font designers for this one...
On Panther it worked on the 70+ fonts I tested it with, fonts that
had widely varying glyph numbers for the same glyph. If you think
about it, on some level the system has the information - if you
type a single "T" by itself on a line, using a western font, a
reasonable glyph for a "T" gets drawn. That is the glyph I want.
But it probably doesn't use glyph names internally is my guess (since
it can use a cmap table which maps between the (unicode) character
and the glyph id, and doesn't require a glyph name table).
An NSLayoutManager isn't all that bad
I know - the app has an extensive text system that uses them. But
this is really overkill for the purpose.
It's not overkill if it's the only way to work reliably...
More to the point:
1) it used to work
2) there is no reason why it shouldn't work
Fonts aren't required to contain glyph name tables (and there is no
consistency between glyph ids)
3) there was nothing that I saw in the release notes about its
going away.
ergo it is a bug. :-)
So is it still a bug if it the docs say it doesn't always work???
(And would that mean to reduce bugs all APIs are then amended with
"this doesn't always work"?)
From the documentation:
"Glyph names in fonts do not always accurately identify the glyph"
(and the docs have said that for quite some time - this isn't a Tiger
change)
Filing an enhancement request for
@interface NSAttributedString<BezierPaths>
- (NSBezierPath *) bezierPathFromGlyphsInString;
@end
seems like a better solution (and let the Apple engineers figure out
the best way to manage the tradeoffs between complexity and
correctness)...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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