summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d5c0f2)
raw | patch | inline | side by side (parent: 4d5c0f2)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 1 May 2005 11:00:10 +0000 (11:00 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 1 May 2005 11:00:10 +0000 (11:00 +0000) |
program/src/rrd_gfx.c | patch | blob | history |
diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c
index 3335e9133394c60e902258e677a96e09371f7a60..045892aa2b3c2718f2254f19ff21bb3dd47506b3 100644 (file)
--- a/program/src/rrd_gfx.c
+++ b/program/src/rrd_gfx.c
unsigned int n;
int error;
int gottab = 0;
+ #ifdef HAVE_MBSTOWCS
+ wchar_t* w_text;
+ #endif
ft_pen.x = 0; /* start at (0,0) !! */
ft_pen.y = 0;
string->transform.yx = (FT_Fixed)( sin(M_PI*(rotation)/180.0)*0x10000);
string->transform.yy = (FT_Fixed)( cos(M_PI*(rotation)/180.0)*0x10000);
+ #ifdef HAVE_MBSTOWCS
+ w_text = (wchar_t) calloc (string->count,sizeof(wchar_t));
+ mbstowcs(w_text,text,string->count);
+ #endif
+
use_kerning = FT_HAS_KERNING(face);
previous = 0;
glyph = string->glyphs;
glyph->pos.y = 0;
glyph->image = NULL;
+#ifdef HAVE_MBSTOWCS
+ glyph->index = FT_Get_Char_Index( face, w_text[n] );
+#else
glyph->index = FT_Get_Char_Index( face, letter );
+#endif
/* compute glyph origin */
if ( use_kerning && previous && glyph->index ) {
string->width = string->bbox.xMax - string->bbox.xMin;
}
string->height = string->bbox.yMax - string->bbox.yMin;
+#ifdef HAVE_MBSTOWSC
+ free(w_text);
+#endif
+
return string;
}