We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Custom Font Does Not Affect PPTX to SVG Conversion

Im using custom fonts in my pptx and once its converted to SVG the font does not get resolved even though the font is installed in the machine. below 3 options are available to handle fonts, I have tried all 3. Vectorize option works ,but if the font size is small the quality is really bad in the converted output. So i tried both other options but i cannot see any URLs or embded font details in the converted SVG.
I have attached the output and a sample non working font. what are the options available to handle this.

aspose font issue.zip (160.7 KB)

public enum SvgExternalFontsHandling
{
    //
    // Summary:
    //     Add links to separate font files to style section of SVG file.
    AddLinksToFontFiles = 0,
    //
    // Summary:
    //     Save fonts data directly to SVG file. Please check all external fonts license
    //     agreements before using this option.<a class="attachment" href="/uploads/discourse_instance3/56871">aspose font issue.zip</a> (160.7 KB)

    Embed = 1,
    //
    // Summary:
    //     Save all text using external fonts as graphics.
    Vectorize = 2
}

@sathsaranim,
Thank you for the issue description.

I reproduced the problem with the custom font and logged the issue with ID SLIDESNET-42882 in our tracking system. Our development team will investigate this case. You will be notified when the issue is resolved.

I used the FontsLoader class as shown below and the SvgExternalFontsHandling.Vectorize option, the SVG file looks fine compare.png (99.0 KB).

FontsLoader.LoadExternalFonts(new[] { fontFolderPath });

If I understand correctly, this way does not work for you with other fonts. Could you please confirm? If so, please share a presentation file and such a font for this case.

Thanks, Yes the fonts folder works, the issues is that some fonts does not get referred in SVG even though the font is available in the machine. Please check the attached html, even in a simple html the font does not work. seems fonts referring from machine does not work for all fonts. fontissue.zip (274 Bytes)

Vectorize options output does not look good when converted in azure app service, im not entirely sure why that is. Additionally vectorize option does not seems to be reliable as within the same slides some fonts are properly vectorized and some does not.

Can you please tell me how to get the Embed option or linking option working. both cases does not seem to do any change to SVG. the font folder is properly set. I could not find any samples. For embed there is a license requirement mentioned, but i don’t know how to cross check that with the current license we have as it does have specific information regarding fonts,

@sathsaranim,
Thank you for the additional information.

It would be great if you could share presentations, fonts and SVG output for these cases. We would investigate them as well.

Your code example is looking correct. I have already logged the issue with ID SLIDESNET-42882. We need to figure out this case now. We will inform you of any progress.

The issues you have found earlier (filed as SLIDESNET-42882) have been fixed in Aspose.Slides for .NET 22.1 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.