Hi everyone, Are there any news on this report? It's still present in 2.3.95, and I'd be very glad if someone could try to look at it before the 2.4.0 release. Gnome-terminal still starts up with an extremely ugly font where Hungarian non-Latin1 letters look very differently than letters that fit in Latin1. I do not completely understand how language matching should work in fontconfig, but I created a one-line cheat patch (attached) which lies FcLangEqual instead of FcLangDifferentCountry if comparing "hu" with "hu-HU" (or something like that) and with this patch gnome-terminal chooses a reasonably usable font (9x15B.pcf I guess), just as if I copy hu.orth to hu_HU.orth before compiling fontconfig. Oh, and I tried to create a copy for all such "long" locale names (the list taken from "locale -a | grep _ | cut -d. -f1 | cut -d@ -f1 | sort -u"), but the resulted library always caused the applications to segfault at startup. Thanks, Egmont On Thu, Mar 02, 2006 at 08:18:44PM +0100, Egmont Koblinger wrote: > Hi, > > Up to fontconfig 2.2.97 my gnome-terminal (configured to use "Fixed Bold > 12") as well as the pure vte application (patched to use this font too) > behaved like this: > > If I started it with LANG=en_US or en_US.UTF-8 or something similar, then it > used a character set where special Hungarian letters (such as "ő": o with > double acute, U+0151) had a completely different look than o, ó, and ö > (which are part of Latin-1 as opposed to the double acute version). > > But if I launched it with LANG=hu_HU (which is a Latin-2 locale) or > LANG=hu_HU.UTF-8 then it chose a completely different font where the special > Hungarian letters had the same design as other characters. > > After all, I was perfectly happy with this. > > Beginning with 2.2.98, even up to the current 2.3.94, the situation is > different. If I start these applications with LANG=hu (which is not a valid > locale according to glibc) then I get the same charset as I did before for > Hungarian, it looks okay. However, if I have LANG=hu_HU or LANG=hu_HU.UTF-8 > (or LANG=hu.UTF-8, which isn't valid either), then it uses the same font as > in the en_US case, which is terribly ugly for Hungarian characters. > > So I have a feeling that somehow newer fontconfigs fail to match the "hu_HU" > or "hu_HU.UTF-8" locale against the "hu" orthograpy rules. Is it possible, > or do I miss something else? > > I haven't yet been able to track down its reason, but I found that if I copy > hu.orth to hu_HU.orth and recompile fontconfig then it behaves in the Good > Old way, brings up the font where Hungarian text looks okay. So it finds and > applies the "hu-HU" orthograply rules, but doesn't find the "hu" rules, > although I guess it should. > > > (PS. in 2.2.9[789] the default config is somehow different, I always get a > third charset no matter what my locale is. Hence I always used the config > files from <=2.2.96 or >=2.3.0 (this didn't make a difference at all) to get > the described behavior, which looks buggy if fontconfig library is >=2.2.97.) > > > > > -- > Egmont
diff -Naur fontconfig-2.3.94.orig/src/fclang.c fontconfig-2.3.94/src/fclang.c --- fontconfig-2.3.94.orig/src/fclang.c 2006-02-05 20:32:53.000000000 +0100 +++ fontconfig-2.3.94/src/fclang.c 2006-04-13 17:07:01.000000000 +0200 @@ -145,7 +145,7 @@ if (c1 != c2) { if (FcLangEnd (c1) && FcLangEnd (c2)) - result = FcLangDifferentCountry; + result = FcLangEqual; /* cheat :-) */ return result; } else if (!c1)
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig