[cairo] User font take 2

Keith Packard keithp at keithp.com
Mon May 8 15:34:23 PDT 2006

On Mon, 2006-05-08 at 11:35 -0700, Carl Worth wrote:

> And I think I'd be more inclined to return a cairo_surface_t* instead
> of a cairo_t*.

I thought the return of a cairo_t was somewhat clever -- it could be
prescaled to provide the desired dynamic range to avoid losing precision
in glyph scaling.

> 1) cairo-font-subset.c
> 	Used only by cairo-pdf-surface.c and based on
> 	cairo_unscaled_font_t. Uses a callback structure and is what
> 	krh had written before making the original callback-based user
> 	font proposal.

remember that cairo_unscaled_font_t isn't universally supported by font

> 2) cairo-ps-surface.c
> 	Obviously used only by this surface and is based on
> 	cairo_scaled_font_t. Was written by keithp before making the
> 	non-callback counter-proposal for user font stuff.
> 3) cairo-svg-surface.c
> 	Obviously used only by this surface. Appeared suddenly this
> 	weekend by emmanuel, coder extraordinaire. Credited as being
> 	an adaptation of keithp's work in cairo-ps-surface.c.

I'd like a general wrapper above these two that used
cairo_unscaled_font_t where available so that we don't replicate glyphs
in the output file.

> So, before I go and make a 4th implementation for cairo-pdf-surface.c
> I'll try to come up with something that will at least allow some
> sharing. And I'll do that with an eye on the latest user font
> proposals to see how the interfaces might play out. (The font
> subsetting and user font use cases are not identical, but I think
> there might be enough similarities to be useful.)

I think the user font stuff is just another font back-end and should
expose itself using the existing font backend APIs.

keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060508/0e980bc9/attachment.pgp

More information about the cairo mailing list