Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG font support #6170

Open
nulano opened this issue Mar 31, 2022 · 0 comments
Open

SVG font support #6170

nulano opened this issue Mar 31, 2022 · 0 comments

Comments

@nulano
Copy link
Contributor

nulano commented Mar 31, 2022

FreeType 2.12 (#6169) adds support for color fonts in SVG format.

From freetype/freetype@21d0fa3:

FreeType now handles OT-SVG fonts, to be controlled with
FT_CONFIG_OPTION_SVG configuration macro. By default, it can
only load the 'SVG ' table of an OpenType font. However, by using
the svg-hooks property of the new 'ot-svg' module it is possible
to register an external SVG rendering engine. The FreeType demo
programs have been set up to use 'librsvg' as the rendering
library.

It would be nice to add support for this to Pillow.
librsvg appears to be LGPL-2.1 licensed, so a wrapper similar to that used for FriBiDi/Raqm may be needed.
This is closely related to loading SVG images in Pillow, it may be possible to add support for both at once: #3509

For reference, the freetype demo callbacks are here: https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/rsvg-port.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants