In Qt Application I have loaded the QtFont as below
QFont arialFont("Arial Unicode MS", 15);
QGuiApplication::setFont(arialFont);
In Qml I have a text component
Text
{
id: txt
font.pointSize:10
color: "#1E1E1E"
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
text: "Start Apt"
}
The text is elided(looks different) in embedded Linux platform when compared with Ubuntu Linux desktop(18.04).
I am using Qt 5.6.3.
Free type is used in Linux for font rendering and Qt is configured for system freetype. I used different freetype versions(2.9.1, 2.6.1, 2.5.3 and 2.3.12) and didn't see much variation.
I also gathered font information by logging the values:
Values of font properties that are logged and are same in both the platforms:
Text Width: 52
Font Point size: 10
Font Family: Arial Unicode MS
Font Pixel size: 13
Font letter spacing: 0
Font Weight: QFont:: Normal-50
Font Ratio: 1
Hinting Preference: PreferDefaultHinting
Capitalization: Capitalize
SpacingType: PercentageSpacing
Stretch: Unstretched
Style: Normal
StyleHint: AnyStyle
StyleStrategy: PreferDefault
Weight: Normal
Different values logged:
Text Painted Width: 48.35 in Linux Ubuntu and 47.39 in embedded Linux
Note: Also built the qt application in Windows with using system freetype, font rendering was same as Ubuntu Linux Desktop.
Below picture shows the difference Left side is Ubuntu Linux Desktop(18.04) and right is Embedded Linux Click here for image
Expecting Font should be similar in both the Linux platforms