• 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
Re: Mixing Chinese and Japanese text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing Chinese and Japanese text


  • Subject: Re: Mixing Chinese and Japanese text
  • From: Jakob Olesen <email@hidden>
  • Date: Sat, 16 Sep 2006 12:51:44 +0200


On 15/09/2006, at 21.58, Douglas Davidson wrote:

Setting an appropriate font based on the characters is probably the easiest option at the moment. The standard font substitution is necessarily imperfect. It is possible to override it, however, by using a custom NSTextStorage and overriding - fixFontAttributeInRange:. That would allow you to implement a custom language attribute that you could use to determine a font to substitute in each individual case.

Thanks,

So I can override the font substitution, but there is no way of injecting a different locale into the default algorithm. The situation seems to be the same with ATSUI - I can place a font list in front of the default, but no locale injection.

In that case, I will pre-substitute a locale-appropriate font for ideographic characters (and possibly kana), and let the default algorithm handle the rest. I should probably also set NSCharacterShapeAttributeName to one of kTraditionalCharactersSelector, kSimplifiedCharactersSelector, or kJIS1990CharactersSelector. I am guessing kTraditionalCharactersSelector for Korean and Vietnamese, not sure about that, though.

Out of curiosity: is there any way of determining the intended locale of a CJK font, or do you have to know?


Back in the late 80's, I was the proud owner of an Amstrad DMP2000 dot matrix printer. I had been localized to Danish by replacing the characters [|] with the Danish letters æøå. This was before Latin1. Whoever did the localization was clearly clueless about Danish typography. The letter ø looked like a small circle with a slash, not an o with a slash. In running text it stod out like a sore thumb. I was so annoyed by this that I eventually took out the firmware PROM, reverse engineered the font bitmaps, and replaced it with an EPROM containing a proper ø.


OK, so I had a lot of time on my hands back then.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Mixing Chinese and Japanese text
      • From: Douglas Davidson <email@hidden>
References: 
 >Mixing Chinese and Japanese text (From: Jakob Olesen <email@hidden>)
 >Re: Mixing Chinese and Japanese text (From: John Stiles <email@hidden>)
 >Re: Mixing Chinese and Japanese text (From: Jakob Olesen <email@hidden>)
 >Re: Mixing Chinese and Japanese text (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Persistent Store Error
  • Next by Date: Two clicks to dismiss a sheet?
  • Previous by thread: Re: Mixing Chinese and Japanese text
  • Next by thread: Re: Mixing Chinese and Japanese text
  • Index(es):
    • Date
    • Thread