[cairo] Userfont hinting
Peter Clifton
pcjc2 at cam.ac.uk
Fri May 9 17:33:46 PDT 2008
On Fri, 2008-05-09 at 13:58 +0200, Behdad Esfahbod wrote:
> On Fri, 2008-05-09 at 12:55 +0100, Peter Clifton wrote:
> >
> > Could the meta-surface / analysis surface be using fixed point with an
> > inappropriate precision?
>
> Possible. analysis-surface does use the fixed box model. I'm finishing
> the patch split. Will look into this after.
Might be the wrong thing, but this patch fixes it for me:
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;
--
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