Re: pango in cairo?

"Hendrik Boom [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
On Mon, Jun 29, 2015 at 11:34:38PM -0400, Hendrik Boom [email protected] [ocaml_beginners] wrote:
> I've used cairo before.
> I'm having trouble figuring out how to ues pango.
> 
> I've found a whole lot of relatednfile on my system:
> 
> /usr/lib/ocaml/cairo/libmlpangocairo.a
> /usr/lib/ocaml/cairo/pango_cairo.a
> /usr/lib/ocaml/cairo/pango_cairo.cma
> /usr/lib/ocaml/cairo/pango_cairo.cmi
> /usr/lib/ocaml/cairo/pango_cairo.cmx
> /usr/lib/ocaml/cairo/pango_cairo.cmxa
> /usr/lib/ocaml/cairo/pango_cairo.mli
> 
> and the source code in
> 
>  /usr/lib/ocaml/lablgtk2/pango.ml
> 
> appears to define a lot of useful names.
> I have lots of ways to measure fonts and so forth.
> But I can't figure out how to actually draw text on a canvas.

Got a clue, anyway.  Pango has the function 
pango_cairo_show_glyph_string ()

Which might or might not correspond to the ocaml function

hendrik@notlookedfor:/usr/lib/ocaml/cairo$ grep glyph * | grep show
cairo.mli:external show_glyphs : t -> glyph array -> unit = "ml_cairo_show_glyphs"

I haven't yet found ml_cairo_show_glyphs. but it probably will 
turn out to be pango_cairo_show_glyph_string.

-- hendrik


> 
> Have I missed something online or on my Debian jessie machine?
> Google foind me a decde-old message decryinng the lack of pango support.
> And the code I foind suggests that matters are far, far better now.
> 
> Where should I be looking for examplees or documentation?
> 
> -- hendrik
> 
> 
> 
> ------------------------------------
> Posted by: Hendrik Boom <[email protected]>
> ------------------------------------
> 
> Archives up to December 31, 2011 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners
> The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.
> ------------------------------------
> 
> Yahoo Groups Links
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.