Bug 421162 - Falkon settings dialog resolves font aliases
Summary: Falkon settings dialog resolves font aliases
Status: REPORTED
Alias: None
Product: Falkon
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-07 16:21 UTC by Eugene Shalygin
Modified: 2020-11-15 14:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2020-05-07 16:21:04 UTC
SUMMARY

If Falkon is instructed to use font names that are fontconfig aliases, they are resolved to the current real names when the font settings are opened the next time. What's worse, it adds foundry names (example: "Tinos [GOOG]") and that breaks font matching (e.g. "Tinos [GOOG]" resolves to Garamond Math).

STEPS TO REPRODUCE
1. Define a fontconfig alias for a font, for example as follows:
  <alias>
    <family>serif</family>
    <prefer>
      <family>Tinos</family>
    </prefer>
  </alias>

2. Use the defined alias in Falkon settings for any type of fonts.
3. Reopen the "Fonts" settings page.
4. Reload web page.

OBSERVED RESULT

The alias name is replaced with the resolved font name (and with appended foundry name).

EXPECTED RESULT

User set font names are left intact. 
SOFTWARE/OS VERSIONS
Application version 3.1.99 (c725b5dd)
QtWebEngine version 5.15.0

Operating System: Gentoo 
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Comment 1 ivan.planinar 2020-11-15 12:07:38 UTC
(In reply to Eugene Shalygin from comment #0)
> SUMMARY
> 
> If Falkon is instructed to use font names that are fontconfig aliases, they
> are resolved to the current real names when the font settings are opened the
> next time. What's worse, it adds foundry names (example: "Tinos [GOOG]") and
> that breaks font matching (e.g. "Tinos [GOOG]" resolves to Garamond Math).
> 
> STEPS TO REPRODUCE
> 1. Define a fontconfig alias for a font, for example as follows:
>   <alias>
>     <family>serif</family>
>     <prefer>
>       <family>Tinos</family>
>     </prefer>
>   </alias>
> 
> 2. Use the defined alias in Falkon settings for any type of fonts.
> 3. Reopen the "Fonts" settings page.
> 4. Reload web page.
> 
> OBSERVED RESULT
> 
> The alias name is replaced with the resolved font name (and with appended
> foundry name).
> 
> EXPECTED RESULT
> 
> User set font names are left intact. 
> SOFTWARE/OS VERSIONS
> Application version 3.1.99 (c725b5dd)
> QtWebEngine version 5.15.0
> 
> Operating System: Gentoo 
> KDE Plasma Version: 5.18.80
> KDE Frameworks Version: 5.70.0
> Qt Version: 5.15.0

In my case, Falkon displays the pages correctly out of the box. But as soon as you open the prefs. and click on 'apply' or 'ok' the fonts are messed up. Even if changing nothing!

The workaround is to set everything you want in the preferences then go to the settings.ini in /.config dir and delete all font names in the [font] title.

Not sure if we both faced the same issue, but could it be?

Hope you're still using it, you reported this issue in May.
Comment 2 ivan.planinar 2020-11-15 14:27:21 UTC
I found the culprit.

The line Sans Serif needs to be changed.

Apparently on my system Falkon is using Nimbus Sans [ukw] by default. But that font is not being used or displayed correctly. Changing it to FreeSans, for example, makes everything ok.