[cairo] Userfont hinting

Peter Clifton pcjc2 at cam.ac.uk
Sat May 10 05:26:25 PDT 2008


On Sat, 2008-05-10 at 14:00 +0200, Behdad Esfahbod wrote:
> 
> 
> > diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c
> > index 6422d1b..b006b43 100644
> > --- a/src/cairo-user-font.c
> > +++ b/src/cairo-user-font.c
> > @@ -119,12 +119,12 @@ _cairo_user_scaled_glyph_init (void
> *abstract_font,
> >             cairo_surface_t *analysis_surface =
> _cairo_analysis_surface_create (null_surface, -1, -1);
> >             cairo_surface_destroy (null_surface);
> >  
> > -           _cairo_analysis_surface_set_ctm (analysis_surface,
> &scaled_font->base.scale_inverse);
> >             status = _cairo_meta_surface_replay (meta_surface,
> analysis_surface);
> >             _cairo_analysis_surface_get_bounding_box
> (analysis_surface, &bbox);
> >             cairo_surface_destroy (analysis_surface);
> >  
> >             _cairo_box_to_doubles (&bbox, &x1, &y1, &x2, &y2);
> > +           _cairo_matrix_transform_bounding_box
> (&scaled_font->base.scale_inverse, &x1, &y1, &x2, &y2, NULL);
> >  
> >             extents.x_bearing = x1;
> >             extents.y_bearing = y1;
> 
> This kinda fixes it, but is the wrong way to compute the extents.  I'll
> write about why it's wrong later (when I produce a graph showing the
> difference).

Stroke widths?

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



More information about the cairo mailing list