HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › Pd4ml Pro UTF-8 and Adding TTF › Re: Re: Pd4ml Pro UTF-8 and Adding TTF
If you open tahoma.ttf in any of font viewer tools (i.e Cahacter Map on Win platform), you can see it does not define Thai glyphs.
For code like กกก PD4ML (as any web browser) looks for a similar font substitution, which can render Thai.
Below are substitution tables used by PD4ML. As far as I know Microsoft Sans Serif (micross.ttf) supports Thai.
You need to register Microsoft Sans Serif under any of names from sansFallback to let the font substitutions happen.
For example, define in pd4fonts.properties
Arial=micross.ttf
[language=java:2n43dq0p]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:2n43dq0p]