Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
Currently the documentation for PyQt for the QPainterPath.addText method can lead a person to believe that the text would follow the path. It does not state in the documenattion that the text is always going to render horizontally. The text rendering horizontally really doesn't make any sense when using QPainterPath to render text, it would make sense to have the text follow the path. The image provided in the documentation leads one to believe that the text follows the path because of the line drawn under the text. My interpertation of the image is that the line represents the path and the x, y indicates where the bottom left corner of the text is along that path. This is not the case. The text is always added horizontally.
If a path was created that is a single line adding text to the path would place the bottom edge of the text along the line and a flag could be used to determine if the line should be rendered or not. This would make it far easier to render "wavy" text or curved text. When using PyQt. There is also a speed factor when using PyQt, it would increase the speed of the calculations 50 to 200 times faster because the calculations would reside in C code instead of in Python code.
I know there are examples for handling this exact thing but there ends up being spacing issues between the letters that would need to be compensated for, I have not seen any examples of how to properly handle the spacing problems.
Attachments
Issue Links
- is required for
-
QTBUG-12588 Svg Text Paths are not rendered in QGraphicsSvgItem
- Closed
- relates to
-
QTBUG-121027 Add text-along-a-path feature to TextPath
- Reported
-
QTBUG-50444 Add API to QPainterPath to draw glyphs
- Open