Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common
Modified Files:
evas_font_query.c
Log Message:
tb2 work! :)
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_font_query.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas_font_query.c 18 Jun 2005 01:00:31 -0000 1.18
+++ evas_font_query.c 9 Sep 2005 14:19:06 -0000 1.19
@@ -27,7 +27,7 @@
FT_UInt index;
RGBA_Font_Glyph *fg;
int chr_x, chr_y, chr_w;
- int gl;
+ int gl, kern;
gl = evas_common_font_utf8_get_next((unsigned char *)text, &chr);
if (gl == 0) break;
@@ -35,6 +35,7 @@
/* hmmm kerning means i can't sanely do my own cached metric tables! */
/* grrr - this means font face sharing is kinda... not an option if */
/* you want performance */
+ kern = 0;
if ((use_kerning) && (prev_index) && (index) &&
(pface == fi->src->ft.face))
{
@@ -42,7 +43,10 @@
if (FT_Get_Kerning(fi->src->ft.face, prev_index, index,
ft_kerning_default, &delta) == 0)
- pen_x += delta.x << 2;
+ {
+ kern = delta.x << 2;
+ pen_x += kern;
+ }
}
pface = fi->src->ft.face;
fg = evas_common_font_int_cache_glyph_get(fi, index);
@@ -50,7 +54,14 @@
chr_x = (pen_x + (fg->glyph_out->left << 8)) >> 8;
chr_y = (pen_y + (fg->glyph_out->top << 8)) >> 8;
- chr_w = fg->glyph_out->bitmap.width;
+// chr_w = fg->glyph_out->bitmap.width;
+ chr_w = fg->glyph_out->bitmap.width + (kern >> 8);
+ {
+ int advw;
+
+ advw = ((fg->glyph->advance.x + (kern << 8)) >> 16);
+ if (chr_w < advw) chr_w = advw;
+ }
if ((!prev_index) && (chr_x < 0))
start_x = chr_x;
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs