Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FMGetFontFromFontFamilyInstance returns the same font for a MM font?



> On Mac OS 10.3.8 I have a FMFontFamily id. I would like to get the
> ATSUFontID for the plain style font of this family for setting the
> kATSUFontTag attribute while creating an ATSUStyle.
> 
> After installing an old Graphite MM font with Font Book, there are 9 new
> font families available, both in CodeWarrior 9.1 and in my application.
> Since ATSUFONDtoFontID is not recommended, I use
> status = FMGetFontFromFontFamilyInstance (familyID, normal, &fmFont,
> NULL);
> 
> I found that calling FMGetFontFromFontFamilyInstance with these
> different family ids it returns the same fmFont id for each family. It
> means that all the 9 variations of this font looks the same for me (CW
> is OK).
> 
> Is there a better way to get the ATSUFontID?

It's not so much the ATSUFontID as it is the font variations that you're
after, isn't it? If you have the base (plain) ATSUFontID, you can make an
ATSUStyle with it and then call something like ATSUGetAllFontVariations to
get information on the axis values you can change. Or you can call
ATSUCountFontVariations on the ATSUFontID directly to get the named
instances, which are probably the 9 different "families" you're seeing.

Dave Opstad

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >FMGetFontFromFontFamilyInstance returns the same font for a MM font? (From: "Fabry, Geza" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.