[cairo] Internal font subset interface

Emmanuel Pacaud emmanuel.pacaud at univ-poitiers.fr
Tue May 9 22:43:38 PDT 2006


Le mardi 09 mai 2006 à 17:40 -0700, Carl Worth a écrit :
> On Mon, 08 May 2006 11:35:50 -0700, Carl Worth wrote:
> >
> > 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.)
> 
> Never mind, there's really nothing in the font subset interface that
> has anything to do with the user font interface, (other than perhaps
> some very general stylistic notions).
> 
> But here's what I have to propose for the internal font subsetting
> interface for now. I think it should be quite straightforward to use
> this to implement the current capabilities of the PS and SVG surfaces,
> and to add type 3 font capabilities to the PDF surface.
> 
> Once that is done, interesting things to add to this would be to
> extract an unscaled_font from the scaled_font when possible, (so that
> perhaps the foreach_glyph callback could receive either an unscaled or
> a scaled font), and then also adding back the TrueType font subsetting
> capability that krh originally wrote quite a while ago.
> 
> If anyone has any feedback on this so far, let me know. I should be
> back with the rest of the implementation before too long.

Looks ok for me.

One comment though: SVG backend doesn't have a glyph per subfont limit,
so it would be great if _cairo_scaled_font_subsets_create could accept a
value <= 0 as maxglyphs, indicating no limit.

And also makes _cairo_scaled_font_subsets_allocate_glyph accept NULL as
sub_font_id placeholder. By the way, I think subsets_use_glyph would be
a clearer name than subsets_allocate_glyph.

	Emmanuel.





More information about the cairo mailing list