[cairo] How could Cairo with FreeType support "slant/bold" effect?

Carl Worth cworth at cworth.org
Thu Jun 5 09:33:32 PDT 2008


On Thu, 5 Jun 2008 16:09:29 +0800 (CST), zjuclarkm wrote:
> I want to use Cairo with FreeType font backend on Windows. But I
> find one question: if I have opened a FT_Face and created a
> corresponding cairo_font_face_t*, set it to cairo by calling
> cairo_set_font_face(), how can I get the effect of "slant/oblique"
> and "bold" text just as I simply calling the "toy" api of
> cairo_select_font_face()?

Hi Clark,

For this, you should open an FT_Face that has the slant and weight
that you want. Many fonts provide separate faces for these. For those
that don't, I believe that freetype provides flags you can use to get
artificial emboldening, etc. But I'm definitely talking about features
here that I don't actually know how to use myself. So I trust that
Behdad or someone else will step forward to correct any misinformation
I'm spreading.

> Moreover, does anyone know the efficiency of FreeType on Windows
> platform compared to native WINDOWS api for font?

I don't know anything about this performance comparison myself.

One reason application authors prefer to use cairo with the native
font system, (on any platform), is to provide a consistent experience,
(available fonts, details of font rendering, etc.), with other
applications on that platform.

Have fun with cairo!

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080605/b2c6faf8/attachment-0001.pgp 


More information about the cairo mailing list