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

.Net MAUI conversion of SVG text into PNG is incorrect. #11302

Closed
vr4guid opened this issue Nov 12, 2022 · 3 comments
Closed

.Net MAUI conversion of SVG text into PNG is incorrect. #11302

vr4guid opened this issue Nov 12, 2022 · 3 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/android 🤖 t/bug Something isn't working

Comments

@vr4guid
Copy link

vr4guid commented Nov 12, 2022

Description

When an SVG graphic contains more complicated text elements the conversion into an PNG is not correct. The following is an example of and SVG element that .Net MAUI renders into a PNG file incorrectly...

HelloWorldThis is Not CorrectLine 1 - No SpacesLine 2 - Spaces

Steps to Reproduce

  1. Create a new .Net MAUI Android project using the standard "Hello World" template.
  2. Create a new SVG graphic that contains a complex text - for example a single text element with multiple colors.
  3. Include the SVG in the project as appropriate.
  4. Compile and execute the application.
  5. Note that the results are incorrect.

Sample project referenced in public repo.

Link to public reproduction project repository

https://github.com/vr4guid/MauiDefect-SVG-1

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12.0, Android 13.0

Did you find any workaround?

At present the only known workaround is to create PNG graphics outside of the .Net MAUI toolchain - which is counter to a core objective of .Net MAUI.

Relevant log output

No response

@vr4guid vr4guid added the t/bug Something isn't working label Nov 12, 2022
@Eilon Eilon added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Nov 14, 2022
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Nov 15, 2022
@ghost
Copy link

ghost commented Nov 15, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mikeparker104 mikeparker104 added the partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with label Dec 16, 2022
@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Dec 17, 2022
@samhouts samhouts modified the milestones: Backlog, .NET 8 Planning Jan 26, 2023
@hartez
Copy link
Contributor

hartez commented May 19, 2023

The SVG conversion is handled by Svg.Skia, which doesn't support tspan elements (according to the wiki). Your example image is using tspan.

Until tspan is supported, I think your best option is to use Inkscape to convert the text to paths: https://inkscape.org/doc/tutorials/advanced/tutorial-advanced.html

@hartez hartez closed this as completed May 22, 2023
@vr4guid
Copy link
Author

vr4guid commented May 24, 2023

Thanks for the information. That's a disappointing approach to providing an "enterprise class solution for multiple platforms development". This seams to be more often than not the answer with .Net MAUI - it's broken.

@samhouts samhouts closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants