Skip to content

DWrite: Add support for font variations

Luca Bacci requested to merge lb90/cairo:dwrite-font-variations into master

In order to apply font variations, a new IDWriteFontFace must be created from the original passed by the user in cairo_dwrite_font_face_create_for_dwrite_fontface. That's done with IDWriteFontResource::CreateFontFace

Currently, the IDWriteFontFace passed to cairo_dwrite_font_face_create_for_dwrite_fontface is stored in struct _cairo_dwrite_font_face. Here we add an IDWriteFontFace member to struct _cairo_dwrite_scaled_font and make most of the code use that. For most operations it doesn't really matter which one is used, for example to get the font tables. Instead, for rendering it's important to use the new IDWriteFontFace in the scaled font, not the font face.

Fixes #877

Edited by Luca Bacci

Merge request reports

Loading