See also our help for Visualization Manager - Tab: Font Settings

The tab provides settings for adapting the font and its size in the visualization according to the language.
The settings apply to all visualizations of the application, including the Visualization Manager.

Using "different" fonts, then those available in Codesys (Visu Editor)

Here basically applies, the font used must be present and installed where it is to be displayed.

Codesys Does not copy any fonts shown within the Visu Editor in Offline/Edit Mode, onto the Controller/Device.

The fonts must therefore be present AND installed on the system - the system, which should also display this font.


This also applies to WebVisu representations that are displayed via a browser.
Because the browser (and thus the WebVisu displaying the visu) use these installed fonts from there.


Fonts selected in the Visu Editor

Normally, the specified font in the Visu Editor is used.
If this specified font is not found, a “Matching Font” from the “Font Family” will be used.

This is managed by the Graphic API. The font is searched by name, style and size.
If this matches exactly, the font will be used.


Setting the correct Font in the Visu Editor

Use the correct font name, not the file name that may be is assigned to the data file.

Be aware:
Multiple metadata may be stored in the font files, which will show you different names when using different programs.

When checking for the correct font name, go through the standard OS process to display the file.

f.e. on Windows: C:\Windows\Fonts ...


Eastern languages (Japanese/Korean/Chinese) support in TargetVisu application 

The font must be compatible with the used Qt and must be copied to the right place.
This place varies - depending on what is set within the Qt where to search.

Otherwise, the appropriate font must still be specified in the programming system in the device description.
This is always commented out as an example in the template.


Font location under Linux

$ cd /usr/share/fonts/
cmap  truetype  type1  X11


Installing Fonts in Targetvisu Linux

example
sudo apt-get install --reinstall ttf-mscorefonts-installer


Missing fonts in Visu-Properties selection list

For example, if the font "Arial Unicode MS" is missing from the Fonts' selection box of the Visu-Properties, this may be because this checkbox is Windows active:


Windows - Hide Fonts.png


Why does the runtime (e.g. Linux) not regulate this?

The runtime itself does not care about fonts at all.
The name and size of the font, used in the target visualization, is there passed to the Qt Font class. That's all.

Qt then takes care of finding a suitable font and chooses a default font, if the specified one is not found.

In Qt itself, there are many ways to configure where fonts are searched. You can do this at compile time, use environment variables, etc.
This depends mainly on how Qt is configured. So there is no default way.

When Qt is running on the X server, the X server will manage the fonts.


  • No labels