Bug 503529

Summary: Most fonts do not work for "Typewritter" Annotation tool on Windows
Product: [Applications] okular Reporter: Klaus <bauer.klaus.dieter>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.12.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Switching to Roboto Mono worked on OpenSuse and is displayed correctly on MS Windows. Switching the font on Windows results in "Segoi UI" being used for most intended fonts.

Description Klaus 2025-04-29 14:45:39 UTC
Created attachment 180780 [details]
Switching to Roboto Mono worked on OpenSuse and is displayed correctly on MS Windows. Switching the font on Windows results in "Segoi UI" being used for most intended fonts.

SUMMARY
At least on MS Windows 11, most fonts don't work for the "Typewriter" annotation tool.

STEPS TO REPRODUCE
1. Open a PDF document.
2. Alt+5 then click anywhere to insert a typewriter annotation
3. Ctrl+1 to switch back to navigation mode.
4. Right click the inserted text.
5. Select "properties" in the context menu
6. Change the font to "Courier New"
7. Confirm the changes

OBSERVED RESULT
- The font does not change from the default to Courier New
- When checking the "properties" of the typewriter annotation now, it says "Courier New" for the font.
- After saving the document (but without having to close and reopen it), this changes to "Segoi UI 6" for the Chocolatey version and "MS Shell Dlg 2" for the . Segoi UI is the default sans-serif variable-width font for Windows GUIs (titlebar etc).  "MS Shell Dlg 2" is a "logical font", that is mapped to actual fonts depending on locale.

Upon further trying, the vast majority of fonts does not work. The only monospaced font I could find, that works correct, is Consolas. 

EXPECTED RESULT
- The font of the typewriter note should change to the selected font.

SOFTWARE/OS VERSIONS
Windows: Windows 11, 23H2.
Okular: 24.12.3 (installed via Chocolatey).
Okular: 23.08.1 (installed via Microsoft Store).

ADDITIONAL INFORMATION
Under OpenSuse Leap 15.6, the issue is not reproducible. There, Okular 23.08.05 is installed from the repository.
The issue is reproducible with the Windows store version of Okular.