[cairo] PDF type3 font support; Just bugs to fix before cairo 1.2

Bill Spitzak spitzak at d2.com
Mon May 15 13:55:22 PDT 2006

Carl Worth wrote:

> 2) cairo_set_line_width should immediately use CTM
>    We've got the line-width-scale test case that demonstrates this
>    problem. I think the solution should be straightforward. Currently
>    we're saving the line width and passing it down to the backend
>    stroke functions. Instead we should save and pass a "pen" which
>    consists of a line width as well as a matrix (the CTM at the time
>    the line width was set). Thanks to Keith Packard for suggesting
>    this approach.

Could I get an indication as to whether the idea of making this work for 
fonts is being considered or has been rejected?

My personal feeling is that we certainly want to replicate this behavior 
for the current font, so that it matches the pattern and pen behavior, 
and because it should simplify things a lot by removing the need to 
track both the "unscaled" and "scaled" fonts (only the "scaled" one is 
needed), and because it is necessary to emulate OpenGL and DirectX.

The biggest problem is that one new API function needs to be added. Any 
code that wants to reuse the font (ie does not set the font) and wants 
to draw things relative to the glyphs will need access to the "font 
CTM". The best idea I think is to add an operator to change the CTM to 
the font CTM, leaving the xy translation unchanged.

Compatability is probably not a problem, for the same reason changing 
the behavior of line width is not a problem: because the current 
behavior is useless, nobody changes the CTM after setting the font.

More information about the cairo mailing list