In a C# web based environment, we have a PowerPoint presentation with embedded OleObjectFrame
objects. There are some frames that use the font “Aptos Narrow.” I saw an earlier thread that told me to use:
FontConfigs.SetFontFolder(@"C:\Windows\Fonts", true);
As this is where on our report generation machine the fonts are located. The SheetRender
classes render everything just fine. However, we have noticed when a user downloads the presentation to their machine, if the machine does not have this font installed in that folder, the downloaded product font looks warped and the user is required to open the embedded object in order to see the font “snap back into place.” This may be a problem for some of our customers.
I want to ask; is there any other specific setting we can use when refreshing these presentations so the user can see a fully retained font without the need to have it installed on their machine and/or open the embedded object?
@BK.Broiler.730
To ensure that the “Aptos Narrow” font is displayed correctly in your PowerPoint presentations without requiring users to have the font installed on their machines, you can set the font folder to the location where cloud fonts are cached on Windows. This is important because “Aptos Narrow” is a cloud font and may not be installed on all systems.
You can achieve this by using the following code snippet in your C# application:
FontConfigs.SetFontFolder(@"C:\Users\YOUR_USERNAME\AppData\Local\Microsoft\FontCache", true);
Make sure to replace YOUR_USERNAME
with the actual username of the account running the application. This setting should be applied at the start of your application to ensure that the font is correctly referenced when rendering the presentation.
By configuring the font folder to the cloud font cache, you should be able to retain the appearance of the font in the downloaded presentations, eliminating the need for users to open the embedded objects to see the correct font rendering.
If you continue to experience issues, consider checking if there are any additional settings or updates related to font handling in the Aspose.Cells library that may further assist in this matter.
Hello,
The fonts on the machine are currently installed on C:\Windows\Fonts
. Does it matter where we set the FontConfigs.SetFontFolder
?
@BK.Broiler.730,
If SheetRender is functioning properly as you mentioned, it indicates that Aspose.Cells is operating correctly (given that the necessary font(s) are installed after the fonts folder is configured). I assume that the computer used by the person downloading the generated PowerPoint presentation should have the required fonts. Therefore, you might want to install the relevant fonts on the machines that will be opening or viewing the final PowerPoint presentation (which contains the embedded objects).
Thank you, I’ll take this information back to my team
@BK.Broiler.730
Please take your time to try the suggested solutions. Hopefully, your issue will be sorted out. Please let us know your feedback.