Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Notifying ATS for Fonts of Actions

If your application is a font utility or other application that manages fonts, you may need to notify ATS for Fonts of your actions by calling the function ATSFontNotify. Other applications can sign up to receive notifications of your actions by calling the function ATSFontNotificationSubscribe. When you call the function ATSFontNotify, ATS for Fonts notifies all subscribers of your actions.

When you call the function ATSFontNotify you must supply a notification action (ATSFontNotifyAction). If your application activates or deactivates fonts, you should pass kATSFontNotifyActionFontsChanged. If your application makes changes to a font directory, you should pass the constant kATSFontNotifyActionDirectoriesChanged. You can also optionally supply a pointer to the data you want ATS for Fonts to pass to the applications who subscribe to notifications. You can pass NULL if there is no data associated with your action.

It’s best to call the function ATSFontNotify after your application makes a batch of changes rather than calling this function after each change you make. For example, if your application calls the functions ATSFontActivateFromFileSpecification (Mac OS X v10.4 and earlier), ATSFontActivateFromFileReference (Mac OS X v10.5 and later), or ATSFontDeactivate multiple times to activate and deactivate fonts, you can set the iOptions parameter in these functions to kATSOptionFlagsDoNotNotify set. When you are done activating and deactivating fonts you can call the function ATSFontNotify with the action parameter set to kATSFontNotifyActionFontsChanged. Then ATS notifies all applications who subscribe to notifications of the changes you made.



< Previous PageNext Page > Hide TOC


Last updated: 2007-12-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice