Problem: PDF reports have missing or incorrect characters when the Chinese, Japanese, or Arabic language pack is installed
For ArcGIS 10.1 with the Chinese, Japanese, Russian, or Arabic language pack installed and the Display Language is set, the optional PDF report files created when running Ordinary Least Squares Regression, Grouping Analysis, and Incremental Spatial Autocorrelation may have missing or incorrect characters.
Esri uses open source Matplotlib software to create the PDF report files. The default Matplotlib font files used by that software are not correct for Chinese, Japanese, Russian, and Arabic languages.
Solution or Workaround
To resolve this issue with Japanese, Chinese, or other left-to-right languages, the font setting in the Python script used must be changed to generate the report.
Browse to the script called SSReport.py located at:
<ArcGIS Install Directory>\ArcToolbox\Scripts
Create a backup of the script SSReport.py that can be reverted to if needed.
Open SSReport.py using a Python or text editor and locate the following section of code.
#### Windows 7 / Windows Vista (Arial) #### #### Uncomment the Following Two Lines #### #fontFilePathName = r'C:\Windows\Fonts\arial.ttf' #fontFileBoldName = r'C:\Windows\Fonts\arial.ttf'
#### Linux (DejaVu Sans) #### #### Uncomment the Following Two Lines #### #fontFilePathName = '/usr/share/fonts/dejavu-lgc/DejaVuLGCSans.ttf' #fontFileBoldName = '/usr/share/fonts/dejavu-lgc/DejaVuLGCSans.ttf'
Within the code, find the fontFilePathName and fontFileBoldName variables for the operating system used and language. Check to make sure that the font file specified in the corresponding path exists on the system.
Note: If the font file cannot be found at the specified location, or if ArcGIS is running on a different operating system (Windows XP, for example), see if the font file exists at another location on the computer. If the recommended font file still can’t be located, a font vendor or distributor must be found who can provide this file (such as the Microsoft Download Center).
The font files specified in SSReport.py have been tested with ArcGIS 10.1 for the Ordinary Least Squares, Grouping Analysis, and Incremental Spatial Autocorrelation tools. Other fonts might create correctly formatted PDF reports as well.
Remove the '#' character (using the Backspace or Delete key) to uncomment the Python code that sets the path to the font for the language setting. For example, if running ArcGIS with the Chinese language pack on a Windows 7 machine, modify the above code block as follows (notice the # character has been removed).
If using the Japanese language pack, the font size needs to be smaller than other fonts. If using ArcGIS 10.1 with no service pack, locate the following section of code and reduce the font size values by 2 (size = 10 would be changed to size = 8, for example).
Save the changes and close the Python or text editor.
Note: For Arabic and other right-to-left languages, there currently are no good workarounds. The alternatives are: 1) Elect not to create the optional PDF report; the information in the report is written to the Results Window. 2) Use the default English language pack while creating the PDF report files to obtain English language reports.
Article ID: 000011486
Software: ArcGIS for Desktop Advanced 10.1 ArcGIS for Desktop Basic 10.1 ArcGIS for Desktop Standard 10.1