[cairo] User-font branch, hinting?
Behdad Esfahbod
behdad at behdad.org
Mon Apr 7 13:48:33 PDT 2008
On Fri, 2008-03-28 at 20:43 -0400, Peter Clifton wrote:
> Hi guys,
Hi,
Sorry for the late reply. Still traveling. Writing this in an airplane
now.
> I've begun to play with Behdad's user-font branch, and have manged to
> get some rendering - (yay!!)... seems to be working, and I'm drawing in
> a notional 1x1 coordinate space for my glyphs.
Nice.
> 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...)
[...]
> 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:
http://bugzilla.gnome.org/show_bug.cgi?id=347237
I probably also need to add a bare PangoCairoFontMap that is not
associated with any particular font backend...
Regards,
behdad
> Best wishes,
>
> --
> 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!)
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list