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
Added ability to set language for text rendering #3693
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you add this to the release notes?
…ng basic layout engine
Done! Also noticed that I forgot to implement the language parameter on the multiline text functions, this is now fixed, including documentation. Also, the AppVeyor CI check seems to randomly fail sometimes for reasons outside of the control of anybody making a pull request (trouble connecting to a server to fetch requirements, etc.) Is there any way to retry such checks without making a new commit? |
And some minor editing to make more concise/consistent.
I've clicked to rebuild and created #3710 to improve build robustness. Thanks, all green now, merging! |
Thanks a bunch for all your support! And this was my first approved pull request! |
Changes proposed in this pull request:
language
parameter to all text rendering methodslibraqm allows a language to be specified when formatting text, to indicate to the font that language-specific glyphs and ligatures are required. Pillow previously had no way to access this functionality, this pull request allows for it by implementing libraqm's
raqm_set_language()
function. Note that withraqm_set_language()
, different chunks of the text string can be specified as different languages, but I wrote this to set the entire string as a single language as it would be difficult to implement in a non-confusing fashion to users and seemed unnecessary as if multiple languages are needed, the user can draw text multiple times.I've included tests and documentation as well.