Font Mapping

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Font Mapping

Post by RudiKreiner »

In the course of converting our standard software from V3.9 to V3.14, we are working over all our panels and standardizing the fonts that we used.

During this process we noticed that during are last version update from V3.1 to V3.9, many fonts were changed automatically by the GEDI when the associated panel was edited.
For example, the font in 3.1:
-microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-11,0,0,0,400,0,0,0,0,3,2,1,34,Arial
was changed to:
Arial,-1,11,5,40,0,0,0,0,0

When I look at the font description in the WinCC help function, it looks to me like there is an error in the conversion, because the first number after the font name should be the type size which is 11 in the above example.
According to the rules, the resulting font should have been changed to
Arial,11,-1,5,40,0,0,0,0,0
ie, the order of the first two numbers should have changed.

We see this effect with many fonts when first saving them with the V3.9 GEDI.

The cosequence of this appears to be that the UI cannot interpret the font and therefore uses a default font so that all text is the same size.

Is this really a bug, oder have I misinterpreted something here?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Font Mapping

Post by mkoller »

Since 3.5 we store the font in the native Qt format, therefore the change.
The "11" in your example is not wrong. A Font can be defined in either points or pixels. The former is DPI dependent, the latter is not.
QFont::toString() produces: family,pointSize,pixelSize,...
In some early 3.x versions, we stored the fonts in pixels, but due to some issues, we then changed to points - which has also drawbacks especially when using
a panel on different screen resolutions (different DPI), since the system converts points always to pixels by using the system DPIs, which results in different font sizes on different DPIs ...
Long story short: in 3.14 we again store in pixels, since all object sizes are stored in pixels, but we now also save the DPI setting which was used when the panel was saved and use it in case we still have somewhere a font with points.

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Font Mapping

Post by RudiKreiner »

OK, since 3.14 will not be available until next week, we have been temporarily working with V3.13 P8.
Does your answer mean we will see changes in the fonts again when we switch from 3.13. to 3.14?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Font Mapping

Post by mkoller »

When you mean changes in the panel, then yes. But the fonts should look the same when viewed

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Font Mapping

Post by RudiKreiner »

OK then we will wait till we have 3.14 to see what the font strings look like there, before consolidating the fonts in all our panels.
Thanks.

5 posts • Page 1 of 1