hi,
I would like to know how to set the font path for Apsose.cell , Aspose.slides library. i got FontSetting in Aspose.words but was not able to find similar class in into library.
And also if you can mention how to add linux default font folder and customer font folder.
The example that I got was
Dim fontFolders() As String = { Path.Combine(Environment.GetEnvironmentVariable(“WINDIR”), “Fonts”), “C:\MyFonts” }
but not sure how to add for linux.
Thanks,
Saumil
Hi Saumil,
Thanks for your inquiry.
In regards to your second query, the Aspose.Words documentation explains where fonts are searched for on Linux, all of the folders below:
· /usr/share/fonts
· /usr/local/share/fonts
· /usr/X11R6/lib/X11/fonts
In this case to achieve the same as the code above on Linux, you should just combine an array of these folders with your custom folder.
If we can help with anything else, please feel free to ask.
Thanks,
Thanks for your reply,
does that mean adding “/usr/share/fonts” path is of no use in FontSetting right?
and can you please confirm about adding fontpath for cell and slide libraries as well.
Hi Saumil,
By default these folders are searched, so as long as the one of the paths above points to where fonts are located on your system then you don't need to do anything extra.
However if you want to include a custom folder then you should add this folder to the array of paths which are searched. Please see the code below.
// Get a list of the current system font folders that will be searched;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
List<string> fontFolders = new List<string>(FontSettings.GetFontsFolders());
// Add our path.
fontFolders.Add("path/to/my/folder");
// Apply the new folders
FontSettings.SetFontsFolders(fontFolders.ToArray(), true);
Regarding your requests for the other components, my colleagues from those teams will answer your queries shortly.
Thanks,
Hi Saumil,
I am representing Aspose.Slides.
I regret to share that the support for setting the custom path for fonts is Aspose.Slides for Java is unavailable. An issue with ID 30391 has been created in our issue tracking system to further investigate the possibility of implementing the desired feature. This thread has also been linked with the issue so that you may be automatically notified once the issue is resolved.
We are sorry for your inconvenience,
Hi,
I am a representative of Aspose.Cells team.
Using Aspose.Cells for Java, you may use SaveOptions.setFontPath() method to set Font folder path:
e.g
Workbook book = new Workbook();
//…
String fontDir = “…”;
book.getSaveOptions().setFontPath(new String[]{fontDir});
//…
Thank you.
Amjad Sahi:
Hi,
I am a representative of Aspose.Cells team.
Using Aspose.Cells for Java, you may use SaveOptions.setFontPath() method to set Font folder path:
e.g
Workbook book = new Workbook();
//......................
String fontDir = "........";
book.getSaveOptions().setFontPath(new String[]{fontDir});
//...............
Thank you.
Does this code example work anymore? I'm trying it with the latest Java Aspose.Cells component and it cannot locate the setFontPath method.
Hi,
Well, with the new versions, you may use the static methods, i.e…, setFontxxx() of CellsHelper API instead, e.g
CellsHelper.setFontDirs()
Thank you.
The issues you have found earlier (filed as SLIDESJAVA-30391) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.