Bug 1574196

Summary: text box rendering issue in motif
Product: Red Hat Enterprise Linux 7 Reporter: Joe Wright <jwright>
Component: motifAssignee: Carlos Soriano <csoriano>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: alanm, tpelka
Target Milestone: rc   
Target Release: 7.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-16 11:59:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot demonstrating behavior
none
reproducer code none

Description Joe Wright 2018-05-02 19:23:16 UTC
Description of problem:
- in RHEL 7.4, using motif, application text boxes are rendered double width of what they should be when using certain fonts. See attached screenshot of behavior using attached reproducer application

Version-Release number of selected component (if applicable):
motif-2.3.4-8.1.el7_3.x86_64
motif-2.3.4-8.1.el7_3.i686

How reproducible:
- 100%

Steps to Reproduce:
1. Run test application
2.
3.

Actual results:
- text box rendered double width in demonstrations 2 and 3

Expected results:


Additional info:

Comment 2 Joe Wright 2018-05-02 19:24:17 UTC
Created attachment 1430257 [details]
screenshot demonstrating behavior

Comment 3 Joe Wright 2018-05-02 19:24:48 UTC
Created attachment 1430258 [details]
reproducer code

Comment 4 Carlos Soriano 2018-05-30 08:18:49 UTC
I'll investigate this one further for 7.6.

Comment 5 Carlos Soriano 2018-11-16 11:59:20 UTC
It's expected behaviour and a limitation of XOrg widgets. Reading the documentation of XmNcolumns:

"Specifies the initial width of the text window as an integer number of characters. The width equals the number of characters specified by this resource multiplied by the maximum character width of the associated font. For proportionate fonts, the actual number of characters that fit on a given line may be greater than the value specified. The value must be greater than 0. The default value depends on the value of the XmNwidth resource. If no width is specified the default is 20."

So for variable fonts it will mostly always request more size than really needed. A solution would be to use monospaced fonts.

Based on this I'm gonna nack it.