[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: |
Fri, 29 Aug 2008 07:56:10 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/08/29 07:56:10
Index: ftfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ftfont.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- ftfont.c 21 Jul 2008 02:23:24 -0000 1.27
+++ ftfont.c 29 Aug 2008 07:56:10 -0000 1.28
@@ -32,6 +32,7 @@
#include "character.h"
#include "charset.h"
#include "coding.h"
+#include "composite.h"
#include "fontset.h"
#include "font.h"
#include "ftfont.h"
@@ -207,6 +208,7 @@
Lisp_Object slot;
FcPattern *match;
FcResult result;
+ FcLangSet *langset;
family = Fintern (Fdowncase (SYMBOL_NAME (family)), Qnil);
if (EQ (family, Qmono))
@@ -224,6 +226,14 @@
FcPatternDel (pattern, FC_FOUNDRY);
FcPatternDel (pattern, FC_FAMILY);
FcPatternAddString (pattern, FC_FAMILY, SYMBOL_FcChar8 (family));
+ if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) != FcResultMatch)
+ {
+ /* This is to avoid the effect of locale. */
+ langset = FcLangSetCreate ();
+ FcLangSetAdd (langset, "en");
+ FcPatternAddLangSet (pattern, FC_LANG, langset);
+ FcLangSetDestroy (langset);
+ }
FcConfigSubstitute (NULL, pattern, FcMatchPattern);
FcDefaultSubstitute (pattern);
match = FcFontMatch (NULL, pattern, &result);
@@ -1769,7 +1779,7 @@
FT_Face ft_face;
OTF *otf;
{
- EMACS_UINT len = LGSTRING_LENGTH (lgstring);
+ EMACS_UINT len = LGSTRING_GLYPH_LEN (lgstring);
EMACS_UINT i;
struct MFLTFontFT flt_font_ft;
@@ -1829,7 +1839,7 @@
gstring.glyphs = realloc (gstring.glyphs,
sizeof (MFLTGlyph) * gstring.allocated);
}
- if (gstring.used > LGSTRING_LENGTH (lgstring))
+ if (gstring.used > LGSTRING_GLYPH_LEN (lgstring))
return Qnil;
for (i = 0; i < gstring.used; i++)
{
- [Emacs-diffs] Changes to emacs/src/ftfont.c,v,
Kenichi Handa <=