[Fontconfig] Re: [Cairo] Text API proposal

Hans Breuer Hans at Breuer.org
Tue Aug 12 09:13:25 EST 2003

At 09:24 11.08.03 -0700, Keith Packard wrote:
>Around 10 o'clock on Jul 30, Owen Taylor wrote:
>> And for the real API, you need:
>>     - Scale/Apply a transformation matrix to a font
>>     - Render a glyph to a bitmap
>>     - Add a glyph to a cairo path
>There are two other important operations:
>      - convert a glyph to a path
The function to use on win32 is GetGlyphOutline. I'm discussing how 
it could be used to make gtk-win32 apps more independent of direct 
Freetype usage in http://bugzilla.gnome.org/show_bug.cgi?id=107668

>      - embed glyphs in a postscript file
The funtion to use is GetFontData, but I'm not sure if this (producing
PS files) is really that useful on win32. Remember there is already an 
almost working Device Context abstraction in the platform for a 
long time. 

With it you are not forced to use (expensive) Postscript printers or 
an external program like Ghostcript, but can simply use almost the 
same code to render to display or _any_ printer (with a windoze 
driver) even those ugly GDI only printers which put the burden 
completely on the PC side.

There is some code of mine which does use it in dia/plug-ins/wmf/wm.cpp
and dia/app/paginate_gdiprint.cpp both in GNOME cvs.

>Can I use Windows (or OS X) apis to get the outline of each glyph?  If 
>not, then I'm not sure how we can make cairo work in those environments 
>without replacing the OS-specific font libraries with FreeType.
I'm expecting these kind of APIs to be available for OS X as well
where there is 'display pdf' but currently don't have access
to my iBook.

>I think we should consider os-specific font selection mechanisms though, 
>with fontconfig used where appropriate.
My main problem with fontconfig on win32 is perfectly described by 
Owen in the previous mail. The only thing I like to add is that 
I still doubt it's useful to have two independent font rendering 
machineries in one process - but if there is : they need to interact
sane, have the same names and properties for the same fonts, etc.


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert

More information about the Fontconfig mailing list