changeset 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 8453b9b6286f
children 5db7720dd944
files src/ChangeLog src/font-mgr.c
diffstat 2 files changed, 24 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue May 01 14:01:47 2007 +0000
+++ b/src/ChangeLog	Tue May 01 14:22:38 2007 +0000
@@ -1,3 +1,11 @@
+2007-05-01  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* font-mgr.c (Qfontsetp): Remove unused declaration.
+	
+	* font-mgr.c (xft-version): Make it a DEFVAR_CONST_INT.
+
+	* font-mgr.c (fc-version): New: fontconfig.h version.
+
 2007-01-02  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* faces.c:
--- a/src/font-mgr.c	Tue May 01 14:01:47 2007 +0000
+++ b/src/font-mgr.c	Tue May 01 14:22:38 2007 +0000
@@ -69,15 +69,14 @@
 
 Lisp_Object Qfont_mgr;
 Lisp_Object Qfc_patternp;
-Lisp_Object Qfc_fontsetp;
 /* Lisp_Object Qfc_result_match; */ 	/* FcResultMatch */
 Lisp_Object Qfc_result_type_mismatch;	/* FcResultTypeMismatch */
 Lisp_Object Qfc_result_no_match; 	/* FcResultNoMatch */
 Lisp_Object Qfc_result_no_id;		/* FcResultNoId */
 Lisp_Object Qfc_internal_error;
 Lisp_Object Vxlfd_font_name_regexp;	/* #### Really needed? */
-Lisp_Object Vxft_version;
-/* Lisp_Object Vfc_version; */		/* #### Should have this, too! */
+Fixnum xft_version;
+Fixnum fc_version;
 Fixnum debug_xft;		/* Set to 1 enables lots of obnoxious messages.
 				   Setting it to 2 or 3 enables even more. */
 #ifdef FONTCONFIG_EXPOSE_CONFIG
@@ -1043,10 +1042,12 @@
 DEFUN("fc-get-version", Ffc_get_version, 0, 0, 0, /*
  -- Function: int FcGetVersion (void)
      Returns the version number of the library.
-     XEmacs:  No, this should NOT return a pretty string.
+XEmacs:  No, this should NOT return a pretty string.
      (let ((i (fc-get-version)))
        (format "%d.%d.%d" (/ i 10000) (mod (/ i 100) 100) (mod i 100)))
-     gives the usual x.y.z format. */
+gives the usual x.y.z format.  This is the version of the .so.  It can be
+checked against `fc-version', which is the version of fontconfig.h.
+It's probably not a disaster if `(> (fc-get-version) fc-version)'. */
       ())
 {
   return make_int (FcGetVersion ());
@@ -1258,7 +1259,7 @@
 void
 vars_of_font_mgr (void)
 {
-  /* #### The next two functions belong somewhere else. */
+  /* #### The next two DEFVARs belong somewhere else. */
 
   /* #### I know, but the right fix is use the generic debug facility. */
   DEFVAR_INT ("xft-debug-level", &debug_xft /*
@@ -1269,10 +1270,17 @@
 */ );
   debug_xft = 1;
 
-  DEFVAR_LISP("xft-version", &Vxft_version /*
+  DEFVAR_CONST_INT("xft-version", &xft_version /*
 The major version number of the Xft library being used.
 */ );
-  Vxft_version = make_int(XFT_VERSION);
+  xft_version = XFT_VERSION;
+
+  DEFVAR_CONST_INT("fc-version", &fc_version /*
+The version number of fontconfig.h.  It can be checked against
+`(fc-get-version)', which is the version of the .so.
+It's probably not a disaster if `(> (fc-get-version) fc-version)'.
+*/ );
+  fc_version = FC_VERSION;
 
   Fprovide (intern ("font-mgr"));
 }