Bug 162113 - Font selection dialog messes up font variant selection when passing fonts without desired one
Summary: Font selection dialog messes up font variant selection when passing fonts wit...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:25.2.0 target:24.8.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Fonts Character-Dialog
  Show dependency treegraph
 
Reported: 2024-07-20 09:11 UTC by Eyal Rozenberg
Modified: 2024-09-10 16:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-07-20 09:11:00 UTC
Reproduction instructions:

1. Create a new document (e.g. in Writer)
2. Create a stretch of text in, say, Liberation Serif typeface, Bold 
3. Select the emboldened text
4. On the menus, choose Format > Character...
5. Click the typeface name on the Western side of the dialog
6. Start moving down the list of fonts, while keeping an eye on the "Style" combo-box
7. Get to some font which doesn't have a Bold variant (that will depend on your system... for me, somehow, it's Linux Biolinum Keyboard)
8. Move back up a few times in the list

Expected Results:
When selecting the no-Bold font, the variant will be Normal or Regular.
When scrolling back up, the variant will be Bold.

Actual Results:
When selecting the no-Bold font, the variant may become Italic, or Bold Italic.
When scrolling back up, the wrong variant persists, as long as you have that variant for the intermediate typefaces.

In other words, I started with Bold, it became Bold Italic, and if I continued to scroll up or down it stayed Bold Italic.

This bug is particularly painful for RTL/CTL fonts, which are more likely to be missing some of the four common variants.

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Calc: threaded
Comment 1 Buovjaga 2024-09-06 05:27:34 UTC
I downloaded Linux Biolinum Keyboard from here: https://www.1001fonts.com/linux-biolinum-font.html

Steps 5-8 can just be: pick L. B. Keyboard and then pick Liberation Serif again.

Bibisected with linux-64-6.2 to 9237a905fa5f2b67db73c15847eff203a258c2b4
weld SvxCharNamePage
Comment 2 Caolán McNamara 2024-09-09 10:04:07 UTC
https://gerrit.libreoffice.org/c/core/+/173071
Comment 3 Commit Notification 2024-09-09 14:08:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22cb250074606a9e637787245f8e18a11ac5c252

Resolves: tdf#162113 prefer restoring explicit font style selection

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2024-09-10 16:41:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/1acda4fc1b906eb0f6b5cff1e7b171adbabba310

Resolves: tdf#162113 prefer restoring explicit font style selection

It will be available in 24.8.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.