git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@691
a5681a0c-68f1-0310-ab6d-
d61299d08faa
FT_Init_FreeType( &library );
error = FT_New_Face( library, font, 0, &face );
FT_Init_FreeType( &library );
error = FT_New_Face( library, font, 0, &face );
- if ( error ) return -1;
+ if ( error ) {
+ FT_Done_FreeType(library);
+ return -1;
+ }
error = FT_Set_Char_Size(face, size*64,size*64, 100,100);
error = FT_Set_Char_Size(face, size*64,size*64, 100,100);
- if ( error ) return -1;
-
+ if ( error ) {
+ FT_Done_FreeType(library);
+ return -1;
+ }
string = gfx_string_create( canvas, face, text, rotation, tabwidth, size );
text_width = string->width;
gfx_string_destroy(string);
string = gfx_string_create( canvas, face, text, rotation, tabwidth, size );
text_width = string->width;
gfx_string_destroy(string);
&face );
if ( error ) {
rrd_set_error("failed to load %s",node->filename);
&face );
if ( error ) {
rrd_set_error("failed to load %s",node->filename);
break;
}
error = FT_Set_Char_Size(face, /* handle to face object */
break;
}
error = FT_Set_Char_Size(face, /* handle to face object */