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

Text with path not rendering correctly on versions after 3.1.1 #1040

Open
khkassem opened this issue Feb 17, 2023 · 0 comments
Open

Text with path not rendering correctly on versions after 3.1.1 #1040

khkassem opened this issue Feb 17, 2023 · 0 comments

Comments

@khkassem
Copy link

Description

When i try to render or transform to bitmap the folowing svg using versions from 3.2 and up (i didn't test the master), the text with path is not rendered correctly - the position of the text is not like chrome.
(The arrow is Ok for me, between my viewer and the result image there is no difference)

curved-text

The result with version 3.1.1 is

curved-text

The result with version 3.4.4

curved-text

I am using the folowing code from the svg.net console sample

        static void Save(FileInfo inputPath, string outputPath, float? width, float? height)
        {
            var svgDocument = SvgDocument.Open(inputPath.FullName);

            if (svgDocument == null)
            {
                logger.Fatal($"Error: Failed to load input file: {inputPath.FullName}");
                return;
            }

            if (width.HasValue)
            {
                svgDocument.Width = width.Value;
            }

            if (height.HasValue)
            {
                svgDocument.Height = height.Value;
            }

            using (var bitmap = svgDocument.Draw())
            {
                bitmap?.Save(outputPath);
            }
        }


            string svgFile = @"\data\curved-text.svg";
            string bmpFile = @"\data\curved-text.png";

            Save(new FileInfo(svgFile), bmpFile, 200.0f,400.0f);

Used Versions

Windows 11 (and 10), .NET 4.7.2

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant