[cairo] User-font branch, hinting?
pcjc2 at cam.ac.uk
Tue Apr 8 03:46:22 PDT 2008
On Mon, 2008-04-07 at 16:48 -0400, Behdad Esfahbod wrote:
> On Fri, 2008-03-28 at 20:43 -0400, Peter Clifton wrote:
> > Hi guys,
> Sorry for the late reply. Still traveling. Writing this in an airplane
Thanks for the reply!
> > What I'm wondering though (and please forgive the noob-ness...), does
> > the render_glyph function have any chance to render a given glyph with
> > different precision at different scaling? (IE.. aware of the pixel grid
> > on the final output surface?)
> Sure. Just use the ctm and font options from the cairo_t passed to
> render_glyph and do whatever you want. You can even reset the ctm to
> identity and draw in device space instead of in font space.
> (The font options comes straight from the scaled_font. The ctm is the
> matrix multiplication of the scaled_font ctm and font_matrix. That's
> the only matrix the user font cares about...)
Ok, so the rendering function will get called for every glyph being
rendered, every time? (No caching?). I'd have thought that would slow
things down, but haven't got far enough with my implementation to really
> > BTW.. does pango fit into the user-font equation anywhere? (IE.. for
> > laying out more complex multi-line texts?). Is there a corresponding
> > piece of work which could / will make pango support cairo user-fonts?
> Nothing concrete yet, but planned. Something like this should do it:
> I probably also need to add a bare PangoCairoFontMap that is not
> associated with any particular font backend...
Ok, thanks for the pointer.
Electrical Engineering Division,
University of Cambridge,
9, JJ Thomson Avenue,
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the cairo