[cairo] OpenType font variations and cairo

Behdad Esfahbod behdad.esfahbod at gmail.com
Thu Sep 14 16:37:56 UTC 2017


Thanks Matthias.  I took a look at the patch.  Looks good!  Minor comments:

- Moving the format towards CSS by default (no comma, no equal sign; just
spaces!) while accepting both is what I do in HarfBuzz. Maybe advertise the
same here,  UPDATE: I was wrong.  CSS uses comma as well.  It's the equal
sign that they don't use, they use space.  We should accept both.

- Maybe make the variations member be "const char *" instead of "char *".

- In +cairo_font_options_set_variations(), typically in these kinds of
functions I like copying then freeing the old value, such that the input
can be the return value of get_variations() on the same object.

-
(((uint8_t)p[0])<<24)|(((uint8_t)p[1])<<16)|(((uint8_t)p[2])<<8)|((uint8_t)p[3]);
FreeType has a macro for that: FT_MAKE_TAG()

Looks really good otherwise.  Let's get this in quickly.

Cheers,
b

(Generally I find it easier pushing a tree on github and reviewing there;
also because I can just fix stuff and push my own tree.)

On Wed, Sep 13, 2017 at 2:41 PM, Matthias Clasen <matthias.clasen at gmail.com>
wrote:

> Over the last few days, Behdad and I worked together on supporting
> OpenType font variations in the Linux text rendering stack. This requires
> small additions to pango, fontconfig, and ... cairo.
>
> The cairo patch is simple and ready (i'm still debugging some issues on
> the pango side).
>
> It adds a new member to the font options struct, a string which contains
> the font variation settings.
>



-- 
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170914/c3a87344/attachment.html>


More information about the cairo mailing list