if (ext_w <= 0) return;
if (ext_h <= 0) return;
- pen_x = x << 8;
- pen_y = y << 8;
+ pen_x = x;
+ pen_y = y;
evas_common_font_size_use(fn);
use_kerning = FT_HAS_KERNING(fi->src->ft.face);
prev_index = 0;
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
- pen_x += delta.x << 2;
+ pen_x += delta.x >> 6;
}
pface = fi->src->ft.face;
fg = evas_common_font_int_cache_glyph_get(fi, index);
fg->ext_dat_free = dc->font_ext.func.gl_free;
}
- chr_x = (pen_x + (fg->glyph_out->left << 8)) >> 8;
- chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
+ chr_x = (pen_x + (fg->glyph_out->left));
+ chr_y = (pen_y + (fg->glyph_out->top));
if (chr_x < (ext_x + ext_w))
{
}
else
break;
- pen_x += fg->glyph->advance.x >> 8;
+ pen_x += fg->glyph->advance.x >> 16;
prev_index = index;
}
}
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
{
- kern = delta.x << 2;
+ kern = delta.x >> 6;
pen_x += kern;
}
}
fg = evas_common_font_int_cache_glyph_get(fi, index);
if (!fg) continue;
- chr_x = (pen_x + (fg->glyph_out->left << 8)) >> 8;
- chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
+ chr_x = (pen_x + (fg->glyph_out->left));
+ chr_y = (pen_y + (fg->glyph_out->top));
// chr_w = fg->glyph_out->bitmap.width;
- chr_w = fg->glyph_out->bitmap.width + (kern >> 8);
+ chr_w = fg->glyph_out->bitmap.width + kern;
{
int advw;
- advw = ((fg->glyph->advance.x + (kern << 8)) >> 16);
+ advw = ((fg->glyph->advance.x + (kern << 16)) >> 16);
if (chr_w < advw) chr_w = advw;
}
if ((chr_x + chr_w) > end_x)
end_x = chr_x + chr_w;
- pen_x += fg->glyph->advance.x >> 8;
+ pen_x += fg->glyph->advance.x >> 16;
prev_index = index;
}
if (w) *w = end_x - start_x;
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
- pen_x += delta.x << 2;
+ pen_x += delta.x >> 6;
}
pface = fi->src->ft.face;
fg = evas_common_font_int_cache_glyph_get(fi, index);
if (!fg) continue;
- chr_x = (pen_x + (fg->glyph_out->left << 8)) >> 8;
- chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
+ chr_x = (pen_x + (fg->glyph_out->left));
+ chr_y = (pen_y + (fg->glyph_out->top));
chr_w = fg->glyph_out->bitmap.width;
- pen_x += fg->glyph->advance.x >> 8;
+ pen_x += fg->glyph->advance.x >> 16;
prev_index = index;
}
if (v_adv) *v_adv = evas_common_font_get_line_advance(fn);
- if (h_adv) *h_adv = (pen_x >> 8) - start_x;
+ if (h_adv) *h_adv = pen_x - start_x;
}
/* x y w h for char at char pos */
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
{
- kern = delta.x << 2;
+ kern = delta.x >> 6;
pen_x += kern;
}
}
if (!fg) continue;
if (kern < 0) kern = 0;
- chr_x = ((pen_x - kern) + (fg->glyph_out->left << 8)) >> 8;
- chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
- chr_w = fg->glyph_out->bitmap.width + (kern >> 8);
+ chr_x = ((pen_x - kern) + (fg->glyph_out->left));
+ chr_y = (pen_y + (fg->glyph_out->top));
+ chr_w = fg->glyph_out->bitmap.width + (kern);
/* if (text[chr]) */
{
int advw;
- advw = ((fg->glyph->advance.x + (kern << 8)) >> 16);
+ advw = ((fg->glyph->advance.x + (kern << 16)) >> 16);
if (chr_w < advw) chr_w = advw;
}
if (chr_x > prev_chr_end)
return 1;
}
prev_chr_end = chr_x + chr_w;
- pen_x += fg->glyph->advance.x >> 8;
+ pen_x += fg->glyph->advance.x >> 16;
prev_index = index;
}
return 0;
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
{
- kern = delta.x << 2;
+ kern = delta.x >> 6;
pen_x += kern;
}
}
if (!fg) continue;
if (kern < 0) kern = 0;
- chr_x = ((pen_x - kern) + (fg->glyph_out->left << 8)) >> 8;
- chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
- chr_w = fg->glyph_out->bitmap.width + (kern >> 8);
+ chr_x = ((pen_x - kern) + (fg->glyph_out->left));
+ chr_y = (pen_y + (fg->glyph_out->top));
+ chr_w = fg->glyph_out->bitmap.width + kern;
/* if (text[chr]) */
{
int advw;
- advw = ((fg->glyph->advance.x + (kern << 8)) >> 16);
+ advw = ((fg->glyph->advance.x + (kern << 16)) >> 16);
if (chr_w < advw) chr_w = advw;
}
if (chr_x > prev_chr_end)
return pchr;
}
prev_chr_end = chr_x + chr_w;
- pen_x += fg->glyph->advance.x >> 8;
+ pen_x += fg->glyph->advance.x >> 16;
prev_index = index;
}
return -1;