https://bugs.documentfoundation.org/show_bug.cgi?id=172818
--- Comment #10 from Y. Kawara <[email protected]> --- (In reply to Jonathan Clark from comment #9) > fontconfig gives LO an arbitrarily-ordered sequence of > FC_FAMILY/FC_FAMILYLANG pairs. We don't know anything else about these > strings. They aren't prioritized, and fontconfig offers no guarantees about > their order (in practice, they seem to be returned in whatever order > fontconfig encountered them when it parsed the font file). > > We scan this sequence and use the first name that matches both the GUI > language and country. If there are none, we use the first name that matches > the GUI language. If there are still none, we use the first English name as > a fallback. In this case, LO is using the corrupted name either because > fontconfig arbitrarily put it first in the list, or because fontconfig > reports it as a better match (ja-JP vs ja). > I get 100% constant results with fc-list. Fontconfig always returns Windows Japanese name first. For all of my fonts, from different makers and made with different font software. Even with the bugged fontconfig version. Or do you mean that the underlying library is doing something else and only fc-list would be listing them correctly? I would rather go with the "ja-JP vs ja" explanation, only if the Mac names were reported as "ja-JP" and Windows ones "ja". A for the standards: Mac lists language ID "1" as "Japanese": https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html Windows lists language ID "11" as "Japanese" and "0411" as Japanese/Japan. https://winprotocoldoc.z19.web.core.windows.net/MS-LCID/%5bMS-LCID%5d.pdf (p.44) In the font data I have attached, Windows Japanese names are UTF16-BE encoded to language ID 411, Mac Japanese names are Shift-JIS encoded to language ID 11. The garbled text is Shift-JIS rendered as UTF16-BE. (I checked with hex editor.) My locale is ja-JP. If the "ja-JP" vs "ja" explanation was true, as per the standards, Windows name should still be picked. So I do think there's another issue down there. Would it be possible that LO is actually picking the LAST entry that matches either ja-JP or ja? -- You are receiving this mail because: You are the assignee for the bug.
