Commit 6d4e9fbd authored by 徐俊's avatar 徐俊

xujun

parent 86e7d6a4
......@@ -127,15 +127,21 @@ public class ProjectInfoToPDF {
// 根据字体文件类型使用不同的加载方式
if (fontPath.toLowerCase().endsWith(".ttc")) {
return BaseFont.createFont(path + ",0", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
return BaseFont.createFont(path + ",0", BaseFont.WINANSI, BaseFont.EMBEDDED);
} else {
return BaseFont.createFont(path, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
return BaseFont.createFont(path, BaseFont.WINANSI, BaseFont.EMBEDDED);
}
} catch (Exception e) {
throw new RuntimeException("加载字体文件失败,请确保resources目录下存在字体文件 " + fontPath + ":" + e.getMessage(), e);
}
}
public static String getCurrentOperatingSystem() {
String os = System.getProperty("os.name").toLowerCase();
//System.out.println("---------当前操作系统是-----------" + os);
return os;
}
/**
* 首页项目信息
* @param document
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment