maui icon indicating copy to clipboard operation
maui copied to clipboard

Resizetizer no longer applies fonts

Open NatWobble opened this issue 1 year ago • 5 comments

Description

PNGs generated from SVGs with embedded text are no longer rendered with the correct font. I jumped from Maui version 8.0.7, which was OK, to 8.0.20, which is when I first noticed the issue. It is also an issue with 8.0.40. I don't have versions 8.0.10 or 8.0.14 installed to test those.

By adding the following into my project I can easily get the fonts to render correctly again:

<MauiVersion>8.0.7</MauiVersion>

See the following shots, one rendered correctly with Comic Sans, the other without:

Screenshot 2024-06-20 at 13 02 43 Screenshot 2024-06-20 at 13 01 45

I am using a Mac. It occurs when building with both Rider and from the CLI.

Steps to Reproduce

Include an SVG file with font text.

Link to public reproduction project repository

No response

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.7 SR2

Affected platforms

iOS, Android, macOS

Affected platform versions

No response

Did you find any workaround?

Rollback by adding the following to your project:

<MauiVersion>8.0.7</MauiVersion>

Versions 8.0.10 and 8.0.14 are untested.

Relevant log output

No response

NatWobble avatar Jun 20 '24 06:06 NatWobble

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Jun 20 '24 06:06 github-actions[bot]

Hey @NatWobble thanks for the report! It would be very helpful if you could provide us with a reproduction project that shows this behavior so we can see what the specifics are to how you fit this all together.

Thanks!

jfversluis avatar Jun 20 '24 08:06 jfversluis

Hi @jfversluis

Here is a test project:

MauiSvgFontTest.zip

I looked at the SVG in a text editor and it references the fonts so you need them installed on your computer, but I used common fonts. The file is font_test.svg in the resources folder.

I used Affinity designer to export the SVG. A work around would be to convert the fonts to paths in the SVG, but I have confirmed that it worked without doing that up until at least 8.0.7 both building on Windows and on Mac.

Here are some new screenshots, the 1st is a screen shot of the SVG in Finder where the Roboto Bold Italic is rendered correctly, then with 8.0.7 where everything but the Roboto Bold Italic is OK and then using 8.0.40 where nothing is rendered correctly. It is the same in the Android and iOS sims. Screenshot 2024-06-21 at 09 49 46 Screenshot 2024-06-21 at 09 58 29 Screenshot 2024-06-21 at 09 57 26

Thanks!

NatWobble avatar Jun 21 '24 03:06 NatWobble

This issue repro on Visual Studio 17.11.0 Preview 2.1 (8.0.40 & 8.0.7 & 8.0.3).

Zhanglirong-Winnie avatar Jun 21 '24 07:06 Zhanglirong-Winnie

+1

BaY1251 avatar Oct 21 '24 03:10 BaY1251

I wonder if this is a bug with Svg.Skia @wieslawsoltes?

mattleibow avatar Nov 22 '24 19:11 mattleibow

I wonder if this is a bug with Svg.Skia @wieslawsoltes?

What version of Svg.Skia do you use and show me the code you use.

wieslawsoltes avatar Nov 22 '24 19:11 wieslawsoltes