Add a feature to enable the Path in the software renderer#10227
Add a feature to enable the Path in the software renderer#10227
Path in the software renderer#10227Conversation
The PR #9894 implemented support for Path, made a public feature for it similar to `software-renderer-systemfonts` Note that since the feature is enabled by default with winit, the "simulator" mode of the mcu examples also enable it. And it can't be disabled. But there is still a warning in the compiler when using `Path` element and `EmbedForSoftwareRenderer` is used as this generally mean that this is for MCU which still can't render `Path`
58d4fc2 to
1b93743
Compare
|
|
||
| ## This feature enables the software renderer to render `Path` elements. Requires the "std" feature. | ||
| ## Enabled by default when the Winit or LinuxKMS backend is enabled. | ||
| software-renderer-path = ["renderer-software", "i-slint-core/software-renderer-path"] |
There was a problem hiding this comment.
other features uses renderer-skia-* or renderer-femtovg-*
So perhaps this should be renderer-software-path but i just made it consistent with software-renderer-systemfonts. (although that one should probably be renamed as well?)
Or maybe there shouldn't be a feature and it should be automatic with "std && software-renderer" but that is currently not possible without adding an extra crate (make i-slint-software-renderer?)
Or perhaps fuse it with systemfonts ?
There was a problem hiding this comment.
I think software-renderer-XYZ to just toggle feature (as opposed to a whole default) is fine. That said, I think this is the best option:
Or maybe there shouldn't be a feature and it should be automatic with "std && software-renderer" but that is currently not possible without adding an extra crate (make i-slint-software-renderer?)
Then we can also deprecate software-renderer-systemfonts.
| ## This feature enables the software renderer to pick up fonts from the operating system for text rendering. | ||
| software-renderer-systemfonts = ["renderer-software", "i-slint-core/software-renderer-systemfonts"] | ||
|
|
||
| ## This feature enables the software renderer to render `Path` elements. Requires the "std" feature. |
There was a problem hiding this comment.
If std is required, then I suppose it should be in line 61 as well? :)
There was a problem hiding this comment.
I didn't put it there because otherwise it'd be a breaking change to remove it when we support no_std path rendering.
|
|
||
| ## This feature enables the software renderer to render `Path` elements. Requires the "std" feature. | ||
| ## Enabled by default when the Winit or LinuxKMS backend is enabled. | ||
| software-renderer-path = ["renderer-software", "i-slint-core/software-renderer-path"] |
There was a problem hiding this comment.
I think software-renderer-XYZ to just toggle feature (as opposed to a whole default) is fine. That said, I think this is the best option:
Or maybe there shouldn't be a feature and it should be automatic with "std && software-renderer" but that is currently not possible without adding an extra crate (make i-slint-software-renderer?)
Then we can also deprecate software-renderer-systemfonts.
|
Do I understand correctly that you're suggesting to move the software renderer to its own crate instead of this patch? |
tronical
left a comment
There was a problem hiding this comment.
I think that would be the best option, indeed. But I have no objections if you prefer to go down this feature route. They're not mutually exclusive :)
aa9f71d to
1b93743
Compare
|
Replaced by #10251 |
The PR #9894 implemented support for Path, made a public feature for it similar to
software-renderer-systemfontsNote that since the feature is enabled by default with winit, the "simulator" mode of the mcu examples also enable it. And it can't be disabled.
But there is still a warning in the compiler when using
Pathelement andEmbedForSoftwareRendereris used as this generally mean that this is for MCU which still can't renderPath