APPROVE COMMIT sjt-xft
What the heck is going on here, I don't know how to explain although
I'm starting to get an idea. But anyway that didn't work and this does....
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.758.2.14
diff -u -U0 -r1.758.2.14 ChangeLog
--- src/ChangeLog 24 Feb 2005 09:32:25 -0000 1.758.2.14
+++ src/ChangeLog 24 Feb 2005 11:04:48 -0000
@@ -0,0 +1,5 @@
+2005-02-24 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * objects-x.c (x_find_charset_font): ConfigSubstitute in the
+ _pattern_ before matching.
+
Index: src/objects-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-x.c,v
retrieving revision 1.26.2.8
diff -u -r1.26.2.8 objects-x.c
--- src/objects-x.c 21 Feb 2005 08:43:33 -0000 1.26.2.8
+++ src/objects-x.c 24 Feb 2005 11:04:57 -0000
@@ -1059,14 +1059,12 @@
FcChar8 *lang = "en";
fcc = FcConfigGetCurrent ();
patternxft = FcNameParse (patternext);
- /* #### Next four return FcBool, but what does the return mean? */
- /* #### There's probably a way to do this with FcCharsets, but isn't
- the language approach better in the long run? */
- /* #### can we regression test this, or does it break too early? */
if (debug_xft > 1)
stderr_out ("FcNameParse'ed name is %s\n",
FcNameUnparse (patternxft));
- FcConfigSubstitute (fcc, patternxft, FcMatchFont);
+ /* #### Next two return FcBool, but what does the return mean? */
+ /* #### I wonder if the order of the next two should be reversed. */
+ FcConfigSubstitute (fcc, patternxft, FcMatchPattern);
if (debug_xft > 1)
stderr_out ("FcConfigSubstitute'ed name is %s\n",
FcNameUnparse (patternxft));
@@ -1074,6 +1072,14 @@
if (debug_xft > 0)
stderr_out ("FcDefaultSubstitute'ed name is %s\n",
FcNameUnparse (patternxft));
+ patternxft = FcFontMatch (fcc, patternxft, &fcresult);
+ if (debug_xft > 0)
+ stderr_out ("FcFontMatch'ed name is %s\n",
+ FcNameUnparse (patternxft));
+
+ /* #### There's probably a way to do this with FcCharsets, but isn't
+ the language approach better in the long run? */
+ /* #### can we regression test this, or does it break too early? */
if (EQ (charset, Fget_charset (intern ("katakana-jisx0201")))
|| EQ (charset, Fget_charset (intern ("japanese-jisx0208")))
|| EQ (charset, Fget_charset (intern ("japanese-jisx0212"))))
@@ -1097,7 +1103,6 @@
/* default to "en" */
}
- patternxft = FcFontMatch (fcc, patternxft, &fcresult);
/* #### stderr_out crashed in the next block; why?
probably because FcTypeOfValueToString below didn't get
an argument!! Fixed now, but watch for crashes. */
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.