Mercurial > hg > xemacs-beta
comparison src/font-mgr.c @ 3935:f56fa2f5f055
[xemacs-hg @ 2007-05-01 14:22:36 by stephent]
Add fc-version, improve xft-version variables. <87d51khb0d.fsf@uwakimon.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 01 May 2007 14:22:38 +0000 |
parents | fd1f0c73d4df |
children | dfd878799ef0 |
comparison
equal
deleted
inserted
replaced
3934:8453b9b6286f | 3935:f56fa2f5f055 |
---|---|
67 . Fontconfig fontnames are encoded in UTF-8. | 67 . Fontconfig fontnames are encoded in UTF-8. |
68 */ | 68 */ |
69 | 69 |
70 Lisp_Object Qfont_mgr; | 70 Lisp_Object Qfont_mgr; |
71 Lisp_Object Qfc_patternp; | 71 Lisp_Object Qfc_patternp; |
72 Lisp_Object Qfc_fontsetp; | |
73 /* Lisp_Object Qfc_result_match; */ /* FcResultMatch */ | 72 /* Lisp_Object Qfc_result_match; */ /* FcResultMatch */ |
74 Lisp_Object Qfc_result_type_mismatch; /* FcResultTypeMismatch */ | 73 Lisp_Object Qfc_result_type_mismatch; /* FcResultTypeMismatch */ |
75 Lisp_Object Qfc_result_no_match; /* FcResultNoMatch */ | 74 Lisp_Object Qfc_result_no_match; /* FcResultNoMatch */ |
76 Lisp_Object Qfc_result_no_id; /* FcResultNoId */ | 75 Lisp_Object Qfc_result_no_id; /* FcResultNoId */ |
77 Lisp_Object Qfc_internal_error; | 76 Lisp_Object Qfc_internal_error; |
78 Lisp_Object Vxlfd_font_name_regexp; /* #### Really needed? */ | 77 Lisp_Object Vxlfd_font_name_regexp; /* #### Really needed? */ |
79 Lisp_Object Vxft_version; | 78 Fixnum xft_version; |
80 /* Lisp_Object Vfc_version; */ /* #### Should have this, too! */ | 79 Fixnum fc_version; |
81 Fixnum debug_xft; /* Set to 1 enables lots of obnoxious messages. | 80 Fixnum debug_xft; /* Set to 1 enables lots of obnoxious messages. |
82 Setting it to 2 or 3 enables even more. */ | 81 Setting it to 2 or 3 enables even more. */ |
83 #ifdef FONTCONFIG_EXPOSE_CONFIG | 82 #ifdef FONTCONFIG_EXPOSE_CONFIG |
84 Lisp_Object Qfc_configp; | 83 Lisp_Object Qfc_configp; |
85 static Lisp_Object Vfc_config_weak_list; | 84 static Lisp_Object Vfc_config_weak_list; |
1041 } | 1040 } |
1042 | 1041 |
1043 DEFUN("fc-get-version", Ffc_get_version, 0, 0, 0, /* | 1042 DEFUN("fc-get-version", Ffc_get_version, 0, 0, 0, /* |
1044 -- Function: int FcGetVersion (void) | 1043 -- Function: int FcGetVersion (void) |
1045 Returns the version number of the library. | 1044 Returns the version number of the library. |
1046 XEmacs: No, this should NOT return a pretty string. | 1045 XEmacs: No, this should NOT return a pretty string. |
1047 (let ((i (fc-get-version))) | 1046 (let ((i (fc-get-version))) |
1048 (format "%d.%d.%d" (/ i 10000) (mod (/ i 100) 100) (mod i 100))) | 1047 (format "%d.%d.%d" (/ i 10000) (mod (/ i 100) 100) (mod i 100))) |
1049 gives the usual x.y.z format. */ | 1048 gives the usual x.y.z format. This is the version of the .so. It can be |
1049 checked against `fc-version', which is the version of fontconfig.h. | |
1050 It's probably not a disaster if `(> (fc-get-version) fc-version)'. */ | |
1050 ()) | 1051 ()) |
1051 { | 1052 { |
1052 return make_int (FcGetVersion ()); | 1053 return make_int (FcGetVersion ()); |
1053 } | 1054 } |
1054 | 1055 |
1256 } | 1257 } |
1257 | 1258 |
1258 void | 1259 void |
1259 vars_of_font_mgr (void) | 1260 vars_of_font_mgr (void) |
1260 { | 1261 { |
1261 /* #### The next two functions belong somewhere else. */ | 1262 /* #### The next two DEFVARs belong somewhere else. */ |
1262 | 1263 |
1263 /* #### I know, but the right fix is use the generic debug facility. */ | 1264 /* #### I know, but the right fix is use the generic debug facility. */ |
1264 DEFVAR_INT ("xft-debug-level", &debug_xft /* | 1265 DEFVAR_INT ("xft-debug-level", &debug_xft /* |
1265 Level of debugging messages to issue to stderr for Xft. | 1266 Level of debugging messages to issue to stderr for Xft. |
1266 A nonnegative integer. Set to 0 to suppress all warnings. | 1267 A nonnegative integer. Set to 0 to suppress all warnings. |
1267 Default is 1 to ensure a minimum of debugging output at initialization. | 1268 Default is 1 to ensure a minimum of debugging output at initialization. |
1268 Higher levels give even more information. | 1269 Higher levels give even more information. |
1269 */ ); | 1270 */ ); |
1270 debug_xft = 1; | 1271 debug_xft = 1; |
1271 | 1272 |
1272 DEFVAR_LISP("xft-version", &Vxft_version /* | 1273 DEFVAR_CONST_INT("xft-version", &xft_version /* |
1273 The major version number of the Xft library being used. | 1274 The major version number of the Xft library being used. |
1274 */ ); | 1275 */ ); |
1275 Vxft_version = make_int(XFT_VERSION); | 1276 xft_version = XFT_VERSION; |
1277 | |
1278 DEFVAR_CONST_INT("fc-version", &fc_version /* | |
1279 The version number of fontconfig.h. It can be checked against | |
1280 `(fc-get-version)', which is the version of the .so. | |
1281 It's probably not a disaster if `(> (fc-get-version) fc-version)'. | |
1282 */ ); | |
1283 fc_version = FC_VERSION; | |
1276 | 1284 |
1277 Fprovide (intern ("font-mgr")); | 1285 Fprovide (intern ("font-mgr")); |
1278 } | 1286 } |
1279 | 1287 |
1280 void | 1288 void |