Designer doesn't support Chinese well

@jcoffman Is it possible to correct the problem by using native fonts via modifying fontconfig.properties.src located in C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win\lib and jre-win.zip? I think copying Noto fonts is too heavy. The font file is about 130MB: https://www.google.com/get/noto/#serif-hans

According to the fontconfig.properties.src, which is java’s font configuration file:

allfonts.chinese-ms936=SimSun
allfonts.chinese-ms936-extb=SimSun-ExtB
allfonts.chinese-gb18030=SimSun-18030
allfonts.chinese-gb18030-extb=SimSun-ExtB
allfonts.chinese-hkscs=MingLiU_HKSCS
allfonts.chinese-ms950-extb=MingLiU-ExtB
# ...
# ...
filename.SimSun=SIMSUN.TTC
filename.SimSun-18030=SIMSUN18030.TTC
filename.SimSun-ExtB=SIMSUNB.TTF

Simsun.TTC is an old font delivered by microsoft with its windows OS. The detail is at https://docs.microsoft.com/en-us/typography/font-list/simsun So I think we may not need to download new fonts.

By the way. I am using Chinese version of windows 10 64bit (10.0.18362.239) and igntion 8.0.11 (b2020041411). I am still experience the same Chinese font problem (blank square) for both Designer and Client.

I found there are three JREs on my computer:

  1. C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win
  2. C:\Users\cheng\AppData\Roaming\Inductive Automation\Designer Launcher\jre
  3. C:\Users\cheng\AppData\Roaming\Inductive Automation\Vision Client Launcher\jre

And one jre-win.zip: C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win.zip

I also noticed that there is no fonts folder in Designer Launcher and Vision Client Launcher JREs. I do not know where the Designer Launcher JRE is from. It seems it is not the same as jre-win.zip.

If I modify the font to be 宋体, aka Simsun, it works well in vision window in Designer and launched client. But the words in right click menu is still not working.

You can definitely use any locally installed font. As far as the right click menu i’m not sure, depending on where it is it may be a monospace font or different stroke style?

I can look into mapping this as the default as long as it is truly available on the default OS installs listed when we do the next bump in the bundled JRE. The launchers should have these fonts as well, what version of the launcher are you using?

I am using the Launcher downloaded from ignition gateway version 8.0.11 (b2020041411).

Here are some examples of the button text problem in Designer
Dialog window for export file
image
Right click menu
image

Here is some examples in vision client
Datetime text is wrong and some translate error in log viewer

I think the JRE detects it is running in win10 with Chinese locale, so it may do some automatic localization. For example, OK is translated to 确定. Then some font problem happens and it shows blank box.

I am using version 1.0.11.

image

More example:
image

Ok yeah, most of these issues are the font mapping which is something that can be handled on the next bump to the bundled JRE (probably 8.0.13). the right click menu is occurring due to the locale of the system. This can be changed in the launcher for that project if you desire by adding the vm arguments -Duser.language=en;-Duser.country=us
The changes to the font configuration that you mentioned should solve this as well

I tried vm arguments. It does not work for me. I also tried to use -Duser.language=zh;-Duser.country=cn. The java logical font dialog does not fallback to physical font simsun.ttc. I do not know why. It seems that there are several level of fallback mechanism.

One is java font fallback.

Another one is windows font technology

I am not very sure how it works. But it does not work correctly.

Besides, I noticed the Client Launcher's JRE version is Zulu11.37+18-SA (build 11.0.6+10-LTS).

The bump in version i referenced is the Ignition version (8.0.13) that will have the next JVM upgrade (v 11.0.7).
Until then, you could try using this fontconfig fontconfig.properties (12.3 KB)

OK, the next ignition version (8.0.13) may include JVM v11.0.7, right?

But I am still not very sure how would you fix this problem. The fontconfig.properties just used noto font families to replace original ones such as New Times Roman and Arial. How did it related to solving CJK missing glyph problems if CJK noto fonts is not actually included in ignition and launcher distribution.

In windows, missing glyph is handled at two levels:

  1. font fallback, which is controlled by application;
  2. font linking, which is controlled by OS itself.

I think the problem should be solved in the first level.

I expect the problem can be solve either way below:

  1. Using windows fonts shipped with OS. However, some fonts might be optional in features on demand.
  2. Offer some option to download additional fonts like noto CJK to make it right.

Besides. I am not sure how to place the fontconfig.properties file you attached. According to java document about fontconfigure, in windows OS, the fontconfig.fbc might precede fontconfig.properties file. And there are many JRE copies on my computer which is very confusing.

  1. ignition JRE
  2. designer launcher JRE
  3. client launcher JRE. (I tried with JRE version 11.0.6, it does not work for me.)
  4. .igntion\cache\resources\runtimes\11.0.6 JRE

And in the task manager, there is a Zulu platform. I am not sure what it is. It seems launching some client remotely according to its commandline.

The fontconfig.properties file in my previous post maps the logical fonts to the windows included CJK fonts (identical to the default fontconfig.properties file that is included with the JRE in its src form, I just brought in those values to our fontconfig.properties). The noto fonts are there still but will fallback to OS default fonts for CJK glyphs.

All the bundled JRE’s will receive this file when the changes get brought into the code base along with the new JRE (11.0.7). By my estimation this will be Ignition version 8.0.13.

Now for some background:
This all came about because the lucida fonts were removed from the JDK due to licensing issues after java 1.8. This is still an ongoing issue but we have handled the change extremely well considering that without bundling these fonts and providing our own custom fontconfig.properties file many languages would simply be unsupported.

Azul provides a compatibility pack to assist with this but its not licensed for redistribution due to the underlying restrictions on the lucida fonts. Eventually this will likely be fully addressed in the OpenJDK but as of right now, we cover a HUGE amount of languages with the current configurations using just the bundled fonts and standard OS defaults:


(I have highlighted the additions added with the fontconfig.properties file I uploaded)
fonti18n.zip (58.0 KB)

You can observe with the provided project export that these characters originally don’t appear with the existing configuration. Once you replace the fontconfig.properties file in %USER_HOME%/.ignition/cache/runtimes/11.0.6/conf/fonts with the one I provided you should see those characters appear unless you are in a non-standard install of windows. In that case you will have to install the fonts listed in that file.

P.S. There is a ticket open to add the ability to add and adjust these font configurations more easily on the gateway (currently, the JREs are there under lib/runtime so you can do whatever you like with them) which clients will pull and update on launch to minimize any headache of dealing with this on the client side, but there hasn’t been a huge push to implement at this time because our current setup handles things quite nicely.

2 Likes

Thanks a lot. It works for me!

I still have a little question about JVM execution mechanism: why fontconfig.properties file works in %USER_HOME%/.ignition/cache/runtimes/11.0.6/conf/fonts rather than %USER_HOME%/.ignition/cache/runtimes/11.0.6/lib. I thought it should be placed there.

1 Like

conf is the first directory that is searched for fontconfig files first followed by the lib dir. If I recall correctly a future release is going to look exclusively at conf but I can’t find the release note that mentions that right now.

1 Like

I found the java document about the configuration file behavior:

`/jdk-interim.update.patch.jdk/conf`

The  `.properties` ,  `.policy` , and other configuration files intended to be edited by developers, deployers, and end users.

`/jdk-interim.update.patch.jdk/lib`

The private implementation details of the runtime system. These files are not intended for external use and must not be modified.
1 Like

Our OEM Linux platform has the gateway running 7.9.13 and I am having troubles with Korean fonts. Can I use this fontconfig.properties file to solve my issues and where do I place it?

Hi @weertske,

Yes you can, The fontconfig.properties file exists within your java’s conf/fonts directory. This will depend on wherever you have java installed on that system since we do not bundle java with the gateway/clients in the same way. The one exception is if you are using the NCL, which would have this same directory under the jre directory next to the NCL executable (not the shortcut)

Hope that help,
Jonathan C

When translation manager is used to translate the header of power table, it shows garbled code. The data of power table is bound with SQL query. However, when I manually add the column of data, it can be translated normally. How should this problem be solved?