What will happen if one adobe form shares the same font for all languages but this font doesn’t support specific language? I didn’t notice such kind of case as long as the PDF form output can display correct text at the correct position with the correct format(User didn’t find the font issue as well~). Until recently one issue makes me just realize how much details been omitted.
In this article, I will introduce the adobe form’s hidden logic when the specific pre-defined font doesn’t support specific language at the printout and how to deal with such cases.
Take one PO form as an example, which will print out within various languages and using Font Arial as a general font for text character display.
The form title in English :
- PURCHASE ORDER
The Chinese version should be:
- 采购订单PURCHASE ORDER
At adobe form definition
In layout definition, it has been set with Arial as font type, no scripts on that.
Print out EN version&CN version
When printing out this PO form in the English version, everything is perfect. But when print out in Chinese version.
It looks ok for me and the user never complains about this before. But actually, the title in Chinese version is not Arial at all even for the text ‘PURCHASE ORDER’. There’re four Chinese characters, the first Chinese character which font is MS Mincho, the rest 3 Chinese characters share font AdobeSongStd-Light. Then the font for rest English text is MyriadPro-Bold instead of Arial!
You can copy the text from PDF into word then you can get text font at PDF.
or you can check the font at the Fonts tab of PDF’s Document Properties.
The root cause of the strange font
After testing and google about this, I find the root:
- 1) Font ‘Arial’ is not suitable for the display Chinese character for sure, Adobe forms using its embedded font ‘AdobeSongStd-Light’ to display Chinese character采购订单 instead. (But no idea why two Chinese fonts involved here.)
- 2) For rest English character PURCHASE ORDER which should display the same font along with front characters, but font ‘AdobeSongStd-Light’ doesn’t support English characters~
- 3) Again, Adobe form using font ‘MyriadPro-Bold’ instead which makes final output using completedly different fonts compared with the pure English version.
Approach SAP provided
I find the relevant answer from SAP help(check appendix linkage) and notes: notes:1489570. It mentioned that we can do font replacement by maintenance in the table FPFONTREPL which will deal with the situation when a font does not support all characters in the target language and let the system replaces these characters automatically with suitable replacement fonts.
But this help provided example is not clear and accurate. If you maintain like this, it’ll definitely not work! Cause it misses the font format parameters. Besides, the font name is NOT exactly the same as you can see from Word or PDF font property.
For example, Chinese font AdobeSongStd-Light which font named ‘Adobe Song Std L’ instead.
The correct font value should be: <FONTNAME>_<WEIGHT>_<POSTURE>
font name is case sensitive and can find at file AdobeFnt11.lst which location is /usr/sap/<SAPSID>/JC<xx> /j2ee/os_libs/adssap/FontManagerService/fonts/adobe. (I get this from notes:1489570 Actually I didn’t find such filepath exists at our system~)
With the above entries at table FPFONTREPL, I get a totally different style output for the English version, which using the replaced FONT for all texts now.
But for the Chinese version, it’s still the same printout as before. No font replacement.
When adobe form shows weird font type for the non-English character, the first thought should be Adobe form already replace the setting font (which no-existed at ADS) with its embedded font. Then table FPFONTREPL is a good solution without form changes. (Not work for me now, but looks like it works for other people, please check appendix 2).
Btw, create scripts inside the adobe form to change the font type dynamically is working absolutely but apparently much more complex than this approach. And I’m still not figuring out why 2 different Chinese characters been involved when the pre-defined font doesn’t support Chinese characters~
Will continue to check this.