#include "character.h"
#include "charset.h"
#include "coding.h"
+#include "composite.h"
#include "fontset.h"
#include "font.h"
#include "ftfont.h"
Lisp_Object slot;
FcPattern *match;
FcResult result;
+ FcLangSet *langset;
family = Fintern (Fdowncase (SYMBOL_NAME (family)), Qnil);
if (EQ (family, Qmono))
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);
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;
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++)
{