HeliosVirtualCockpit / Helios

Helios Distribution
https://github.com/HeliosVirtualCockpit/Helios/wiki
GNU General Public License v3.0
207 stars 35 forks source link

Profile Editor "Font Chooser" Does not Display inbuilt fonts correctly #801

Closed BlueFinBima closed 2 months ago

BlueFinBima commented 10 months ago

Steps to Reproduce the problem

Steps to reproduce the behaviour:

  1. Go to Profile Editor
  2. Drag out a Label from the toolbox
  3. Click on the Font property
  4. See error

Expected behavior

The inbuilt fonts should appear in the Font Chooser (in readable form)

Screenshots

image

Please complete the following information:

The problem happened while using

(place an 'x' between the square brackets for all that apply)

Shaftoe62 commented 9 months ago

Also look at:

In the properties window of the (text) components the wrong font name is shown. Always Franklin Gothic but it's not.

image

Shaftoe62 commented 9 months ago

I have another issue related to fonts. I can select the Arial Narrow in the font chooser but it displays as the regular Arial.

I've checked the font in any which way I can and it is good. It came with Windows itself, so...

And it is a regular TrueType, so a really separate font file for each of the family members.

BlueFinBima commented 3 months ago

I've been doing a little work in this area, and Private Fonts are not displayed in the Chooser at all. The entries with multiple squares, as far as I can tell are fonts which cannot be properly rendered for some reason (maybe not correct TrueType (?)). Anyway, I am going to scope this issue to the inclusion of Private Fonts in the Font Chooser.
The appearance of 'Franklin Gothic' as the font name is due to the deserialisation of the TextFormat updating the private variable rather than the public version. This too should now be fixed.

BlueFinBima commented 3 months ago

Arial problem also looks to be an artefact of the way Helios concatenates the family and style and uses it for the FontFamily even though there is a FontStyle property. Adding the word "Narrow" to "Arial" in the FontFamily element of the profile XML has the desired affect. More investigation is needed.

BlueFinBima commented 3 months ago

Arial problem was nothing to do with my previous comment. Arial problem is due to Helios defaulting the 'stretch' property of font style to Medium. I've removed the default, and implemented stretch property into Helios TextFormat and Font Chooser.

BlueFinBima commented 2 months ago

Shipped in 1.6.6100.4