• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple Languages Font Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple Languages Font Menu


  • Subject: Multiple Languages Font Menu
  • From: Johnny CN Lee <email@hidden>
  • Date: Tue, 27 Nov 2001 15:10:01 +0800

Hi,

I want to create a NSComboBox which contains font names for the user to
select. I use the following code to do it:

NSComboBox *fontMenu;
.
.
.
menu = NewMenu(kMenuStdMenuProc, "\pFonts");
osStatus = CreateStandardFontMenu(menu, 0, NULL,
kNilOptions, &outHierMenuCount);
if (noErr == osStatus)
{
long menuItem;

for (menuItem = 1; menuItem <= CountMenuItems(menu); menuItem++)
{
Str255 itemString;
NSString *fontString;

GetMenuItemText(menu, menuItem, itemString);
itemString[itemString[0] + 1] = 0;
fontString = [NSString stringWithCString:&itemString[1]];
[fontMenu addItemWithObjectValue:fontString];
}
}
DisposeMenu(menu);

All fonts with English names are displayed correctly, but not for Japanese
font names. All Japanese characters are displayed as Latin characters.

Have I done anything wrong?

Thanks,

J Lee


  • Prev by Date: Re: Determine ppp assigned IP address via system configuration?
  • Next by Date: finder flags in MacosX
  • Previous by thread: Re: horizontal tabs in TabView
  • Next by thread: Re: Multiple Languages Font Menu
  • Index(es):
    • Date
    • Thread