[cairo] How to get truetype contour points with cairo

猛 郝 mhao1999 at live.cn
Thu Jun 3 15:14:20 UTC 2021


Much better. Thanks!
looks great, seemingly use freetype library to draw text, will learn further.

James
________________________________
From: cecashon at aol.com <cecashon at aol.com>
Sent: Thursday, June 3, 2021 2:19 AM
To: mhao1999 at live.cn <mhao1999 at live.cn>; cairo at cairographics.org <cairo at cairographics.org>
Subject: Re: [cairo] How to get truetype contour points with cairo

Hi James,

Give the following a try and see if it is close to what you are after.

cairo3d_text_UI.c at
https://gitlab.com/cecashon/OrderedSetVelociRaptor/-/blob/master/Misc/cairo3d/cairo3d_text_UI.c

Eric


-----Original Message-----
From: mhao1999 at live.cn <mhao1999 at live.cn>
To: cairo at cairographics.org <cairo at cairographics.org>
Sent: Wed, Jun 2, 2021 8:45 am
Subject: [cairo] How to get truetype contour points with cairo

For rendering text with cairo, my understanding is that:

  1.  use pango to get each position of glyph
  2.  use cairo to render such glyph

For 2, I think the cairo use some libraries (x rendering or xft library) to parse font file (installed in the system) and get vector information of each glyph and convert such vector information to screen pixel (rasterization and anti-alias, etc).

My question is:

  1.  does cairo use freetype library (called by x rendering or xft) to parse the truetype font file?
  2.  can I get vector information of each glyph (like contour points and bezier control points)?

Thanks
James Hao
--
cairo mailing list
cairo at cairographics.org<mailto:cairo at cairographics.org>
https://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210603/16b0375a/attachment.htm>


More information about the cairo mailing list