@Tim49,
We evaluated your issue in details. Actually we partially reproduced the problem:
Aspose-Warning type 1: Font will be substituted from Aptos to {Arial,Cambria Math,MS Gothic,Gulim,Arial Unicode,SimSun,Segoe UI Symbol,DejaVu Sans,Liberation Serif,FreeSans}
Aspose-Warning type 1: Font will be substituted from Pacifico to {Courier New}
Aspose-Warning type 1: Font will be substituted from Pacifico to {Courier New}
Aspose-Warning type 1: Font will be substituted from Pacifico to {Courier New}
Aspose-Warning type 1: Font will be substituted from Pacifico to {Courier New}
We don’t have Aptos and Pacifico fonts installed. But if I add FontsLoader with the provided Pacifico font, the output changes to this:
Aspose-Warning type 1: Font will be substituted from Aptos to {Arial,Cambria Math,MS Gothic,Gulim,Arial Unicode,SimSun,Segoe UI Symbol,DejaVu Sans,Liberation Serif,FreeSans}
Example:
FontsLoader.loadExternalFonts(new String[] { pathToFolderWithFont });
After testing, we suspect there is a problem with the Palico font installed on your computer.
1). Can you please check if the font is available in java?
public static void main(String[] args) {
String fontName = "Pacifico";
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] allFonts = ge.getAllFonts();
boolean fontFound = false;
for (Font font : allFonts) {
if (font.getFontName().equalsIgnoreCase(fontName) ||
font.getFamily().equalsIgnoreCase(fontName)) {
fontFound = true;
printFontInfo(font);
break;
}
}
if (!fontFound) {
System.out.println("Font '" + fontName + "' is not available.");
System.out.println("Available fonts:");
for (Font font : allFonts) {
System.out.println("- " + font.getFontName());
}
}
}
private static void printFontInfo(Font font) {
System.out.println("=== Font characteristics ===");
System.out.println("Font Name: " + font.getFontName());
System.out.println("Font Family: " + font.getFamily());
System.out.println("PostScript Name: " + font.getPSName());
System.out.println("Size: " + font.getSize());
System.out.println("Style: " + getStyleName(font.getStyle()));
System.out.println("Bold: " + font.isBold());
System.out.println("Italic: " + font.isItalic());
System.out.println("Plain: " + font.isPlain());
}
private static String getStyleName(int style) {
switch (style) {
case Font.PLAIN: return "Plain";
case Font.BOLD: return "Bold";
case Font.ITALIC: return "Italic";
case Font.BOLD + Font.ITALIC: return "Bold Italic";
default: return "Unknown";
}
}
2). Can you also provide us with additional information:
OS version
JDK version
additional fonts (if installed)
3). If possible, can you provide a docker file that allows this issue to be reproduced? (This will allow us to say with 100% certainty that the cause has been found and corrected.).