[cairo] text to postscript rendering

Dominic Lachowicz domlachowicz at gmail.com
Wed Feb 27 08:32:19 PST 2008


On Wed, Feb 27, 2008 at 11:02 AM, Carl Worth <cworth at cworth.org> wrote:
>  But that "real" API does provide the chance for someone to do all this
>  hard work and provide a library on top of cairo that provides font
>  substitution, high-quality layout, line-breaking etc. The pango
>  library is exactly such a library. And here's a simple program showing
>  how to use it with cairo:
>
>         http://cairographics.org/~cworth/utf8test-pango.c
>
>  And pango should work just fine on win32 platforms as far as I
>  understand, (it's not something I've ever tried though).

Yup, Pango works quite well on Win32. But it brings in a few
dependencies that people might want to avoid.

Another option is to use the platform's native Unicode processor. On
Win32, this is Uniscribe [1]. On MacOSX, it's ATSUI [2].

Given a Unicode string, you'll find APIs that will do shaping and
return you a list of glyphs, which you can pass to the functions Carl
just mentioned. It's a little bit of work and, unfortunately, I'm not
aware of any sample programs that show how to use Uniscribe or ATSUI
with Cairo.

Cheers,
Dom

1: http://www.microsoft.com/typography/developers/uniscribe/
2: http://developer.apple.com/documentation/Carbon/Conceptual/ATSUI_Concepts/atsui_chap1/chapter_1_section_1.html


More information about the cairo mailing list