Bug 407294

Summary: KFontView does not display font previews properly on hidpi screen with scaling
Product: [Applications] kfontview Reporter: Yatian Liu <douglasliu>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: normal CC: kde
Priority: NOR    
Version: 5.16.90   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of kfontview, scaling factor = 1.7
Screenshot of font management

Description Yatian Liu 2019-05-07 14:23:52 UTC
Created attachment 119890 [details]
Screenshot of kfontview, scaling factor = 1.7

SUMMARY
The KDE Font Viewer does not display properly on hidpi screens with screen scaling, leaving white margins on the bottom and right side of the font preview area. I use a fractional scaling factor, which is 1.7. The preview part in the font management settings is also influenced. The screenshots of kfontview and the font management settings is shown in the attachments. It seems that the ratio of the total width/height of the font preview area and the width/height of the area actually used is just the scaling factor 1.7.

STEPS TO REPRODUCE
1. Set the screen scaling factor to 1.7 (maybe any number between 1 and 2 is OK) in the display setting;
2. Open the font management settings window or kfontview.

OBSERVED RESULT
White margins in the font preview area.

EXPECTED RESULT
No margins, full area used for font preview.

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: Kubuntu 19.04
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
Screen resolution: 2560x1440. Using Intel UHD Graphics 620 graphics card with ubuntu's offical driver.
Comment 1 Yatian Liu 2019-05-07 14:24:53 UTC
Created attachment 119891 [details]
Screenshot of font management
Comment 2 hexchain 2019-10-14 18:23:44 UTC
Reproduced with 5.16.90 on Arch Linux X11. The scaling factor is 2.