Locale based font

2009-11-23 Thread Symadept
Hi,

I found out the way to show custom font.

1. First give information in info.plist, under the identifier, Application
fonts resource path.
2. Add this file into the Resources folder.
3. Invoke using this method. [NSFont fontWithName:CP_FONT_NAME size:11],
NSFontAttributeName,

Works fine. But what I want is to use this font file only in english locale
and in other locales it should fallback to the system fonts of the
corresponding controls.

Any pointers highly appreciable.

Regards
Mustafa
___

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


Re: Locale based font

2009-11-23 Thread Ricky Sharp
I am about to play around with something similar. In my iPhone app, I  
have some calls with boldSystemFontOfSize. But, for certain locales,  
it should be a plain font and the size may need to be tweaked.


I then had an idea to write a static method to obtain a font style and  
size based on locale. My thought was to come up with a key for each  
style and then have a localized property list file to store the  
styles for each locale.


Kinda like how you often have a CSS file for each locale your web site  
is localized to.


Sent from my iPhone

On Nov 23, 2009, at 7:00 AM, Symadept symad...@gmail.com wrote:


Hi,

I found out the way to show custom font.

1. First give information in info.plist, under the identifier,  
Application

fonts resource path.
2. Add this file into the Resources folder.
3. Invoke using this method. [NSFont fontWithName:CP_FONT_NAME size: 
11],

NSFontAttributeName,

Works fine. But what I want is to use this font file only in english  
locale

and in other locales it should fallback to the system fonts of the
corresponding controls.

Any pointers highly appreciable.

Regards
Mustafa
___

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/rsharp%40mac.com

This email sent to rsh...@mac.com

___

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


Re: Locale based font

2009-11-23 Thread Symadept
Hi Ricky,

Thank you very much for your response. But can we have any way where I can
find current locale is English, I mean all versions of English. This could
solve my issue.

Regards
Mustafa


On Mon, Nov 23, 2009 at 9:50 PM, Ricky Sharp rsh...@mac.com wrote:

 I am about to play around with something similar. In my iPhone app, I have
 some calls with boldSystemFontOfSize. But, for certain locales, it should be
 a plain font and the size may need to be tweaked.

 I then had an idea to write a static method to obtain a font style and size
 based on locale. My thought was to come up with a key for each style and
 then have a localized property list file to store the styles for each
 locale.

 Kinda like how you often have a CSS file for each locale your web site is
 localized to.

 Sent from my iPhone


 On Nov 23, 2009, at 7:00 AM, Symadept symad...@gmail.com wrote:

  Hi,

 I found out the way to show custom font.

 1. First give information in info.plist, under the identifier, Application
 fonts resource path.
 2. Add this file into the Resources folder.
 3. Invoke using this method. [NSFont fontWithName:CP_FONT_NAME size:11],
 NSFontAttributeName,

 Works fine. But what I want is to use this font file only in english
 locale
 and in other locales it should fallback to the system fonts of the
 corresponding controls.

 Any pointers highly appreciable.

 Regards
 Mustafa
 ___

 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/rsharp%40mac.com

 This email sent to rsh...@mac.com


___

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