the multibyte support tried did not work ... takeing it out again
[rrdtool.git] / src / rrd_gfx.c
index 9455d85..becab8c 100644 (file)
@@ -372,7 +372,6 @@ gfx_string gfx_string_create(FT_Face face,const char *text,
   unsigned int  n;
   int           error;
   int        gottab = 0;    
-
   ft_pen.x = 0;   /* start at (0,0) !! */
   ft_pen.y = 0;
 
@@ -390,12 +389,13 @@ gfx_string gfx_string_create(FT_Face face,const char *text,
   use_kerning = FT_HAS_KERNING(face);
   previous    = 0;
   glyph = string->glyphs;
-  for (n=0; n<string->count; n++, glyph++) {
+  for (n=0; n<string->count;glyph++) {
     FT_Vector   vec;
     /* handle the tabs ...
        have a witespace glyph inserted, but set its width such that the distance
     of the new right edge is x times tabwidth from 0,0 where x is an integer. */    
-    char letter = text[n];
+    unsigned char letter = text[n];
+          
     gottab = 0;
     if (letter == '\\' && n+1 < string->count && text[n+1] == 't'){
             /* we have a tab here so skip the backslash and
@@ -470,6 +470,8 @@ gfx_string gfx_string_create(FT_Face face,const char *text,
     /* increment number of glyphs */
     previous = glyph->index;
     string->num_glyphs++;
+    n++;
+    
   }
 /*  printf ("number of glyphs = %d\n", string->num_glyphs);*/
   compute_string_bbox( string );
@@ -480,6 +482,7 @@ gfx_string gfx_string_create(FT_Face face,const char *text,
       string->width = string->bbox.xMax - string->bbox.xMin;
   }
   string->height = string->bbox.yMax - string->bbox.yMin;
+
   return string;
 }