Recent

Author Topic: [SOLVED] TLabel height  (Read 3996 times)

winni

  • Hero Member
  • *****
  • Posts: 2280
Re: [SOLVED] TLabel height
« Reply #30 on: December 12, 2020, 07:28:50 pm »

Bug report:

https://bugs.freepascal.org/view.php?id=38211

Not Suse only. I have also seen this bug on Fedora 32 LXQt.
And on Debian 10 (Xfce, gtk2) with font size 10 all OK, but with font size 9 you can also notice this bug, but not as big, as yours on Suse (left label is AutoSized, right is not, hope the difference is noticeable):

Thanx.

Added your infos to the bug report.

Winni

tetrastes

  • Jr. Member
  • **
  • Posts: 90
Re: [SOLVED] TLabel height
« Reply #31 on: December 12, 2020, 08:16:52 pm »
I played with TLabel's font sizes just for fun, and it seems that TLabel's AutoSize works correctly only for font size 10 (Debian 10 64 bit, Xfce, system font size 9, DPI 96, fpc 3.2.0, Lazarus 2.0.10 gtk2):

tetrastes

  • Jr. Member
  • **
  • Posts: 90
Re: [SOLVED] TLabel height
« Reply #32 on: December 12, 2020, 09:18:04 pm »
Something more: triangle is the evil!

tetrastes

  • Jr. Member
  • **
  • Posts: 90
Re: [SOLVED] TLabel height
« Reply #33 on: December 12, 2020, 09:25:36 pm »
And at last: change system font from DejaVu Sans to Noto Sans. Works fine also with Nimbus Sans and does not work with Liberation Sans.
Is it really Lazarus bug? It looks like bug in some fonts...
« Last Edit: December 12, 2020, 09:28:25 pm by tetrastes »

winni

  • Hero Member
  • *****
  • Posts: 2280
Re: [SOLVED] TLabel height
« Reply #34 on: December 12, 2020, 09:47:14 pm »
Hi!

" Triangle is the evil! "

You should sell that as storyboard to Sesame Street ....

Anyway:

This is the "triangle":

U+27C1

E29F81
14851969
⟁
WHITE TRIANGLE CONTAINING SMALL WHITE TRIANGLE

* Not all UTF8 glyphs are implemeted in all fonts.
As this is still work in  progress it seems to be useless t make a table which code block is implemented in which font. There are a lot waiting to be implemented.
* There are still bugs with UTF8 in Lazarus with some kind of glyphs.
Especially with zero width combining marks.

So:

We work on three different kinds of error:
*  the faulty implementation of TLabel.autosize
* the last hooks of the faulty implementation of the printing of UTF8-Glyphs
* the not complete implementation of the glyphs in some fonts.

Winni
« Last Edit: December 12, 2020, 09:49:37 pm by winni »

lucamar

  • Hero Member
  • *****
  • Posts: 3768
Re: [SOLVED] TLabel height
« Reply #35 on: December 12, 2020, 10:02:53 pm »
In Linux, at least, if a font doesn't implement a specific glyph and the system has a fallback one that implements it, it will silently replace one with the other, but the metrics will be taken from the original font and they might or might not be valid for the replaced glyph.

This might be what is happening here. IIRC there are API calls in the font renderer o check for this situation, but I'm no expert at this, sorry ...
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

winni

  • Hero Member
  • *****
  • Posts: 2280
Re: [SOLVED] TLabel height
« Reply #36 on: December 12, 2020, 10:03:07 pm »
  and does not work with Liberation Sans

Hi

You've got an old version of Liberation.
There is a new one around with UTF8 glyphs.

https://github.com/liberationfonts/liberation-fonts

Winni
« Last Edit: December 12, 2020, 10:05:01 pm by winni »

tetrastes

  • Jr. Member
  • **
  • Posts: 90
Re: [SOLVED] TLabel height
« Reply #37 on: December 12, 2020, 11:48:09 pm »
Thanks for the explanations. So in this case the problem is lack of glyphs in particular font.
But this is not the case of the very first post, where the problem was with latin letters. And I cannot reproduce it on Debian, but I saw it at Fedora. It seems that these are different problems.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4000
  • I like bugs.
Re: [SOLVED] TLabel height
« Reply #38 on: December 13, 2020, 06:35:05 pm »
Have you people tested with QT5 bindings on the problematic systems. Usually it works better with KDE which is also built using QT.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

tetrastes

  • Jr. Member
  • **
  • Posts: 90
Re: [SOLVED] TLabel height
« Reply #39 on: December 14, 2020, 08:42:37 am »
But this is not only KDE issue:

OS: Cinnamon 20
Lazarus 2.0.10
Widgetset: standard Lazarus compliment
FPC 3.2.0
Font: Defalt (Sans on my machine)
Font size used: 11
Autosize: true
Wordwrap: false

TStaticText works though.  So all's well that ends well  ;)

 

TinyPortal © 2005-2018