[cairo] New to Cairo: advice on creating PDFs with Arabic text (via input from libotf or SIL graphite2)

Behdad Esfahbod behdad at behdad.org
Fri May 3 07:08:23 PDT 2013


On 13-05-03 05:08 AM, Graham Douglas wrote:
> Dear List
> 
> I'm new to Cairo and have just compiled Cairo 1.12.14 as a static
> library under 64-bit Windows 7. I'm interested to create PDFs containing
> Arabic text using the output of either libotf or SIL's graphite engine
> to provide glyph IDs and positioning information. I know that there is a
> library called Pango for advanced text layout but, at least initially,
> I'd prefer to work  with libotf/graphite. I'm also not using harfbuzz or
> anything as advanced as that (e.g., for bidi-work) having written my own
> fairly basic Arabic-shaping "engine". Just to note that this is purely a
> hobby project and probably something I'll write-up on my blog -- of
> course I'll thank/mention any advice or help received here.

You are free to reinvent as many wheels as you like, as long as your learning ;).


> Would anyone be able to share a small snippet of C code, or point me to
> an example, showing how I can get started with  the appropriate Cairo
> API to generate PDFs containing Arabic text, assuming that all glyph and
> positioning information is available to provide to Cairo's API calls?

cairo_pdf_surface_create
cairo_show_glyphs


-- 
behdad
http://behdad.org/


More information about the cairo mailing list