}
error = FT_Load_Glyph( face, glyph_index, 0 );
}
error = FT_Load_Glyph( face, glyph_index, 0 );
+ if ( error ) {
+ FT_Done_FreeType(library);
+ return -1;
+ }
if (! previous) {
text_width -= (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
}
if (! previous) {
text_width -= (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
}
text_width -= (double)slot->metrics.horiAdvance / 64.0; /* remove last step */
text_width += (double)slot->metrics.width / 64.0; /* add just char width */
text_width += (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
text_width -= (double)slot->metrics.horiAdvance / 64.0; /* remove last step */
text_width += (double)slot->metrics.width / 64.0; /* add just char width */
text_width += (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
+ FT_Done_FreeType(library);
(char *)node->filename,
0,
&face );
(char *)node->filename,
0,
&face );
use_kerning = FT_HAS_KERNING(face);
use_kerning = FT_HAS_KERNING(face);
error = FT_Set_Char_Size(face, /* handle to face object */
(long)(node->size*64),
(long)(node->size*64),
(long)(100*zoom),
(long)(100*zoom));
error = FT_Set_Char_Size(face, /* handle to face object */
(long)(node->size*64),
(long)(node->size*64),
(long)(100*zoom),
(long)(100*zoom));
pen_x = node->x * zoom;
pen_y = node->y * zoom;
slot = face->glyph;
pen_x = node->x * zoom;
pen_y = node->y * zoom;
slot = face->glyph;
}
error = FT_Load_Glyph( face, glyph_index, 0 );
}
error = FT_Load_Glyph( face, glyph_index, 0 );
if (previous == 0){
pen_x -= (double)slot->metrics.horiBearingX / 64.0; /* adjust pos for first char */
text_width -= (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
if (previous == 0){
pen_x -= (double)slot->metrics.horiBearingX / 64.0; /* adjust pos for first char */
text_width -= (double)slot->metrics.horiBearingX / 64.0; /* add just char width */
}
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_RENDER );
}
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_RENDER );
gr = slot->bitmap.num_grays -1;
for (iy=0; iy < slot->bitmap.rows; iy++){
long buf_y = iy+(pen_y+0.5)-slot->bitmap_top;
gr = slot->bitmap.num_grays -1;
for (iy=0; iy < slot->bitmap.rows; iy++){
long buf_y = iy+(pen_y+0.5)-slot->bitmap_top;
}
gfx_save_png(buffer,fp , pys_width,pys_height,bytes_per_pixel);
art_free(buffer);
}
gfx_save_png(buffer,fp , pys_width,pys_height,bytes_per_pixel);
art_free(buffer);
+ FT_Done_FreeType( library );