/* load the typeface */
error = TT_Open_Face( tteng->engine, fontname, &handle->face );
if ( error ) {
+ myfree(handle);
if ( error == TT_Err_Could_Not_Open_File ) {
mm_log((1, "Could not find/open %s.\n", fontname ));
}
if ( !smooth ) TT_Get_Glyph_Bitmap( glyph, bit, x_off * 64, y_off * 64);
else {
- TT_F26Dot6 xmin, ymin, xmax, ymax;
+ TT_F26Dot6 xmin, ymin;
xmin = gmetrics->bbox.xMin & -64;
ymin = gmetrics->bbox.yMin & -64;
- xmax = (gmetrics->bbox.xMax + 63) & -64;
- ymax = (gmetrics->bbox.yMax + 63) & -64;
i_tt_clear_raster_map( small_bit );
TT_Get_Glyph_Pixmap( glyph, small_bit, -xmin, -ymin );
}
}
- i_render_color(&r, xb, yb+y, bit->cols, bmp, cl);
+ i_render_color(&r, xb, yb+y, bit->width, bmp, cl);
}
i_render_done(&r);
static
int
-i_tt_rasterize( TT_Fonthandle *handle, TT_Raster_Map *bit, i_img_dim cords[6], double points, char const* txt, size_t len, int smooth, int utf8 ) {
+i_tt_rasterize( TT_Fonthandle *handle, TT_Raster_Map *bit, i_img_dim *cords, double points, char const* txt, size_t len, int smooth, int utf8 ) {
int inst;
i_img_dim width, height;
TT_Raster_Map small_bit;
static
undef_int
-i_tt_bbox_inst( TT_Fonthandle *handle, int inst ,const char *txt, size_t len, i_img_dim cords[BOUNDING_BOX_COUNT], int utf8 ) {
+i_tt_bbox_inst( TT_Fonthandle *handle, int inst ,const char *txt, size_t len, i_img_dim *cords, int utf8 ) {
int upm, casc, cdesc, first;
int start = 0;
int rightb = 0;
unsigned long j;
- unsigned char *ustr;
- ustr=(unsigned char*)txt;
mm_log((1,"i_tt_box_inst(handle %p,inst %d,txt '%.*s', len %ld, utf8 %d)\n",
handle, inst, (int)len, txt, (long)len, utf8));
*/
undef_int
-i_tt_bbox( TT_Fonthandle *handle, double points,const char *txt,size_t len,i_img_dim cords[6], int utf8) {
+i_tt_bbox( TT_Fonthandle *handle, double points,const char *txt,size_t len,i_img_dim *cords, int utf8) {
int inst;
i_clear_error();