[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/ftfont.c,v
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/ftfont.c,v |
Date: |
Wed, 28 May 2008 11:45:30 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/05/28 11:45:29
Index: ftfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ftfont.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- ftfont.c 23 May 2008 02:11:22 -0000 1.15
+++ ftfont.c 28 May 2008 11:45:29 -0000 1.16
@@ -468,7 +468,6 @@
FcLangSet *langset = NULL;
int n;
int dpi = -1;
- int spacing = -1;
int scalable = -1;
Lisp_Object name = Qnil;
Lisp_Object script = Qnil;
@@ -485,8 +484,6 @@
if (INTEGERP (AREF (spec, FONT_DPI_INDEX)))
dpi = XINT (AREF (spec, FONT_DPI_INDEX));
- if (INTEGERP (AREF (spec, FONT_SPACING_INDEX)))
- spacing = XINT (AREF (spec, FONT_SPACING_INDEX));
if (INTEGERP (AREF (spec, FONT_AVGWIDTH_INDEX))
&& XINT (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0)
scalable = 1;
@@ -589,9 +586,6 @@
if (dpi >= 0
&& ! FcPatternAddDouble (pattern, FC_DPI, dpi))
goto err;
- if (spacing >= 0
- && ! FcPatternAddInteger (pattern, FC_SPACING, spacing))
- goto err;
if (scalable >= 0
&& ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue :
FcFalse))
goto err;
@@ -633,6 +627,7 @@
int fc_charset_idx;
char otlayout[15]; /* For "otlayout:XXXX" */
struct OpenTypeSpec *otspec = NULL;
+ int spacing = -1;
if (! fc_initialized)
{
@@ -643,6 +638,8 @@
pattern = ftfont_spec_pattern (spec, &fc_charset_idx, otlayout, &otspec);
if (! pattern)
return Qnil;
+ if (INTEGERP (AREF (spec, FONT_SPACING_INDEX)))
+ spacing = XINT (AREF (spec, FONT_SPACING_INDEX));
registry = AREF (spec, FONT_REGISTRY_INDEX);
family = AREF (spec, FONT_FAMILY_INDEX);
if (! NILP (family))
@@ -661,7 +658,7 @@
objset = FcObjectSetBuild (FC_FOUNDRY, FC_FAMILY, FC_WEIGHT, FC_SLANT,
FC_WIDTH, FC_PIXEL_SIZE, FC_SPACING, FC_SCALABLE,
- FC_CHARSET, FC_FILE,
+ FC_FILE,
#ifdef FC_CAPABILITY
FC_CAPABILITY,
#endif /* FC_CAPABILITY */
@@ -676,6 +673,16 @@
{
Lisp_Object entity;
+ if (spacing >= 0)
+ {
+ int this;
+
+ if ((FcPatternGetInteger (fontset->fonts[i], FC_SPACING, 0, &this)
+ == FcResultMatch)
+ && spacing != this)
+ continue;
+ }
+
#ifdef FC_CAPABILITY
if (otlayout[0])
{
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/13
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Glenn Morris, 2008/05/14
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/15
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/19
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/21
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/22
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v,
Kenichi Handa <=
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v, Kenichi Handa, 2008/05/30