};
# endif
+static int _fc_spacing_map[] =
+{
+ FC_PROPORTIONAL,
+ FC_DUAL,
+ FC_MONO,
+ FC_CHARCELL
+};
+
#endif
struct _Style_Map
{"italic", EVAS_FONT_SLANT_ITALIC}
};
+static Style_Map _style_spacing_map[] =
+{
+ {"proportional", EVAS_FONT_SPACING_PROPORTIONAL},
+ {"dualwidth", EVAS_FONT_SPACING_DUAL},
+ {"monospace", EVAS_FONT_SPACING_MONO},
+ {"charcell", EVAS_FONT_SPACING_CHARCELL}
+};
+
#define _STYLE_MAP_LEN(x) (sizeof(x) / sizeof(*(x)))
/**
* @internal
/* FIXME: Do actual comparison, i.e less than and bigger than. */
return !((a->name == b->name) && (a->weight == b->weight) &&
(a->slant == b->slant) && (a->width == b->width) &&
- (a->lang == b->lang));
+ (a->spacing == b->spacing) && (a->lang == b->lang));
}
void
else if (!strncmp(name, ":width=", 7))
{
_SET_STYLE(width);
+ }
+ else if (!strncmp(name, ":spacing=", 9))
+ {
+ _SET_STYLE(spacing);
#undef _SET_STYLE
}
else if (!strncmp(name, ":lang=", 6))
p_nm = FcPatternBuild (NULL,
FC_WEIGHT, FcTypeInteger, _fc_weight_map[fdesc->weight],
FC_SLANT, FcTypeInteger, _fc_slant_map[fdesc->slant],
+ FC_SPACING, FcTypeInteger, _fc_spacing_map[fdesc->spacing],
#ifdef FC_WIDTH
FC_WIDTH, FcTypeInteger, _fc_width_map[fdesc->width],
#endif
EVAS_FONT_WIDTH_ULTRAEXPANDED
};
+enum _Evas_Font_Spacing
+{
+ EVAS_FONT_SPACING_PROPORTIONAL,
+ EVAS_FONT_SPACING_DUAL,
+ EVAS_FONT_SPACING_MONO,
+ EVAS_FONT_SPACING_CHARCELL
+};
+
typedef enum _Evas_Font_Style Evas_Font_Style;
typedef enum _Evas_Font_Slant Evas_Font_Slant;
typedef enum _Evas_Font_Weight Evas_Font_Weight;
typedef enum _Evas_Font_Width Evas_Font_Width;
+typedef enum _Evas_Font_Spacing Evas_Font_Spacing;
/* General types - used for script type chceking */
#define OPAQUE_TYPE(type) struct __##type { int a; }; \
Evas_Font_Slant slant;
Evas_Font_Weight weight;
Evas_Font_Width width;
+ Evas_Font_Spacing spacing;
Eina_Bool is_new : 1;
};