Okay, so the simple solution isn't simple. this:
NSFont* artFont_2 = [NSFont fontWithName:@"Sonara" size:30.0]; NSLog(@"what's up? %i", [artFont_1 glyphWithName:@"FULL STOP"]); prints the glyph as "0" (which is NOT the glyph ID) So what gives? In fact, all of my glyphs return zero... mmm... yum. I love it when methods don't work... Looking around, I found posts from as long ago as 2001 indicating that glyphWithName is broken. What's going on? Using the Glyph view in the Character Viewer I can see that the name is "FULL STOP", so what can I do? Simple question: since using the Glyph ID (i.e., from the Character viewer) directly at least **works**, is there any real reason why the same font, on different systems, would have different Glyph IDs for the same character? Or was this possibly just some form of font corruption? If looking up the Glyph ID and using it directly is supposed to be safe across machines, I'll just go back to that, as this glyphWithName business is way too annoying... J. On 2010-05-31, at 1:44 PM, James Maxwell wrote: > I'm sure many here know all this, but just in case anyone's confused about > it, in future, I'll post what I've found. > > Opening the font on each machine, using Font Examiner (handy software... > might have to buy a copy!), I can see that the offset of all the glpyhs on my > Macbook is less than on the Mac Pro -- Full Stop is 17 on the Macbook and 46 > on the Mac Pro. Weird. The names, however, are consistent, so I guess the > idea is to use the names to get the IDs (kind of funny, since the names have > nothing to do with the actual characters, in my case). I can run this as an > init routine, so no big deal. > > J. > > > On 2010-05-31, at 12:44 PM, James Maxwell wrote: > >> I'm having a problem where fonts are mapping differently on different >> hardware. I have a Mac Pro (early 2008) and a Core i5 Macbook Pro. The Mac >> Pro handles fonts as expected (it's my main development computer) but the >> Macbook Pro maps differently. My app doesn't give any errors about missing >> fonts, it's just that the font glyphs seem to have different values. >> >> Just to be clear, I'm not using the fonts as text, per se, but am using the >> glyphs themselves, rendered as bezier paths >> (appendBezierPathWithGlyph:inFont:). It's a music app, and the two fonts in >> question are the free/shareware Sonora and Toccata fonts. >> >> Any thoughts on how to go about ensuring that mapping is hardware-agnostic >> would be appreciated. >> >> J. >> >> James B Maxwell >> Composer/Doctoral Student >> School for the Contemporary Arts (SCA) >> School for Interactive Arts + Technology (SIAT) >> Simon Fraser University >> jbmaxw...@rubato-music.com >> jbmax...@sfu.ca >> >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/jbmaxwell%40rubato-music.com >> >> This email sent to jbmaxw...@rubato-music.com > > James B Maxwell > Composer/Doctoral Student > School for the Contemporary Arts (SCA) > School for Interactive Arts + Technology (SIAT) > Simon Fraser University > jbmaxw...@rubato-music.com > jbmax...@sfu.ca > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/jbmaxwell%40rubato-music.com > > This email sent to jbmaxw...@rubato-music.com James B Maxwell Composer/Doctoral Student School for the Contemporary Arts (SCA) School for Interactive Arts + Technology (SIAT) Simon Fraser University jbmaxw...@rubato-music.com jbmax...@sfu.ca _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com