Bug 370243 - Font is rendered differently in kwrite and konsole
Summary: Font is rendered differently in kwrite and konsole
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 16.08
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 11:20 UTC by Antonio Orefice
Modified: 2016-10-12 13:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (299.00 KB, image/png)
2016-10-07 11:22 UTC, Antonio Orefice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Orefice 2016-10-07 11:20:54 UTC
Liberation Mono 10,2 points is rendered way wider in kate/kwrite 


Reproducible: Always

Steps to Reproduce:
1. Set xft dpi to 96
2. Select Liberation Mono 10,2 in kwrite and konsole (for kwrite you have to edit the value manually as seen in the attached screenshot,. (probably a different bug)


Actual Results:  
See that the text in kwrite is wider.

Expected Results:  
To have the font rendered in the very same way.
Comment 1 Antonio Orefice 2016-10-07 11:22:02 UTC
Created attachment 101468 [details]
screenshot

Kwrite on top, konsole on bottom, very same font and size, rendered differently.
Comment 2 Christoph Feck 2016-10-07 12:07:05 UTC
That's intentional. Konsole uses a character cell grid, forcing every character on a pixel boundary (QFont::ForceIntegerMetrics). KWrite is able to use non-monospaced fonts, and can therefore place characters on subpixel resolution.
Comment 3 Antonio Orefice 2016-10-12 11:45:46 UTC
Thanks for the explaination, but wouldn't be more uniform/consistent to use the same setting  (QFont::ForceIntegerMetrics) when kwrite is using monospaced fonts?
As a side note, the same happens on the fonts kcm module when selecting the fixed width font (here, there is way to select a proportional font)
Comment 4 Antonio Orefice 2016-10-12 11:47:55 UTC
Sorry, typo:
As a side note, the same happens on the fonts kcm module when selecting the fixed width font (here, there is *NO* way to select a proportional font)
Comment 5 Christoph Feck 2016-10-12 13:55:29 UTC
No, ForceIntegerMetrics is a hack for applications that need to render glyphs at exact integer positions, and is actually not related to monospaced fonts.

If you want consistency, ask Konsole developers to support fractional glyph positioning.
Comment 6 Antonio Orefice 2016-10-12 13:58:34 UTC
Ok, thanks for the detailed explaination (again!)