Re: Unable to set bold font in Chinese language
Re: Unable to set bold font in Chinese language
- Subject: Re: Unable to set bold font in Chinese language
- From: Douglas Davidson <email@hidden>
- Date: Tue, 4 Dec 2007 09:03:28 -0800
On Dec 4, 2007, at 5:23 AM, parag vibhute wrote:
I am implementing application which support chinese & english
localization.
NSFont *stringFont = [NSFont boldSystemFontOfSize:12];
NSDictionary *stringAttributes = [NSDictionary
dictionaryWithObject:stringFont forKey:NSFontAttributeName];
NSAttributedString *tmpattrstring;
NSString *tmpstring = [[NSString alloc ]init];
tmpstring = [tmpstring stringByAppendingString:@" "];
tmpstring = [tmpstring
stringByAppendingString:NSLocalizedString(@"DemoText", nil)];
tmpstring = [tmpstring stringByAppendingString:@"\n\n"];
tmpattrstring = [[NSAttributedString alloc]
initWithString:majorString
attributes:stringAttributes];
Now in english, it displays "Demo Text" in bold but in Chinese it
does not.
What is wrong here?
One fundamental problem is the assumption that "bold" is a universal
concept. The use of bold and italic variants is a practice of
European typesetting traditions, and in general it is not directly
transferrable to East Asian text. Some fonts do come in multiple
weights, and for those fonts "bold" will usually end up selecting a
heavier weight, but most of the Chinese-language fonts shipped with
Mac OS X supply only a single weight. Consult your Chinese localizers
about finding a locale-appropriate substitute for whatever it is that
you are using "bold" to signify in Latin text. If you are in fact
displaying Latin text in your Chinese localization, and really do
intend to present it as bold, you will need to choose some non-Chinese-
language font for it.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden