in_text;
#else
const Eina_Unicode *text = in_text;
+ /* Not relevant in the Harfbuzz case, and will soon will not be relevant
+ * at all */
+ (void) text;
+ /* Should be marked as unused? or should I do something fancy about it to
+ * make sure the given fi is relevant? */
+ (void) fn;
#endif
DATA32 *im;
FT_Face pface = NULL;
#endif
im = dst->image.data;
- /* Load the glyph according to the first letter of the script, preety
- * bad, but will have to do */
- {
- /* Skip common chars */
- const Eina_Unicode *tmp;
- for (tmp = text ;
- ((size_t) (tmp - text) < text_props->text_len) &&
- evas_common_language_char_script_get(*tmp) ==
- EVAS_SCRIPT_COMMON ;
- tmp++)
- ;
- if (((size_t) (tmp - text) == text_props->text_len) && (tmp > text))
- tmp--;
- evas_common_font_glyph_search(fn, &fi, *tmp);
- }
+ fi = text_props->font_instance;
+ evas_common_font_int_reload(fi);
if (fi->src->current_size != fi->size)
{
gl = dc->font_ext.func.gl_new ? 1: 0;
above = 0; below = 0; baseline = 0; height = 0; descent = 0;
- /* Load the glyph according to the first letter of the script, preety
- * bad, but will have to do */
- {
- /* Skip common chars */
- const Eina_Unicode *tmp;
- for (tmp = text ;
- ((tmp - text) < len) &&
- evas_common_language_char_script_get(*tmp) ==
- EVAS_SCRIPT_COMMON ;
- tmp++)
- ;
- if (((tmp - text) == len) && (tmp > text)) tmp--;
- evas_common_font_glyph_search(fn, &fi, *tmp);
- }
+ fi = text_props->font_instance;
+ evas_common_font_int_reload(fi);
if (fi->src->current_size != fi->size)
{
}
#ifdef OT_SUPPORT
- size_t char_index;
- Evas_Font_Glyph_Info *gl_itr;
+ /* FIXME: as soon as we start caching fi for non-harfbuzz as well, move
+ * this (until text_props->fi = fi outside the ifdef */
const Eina_Unicode *base_char;
- Evas_Coord pen_x = 0, adjust_x = 0;
- (void) par_props;
- (void) par_pos;
-
- evas_common_font_ot_populate_text_props(fn, text, text_props, len);
-
/* Load the glyph according to the first letter of the script, preety
* bad, but will have to do */
{
evas_common_font_glyph_search(fn, &fi, *base_char);
}
+ text_props->font_instance = fi;
+
+
+ size_t char_index;
+ Evas_Font_Glyph_Info *gl_itr;
+ Evas_Coord pen_x = 0, adjust_x = 0;
+ (void) par_props;
+ (void) par_pos;
+
+ evas_common_font_ot_populate_text_props(fn, text, text_props, len);
+
gl_itr = text_props->info->glyph;
for (char_index = 0 ; char_index < text_props->len ; char_index++)
{