I didn't get any responses about this so I played until I got relatively
good results.
First, I changed the DejaVu binding from "strong" to "same". This seemed
to play nice with Flash.
Next, I applied the attached patch. It basically forces the locale
environment to always be read as en_US.UTF-8.
What might be the negative side effects of that last patch? Is it
performance?
Thanks!
--Pat
Pat Suwalski wrote:
Hello,
I was wondering if anyone might have some insight into a fontconfig
problem I'm having. I'm hoping to solve it without actually changing
code, but that is always a possibility.
I installed an Arphic Chinese font. In the en_US.UTF-8 locale it looks
great, because programs like Firefox will use DejaVu for the latin text
and only use the Chinese characters from the Arphic font as needed.
In the zh_CN.UTF-8 locale it seems that the Arphic font magically has
priority. Pages in Firefox look terrible because it uses the cruddy
monotype latin characters from the Arphic font.
To work around this I made a strong binding for DejaVu Sans. This worked
well throughout, except it broke one program: Flash. I guess Flash isn't
smart enough to fall through font matches. It would attempt to get a
Chinese character, look in DejaVu Sans, not find it, and then not fall
through. So, it would draw a missing character box.
My most recent approach has been to actually edit the Arphic font, and
remove everything except the CJK glyphs. Then, without specifying a
strong binding for DejaVu, everything seems to work well in both
locales. However, this is a rather drastic approach that could have very
bad side effects in all sorts of places, like printing.
So, my question is, is there a way to make fontconfig behave in the
Chinese locale as it does in the English one?
Thanks,
--Pat
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig
diff -ur fontconfig-2.4.2.orig/src/fcdefault.c fontconfig-2.4.2/src/fcdefault.c
--- fontconfig-2.4.2.orig/src/fcdefault.c 2006-09-09 12:50:29.000000000 -0400
+++ fontconfig-2.4.2/src/fcdefault.c 2007-07-26 14:33:37.000000000 -0400
@@ -67,6 +67,9 @@
}
}
+ /* Hack */
+ strcpy (ctype, "en_CA.UTF-8");
+
/* ignore missing or empty ctype */
if (ctype && *ctype != '\0')
{
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig