HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › Dynamic font substitution logic does not work for me? › Re: Re: Dynamic font substitution logic does not work for me?
I am trying with version 370fx2. the following html containing chinese text works .
常常有不同的方法來寫同樣的漢字,這些被統。有些差異是由於性格的簡化,而有些則是純粹的字形差異,如中風造型。在造型的招用的明朝風格的字體來自康熙字典中使用。在大陸中
However with Japanese html it does not works
煙草
I am getting the following in the logs
version: PD4ML 370fx2 DMS Pro
not yet in cache: file:D:/examples/pd4fonts.properties
‘serif’ is not in pd4fonts.properties file
reject TTF lookup for: ‘serif’
not yet in cache: file:C:/WINDOWS/Fonts/times.ttf
read ‘times new roman’ from file:C:/WINDOWS/Fonts/times.ttf
not yet in cache: file:C:/WINDOWS/Fonts/MSMINCHO.TTF
read ‘ms mincho’ from file:C:/WINDOWS/Fonts/MSMINCHO.TTF
not yet in cache: file:C:/WINDOWS/Fonts/mingliu.ttc
read ‘mingliu’ from file:C:/WINDOWS/Fonts/mingliu.ttc
not yet in cache: file:C:/WINDOWS/Fonts/simsun.ttc
read ‘simsun’ from file:C:/WINDOWS/Fonts/simsun.ttc
not yet in cache: file:C:/WINDOWS/Fonts/mangal.ttf
read ‘mangal’ from file:C:/WINDOWS/Fonts/mangal.ttf
not yet in cache: file:C:/WINDOWS/Fonts/david.ttf
read ‘david’ from file:C:/WINDOWS/Fonts/david.ttf
not yet in cache: file:C:/WINDOWS/Fonts/batang.ttc
read ‘batang’ from file:C:/WINDOWS/Fonts/batang.ttc
not yet in cache: file:C:/WINDOWS/Fonts/wingding.ttf
read ‘wingdings’ from file:C:/WINDOWS/Fonts/wingding.ttf
not yet in cache: file:C:/WINDOWS/Fonts/symbol.ttf
read ‘symbol’ from file:C:/WINDOWS/Fonts/symbol.ttf
not yet in cache: file:C:/WINDOWS/Fonts/lsans.ttf
read ‘lucida sans regular’ from file:C:/WINDOWS/Fonts/lsans.ttf
done in 2312ms.
done.
Am I missing something here? And one more question, do we need to specify
each time?
@PD4ML wrote:
In order to find an appropriate font to display a text string, PD4ML walks the following lists:
[language=java:3q87729j]private static String[] serifFallback = new String[] {
“Times New Roman”,
“MS Mincho”,
“MingLiU”,
“SimSun”,
“Mangal”,
“David”,
“Batang”,
“Wingdings”,
“Symbol”,
“Lucida Sans Regular”,
};private static String[] sansFallback = new String[] {
“Arial”,
“MS Gothic”,
“MingLiU”,
“SimSun”,
“Mangal”,
“David”,
“Gulim”,
“Wingdings”,
“Symbol”,
“Lucida Sans Regular”,
};private static String[] monoFallback = new String[] {
“Courier New”,
“MS Gothic”,
“MingLiU”,
“SimSun”,
“Mangal”,
“David”,
“GulimChe”,
“Wingdings”,
“Symbol”,
“Lucida Sans Regular”,
};[/language:3q87729j]I guess, in your case an existence of SimSun among available fonts should help.