How do I render glyphs in pyqt using the svggraphicsItem?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Recently I found that svg files generated by Cairo do not plot properly in pyqt. The error comes from the use of glyphs which seem not to be shown in pyqt (this might be wrong but I couldn’t find any way of getting glyphs to render).
I ended up writing a set of functions that will convert the glyphs to svg paths so the file will render normally.
These could still use some improvements for rendering color and other style elements (which are locked in the functions that I wrote).
These functions will need to be embedded in a class or have self removed to be used elsewhere.
I just wanted people to have these so they wouldn’t have to search high and low like I did to find a way to render glyphs in pyqt.
Hope for the best,
Kyle