Hello,
Hi,
Well, you may try to simply copy the font files from Windows
operating system i.e. “C:\WINDOWS\Fonts\” to Linux operating system on
path e.g “/home/usr/test/winfont”.
Now, pass this path as string to method of SaveOptions mentioned below:
e.g
book.getSaveOptions().setFontPath(new String[]{"/home/usr/test/winfont"});
Please also see.
If the font file of one font that used by excel file cannot be found, we will try to use Arial font firstly if it exists. If Arial font file cannot be found, we will use font files defined under <java.home>/lib/fonts which exist for JDK1.4 and later versions.
Currently
we does not support users to set alternative font. The only alternative
font user can specify is the default render font(by SaveOptions.setDefaultRenderFont(String)). This font is designed for the situation that cell’s content includes both ascii and unicode characters and specified font for this cell cannot render the unicode characters. If user needs, we can use this default render font firstly to replace the fonts that cannot be found.
Arial would be fine. Where does it look for the Arial font, do you know? I’ll just start by trying to get it to render using Arial, and then I’ll try to setup custom font paths if I can get that to work.
I’m using Ubuntu, and I just installed a package that is supposed to contain a lot of Windows fonts. I see that Arial is included. The location that it installed these fonts to is: /usr/share/fonts/truetype/msttcorefonts
Hi,
This is just an example, Aspose will look for a font in the directory you specified.
Please set the path of your font(s) using the setFontPath method.
e.g
book.getSaveOptions().setFontPath(new String[]{"/home/usr/test/winfont"});
mshakeel.faiz:Hi,
This is just an example, Aspose will look for a font in the directory you specified.
Please set the path of your font(s) using the setFontPath method.
e.g
book.getSaveOptions().setFontPath(new String[]{"/home/usr/test/winfont"});
I should mention my version of Java:
Hi,
Please try this and let me know if it works for you. Modify it according to your system environment.
Ok. How do I acquire the CellsHelper reference? I looked at the documentation for Workbook and Worksheet. Neither seem to have a documented method that gives me the CellsHelper instance.
Thyanks
Hi,
Awesome. That works. Thanks a ton!