Last line of text is cropped
Unsolved
Mobile and Embedded
-
Hi,
I have built simple application for embedded linux and I have problem with last line of text that is sometimes cropped by scaling.
I noticed that problem doesn't appear on Windows with external GPU.Simple code:
Text { anchors.top: parent.top anchors.left: parent.left width: 400 font.pixelSize: 24 color: 'white' wrapMode: Text.WordWrap fontSizeMode: Text.HorizontalFit text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci." }
Have You any idea how to fix it?
-
Hi @Devoo , you can use the property called elide and for that you need to set the height also.
Here is the sample code:-
Text { width: parent.width / 2 height: 100 font.pixelSize: 24 color: 'red' wrapMode: Text.Wrap elide: Text.ElideRight fontSizeMode: Text.HorizontalFit text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci." }
-
Hi @Devoo , i did not get you can actually,the problem for you was that last line of text was getting cropped right or is the character "g" which is making a problem for you?
-
Hi @Devoo , is it possible attach an image or a screenshot, so that i can get better understanding
-
Hello all,
I don't see the cropping issue !
But i have enclosed the Text inside a Rectangle !