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

Celiagg backend font selection is wrong on Windows #643

Closed
jwiggins opened this issue Feb 26, 2021 · 1 comment · Fixed by #726
Closed

Celiagg backend font selection is wrong on Windows #643

jwiggins opened this issue Feb 26, 2021 · 1 comment · Fixed by #726

Comments

@jwiggins
Copy link
Member

Due to Celiagg using Windows font rendering, the selection of fonts needs to work a bit differently on Windows.

With FreeType, a celiagg.Font gets passed the path to the font file being loaded (along with a face index if it's a font collection). But with Windows, the first argument of celiagg.Font is a face name that gets passed to CreateFont.

To work around this, all we need to do is use kiva.Font.findfontname() on Windows and continue using kiva.Font.findfont() on other platforms.

@jwiggins
Copy link
Member Author

jwiggins commented Mar 8, 2021

The foundation for this has been laid by #605, celiagg/celiagg#84 and celiagg/celiagg#85. Once a new version of celiagg has been released, some small changes to the set_font method will be needed to apply the font style.

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

Successfully merging a pull request may close this issue.

1 participant