User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.15 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5pre) Gecko/2008031604 Minefield/3.0b5pre GFX/Thebes on Mac should consider the language order in System Preferences for CJK font matching. At present it only consider the first language. Besides, the API it used (GetScriptManagerVariable()) is already deprecated in Mac OS X 10.5. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 309805 [details] [diff] [review] Use AppleLanguages preference to do CJK language fallback Here is a patch to fix this problem.
Created attachment 309806 [details] [diff] [review] Use AppleLanguages preference to do CJK language fallback minor update, fix a memory leak
This looks like the right approach basically. I don't think we need the entries related to x-western, since they aren't used, right? Beyond the scope of CJK, it definitely might make sense to use these prefs to set the font style lang field when the lang isn't known clearly, right now it's always set to x-western.
One thing to watch is that on systems that were upgrades from 10.3 or earlier to 10.4 and above, I believe the old zh-CN and zh-TW language codes will still be in use unless the user deletes and then re-adds those languages in the list in System Prefs. I don't have any such system to check, but that's my recollection from when we dealt with that changeover in Camino (which uses that list for accept-lang).
Does this still need doing? We don't seem to use GetScriptManagerVariable() any more.
(In reply to Joe Drew (:JOEDREW!) from comment #5) > Does this still need doing? We don't seem to use GetScriptManagerVariable() > any more. I guess we can use [NSLocale preferredLanguages:] instead. http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/Reference/Reference.html#//apple_ref/occ/cl/NSLocale