View Issue Details

IDProjectCategoryView StatusLast Update
0036483PackagesWidgetsetpublic2021-05-27 12:23
Reportervoid09 Assigned ToZeljan Rikalo  
Status resolvedResolutionreopened 
Product Version2.0.6 
Summary0036483: Fonts in the qt IDE are broken with qt 5.14
DescriptionAfter upgrading my system to qt5 5.14, no matter what font I select in options I always get the same one, a mess that is barely readable.
Charachters overlap or have extra space between them. Was working fine before with qt5 5.13. Running Lazarus-gtk2 worked fine.
Steps To ReproduceRun lazarus-qt on Linux with qt 5.14
TagsNo tags attached.
Fixed in Revision62604
Attached Files


related to 0036637 resolvedZeljan Rikalo Lazarus impossible to change font type of code editor, plus weird font spacing 


Zeljan Rikalo

2019-12-28 12:09

developer   ~0120101

Please attach screenshoot of bad looking font. Is it IDE source editor only ?


2019-12-28 19:22

reporter   ~0120115

This is from a vm with identical os/qt versions, as I have switched to the gtk2 IDE until this is resolved.
Yes, the problem is only with the code editor. No matter what font I select there's only 2 possible "fonts" displayed. The one in the screenshot and another variety with bigger spacing between chars.
Screenshot_20191228_212040.png (214,527 bytes)   
Screenshot_20191228_212040.png (214,527 bytes)   

Zeljan Rikalo

2020-01-12 10:23

developer   ~0120354

Please write (or show) what exact font is setted up for IDE editor (and size)


2020-01-16 23:42

reporter   ~0120489

If it helps, I've run into this as well. Attached two screenshots, one of the messy editor view, the other showing the display options. I've been successfully using the Classic Console font for a long time.

The actual font selector dialog does render the chosen font correctly. It's only in the example font appearance view and the editor view that it looks wrong. It's as if Lazarus is able to fetch the font metrics from the selected font, but then uses glyphs from some fallback font, resulting in severe clipping.

I'm using qt 5.14.0 on Archlinux, which is related to Manjaro. I wonder if any other distro has this problem.
qtfonts-laz-ide.png (53,410 bytes)   
qtfonts-laz-ide.png (53,410 bytes)   
qtfonts-laz-settings.png (30,023 bytes)   
qtfonts-laz-settings.png (30,023 bytes)   

Zeljan Rikalo

2020-01-31 09:27

developer   ~0120820

I can confirm this bug with Qt5 5.14.1 on linux manjaro.

Zeljan Rikalo

2020-01-31 12:08

developer   ~0120827

Info for me: any monospace fonts works fine in test project with TSynEdit (Qt5 5.14.1 - Manjaro 64bit), but cannot get beautifier to work :(

Zeljan Rikalo

2020-01-31 14:18

developer   ~0120828

Please test and close if ok.


2020-02-08 12:50

reporter   ~0120942

Tested the change against qt5.14.1; I can confirm it's fixed for me. Thank you!


2020-06-06 19:52

reporter   ~0123281

Same issue existing with manjaro linux, qt 5.14.2, and Lazarus 2.0.8 and trunk 63319. Can you please take a look at it again ?


2020-07-02 04:04

reporter   ~0123711

Could be a packaging issue. The font broke for me again when I got the latest lazarus-qt5 2.0.8-2; I had to reapply the fixing commit manually to /lib/lazarus/lcl/interfaces/qt5/qtobjects.pas and rebuild the IDE. This made the font look fine again.

The fix hasn't been overwritten in the Lazarus SVN trunk, as far as I can see, so our packages must have come with an outdated copy of the file?

Zeljan Rikalo

2020-07-02 07:05

developer   ~0123713

I'm not sure that font patch is merged into fixes

Michael Karcher

2020-08-22 09:58

reporter   ~0125077

That patch never got into fixes. Links:

Patch (SVN 62604):
Log of qtobject.pas in fixes_2_0:

As you see, the current revision in fixes_2_0 is 60182, which is older than 62604. Is there any chance to get this patch applied to the fixes branch and included in the next 2.0 release, as this is the stable branch most Linux distributions are on?


2020-12-14 22:42

reporter   ~0127614

Still not fixed in 2.0.10. Please try to fix it so we don't have to use -svn branch to get a usable Lazarus on linux


2021-01-07 20:36

reporter   ~0128153

Last edited: 2021-01-07 22:11

View 3 revisions

It was fixed in trunk until now when I used it on manjaro Linux. Now a fresh install of Garuda linux, with fpcupdeluxe from trunk, and the font problem appears again. What's going on here ? Will this ever be fixed for good?
qt5-base 5.15.2-2 btw
Garuda linux latest iso, fpcupdeluxe compiled fpc+lazarus trunk, no bug: package list

Juha Manninen

2021-01-07 22:38

developer   ~0128164

What desktop system your Garuda Linux has? They have many choices apparently.
LCL-QT5 works best on desktops made with QT5. I run KDE Plasma myself.
If it works with Manjaro Linux but not with Garuda Linux, the problem is in Garuda Linux. Right?


2021-01-08 00:55

reporter   ~0128166

I reinstalled Garuda Linux (KDE) , accidentally used a bit older iso the first time and upgrade was a bit messy. Now the bug is gone.
Can't find an explanation for it. Well, if anyone has this bug in the future they can make a note here.

Christian Ortiz

2021-02-26 19:06

reporter   ~0129178

same error with kdeNeon 20.04 using lazarus 2.0.10 and 2.0.12
Screenshot_20210226_140416.png (68,932 bytes)   
Screenshot_20210226_140416.png (68,932 bytes)   

Lutz Mändle

2021-02-27 21:37

reporter   ~0129217

Last edited: 2021-02-27 21:38

View 2 revisions

I have the same problem on openSUSE Tumbleweed with KDE-Plasma, it can circumvented by unsetting the following environment variables:

The desktop link contains the following command line:

This has the side effect, that theme settings for menu shortcuts, system dialogs, colours etc. are not applied.

Alan Chamberlain

2021-05-18 12:40

reporter   ~0130939

I confirm this is a problem on Fedora 34, QT 5.15.2 with KDE-Plasma and lazarus 2.0.10 and 2.0.12. Applying the patch listed by Michael Karcher solves the problem.

Zeljan Rikalo

2021-05-27 12:23

developer   ~0131049

Added into Lazarus 2.0 fixes branch, hope that 2.0.14 + fpc-3.2.2 will be released, otherwise use trunk. Please close.

Issue History

Date Modified Username Field Change
2019-12-26 23:59 void09 New Issue
2019-12-27 12:18 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-12-27 12:18 Zeljan Rikalo Status new => assigned
2019-12-28 12:09 Zeljan Rikalo Status assigned => feedback
2019-12-28 12:09 Zeljan Rikalo LazTarget => -
2019-12-28 12:09 Zeljan Rikalo Note Added: 0120101
2019-12-28 19:22 void09 File Added: Screenshot_20191228_212040.png
2019-12-28 19:22 void09 Note Added: 0120115
2019-12-28 19:22 void09 Status feedback => assigned
2020-01-12 10:23 Zeljan Rikalo Note Added: 0120354
2020-01-16 23:42 Kirinn File Added: qtfonts-laz-ide.png
2020-01-16 23:42 Kirinn File Added: qtfonts-laz-settings.png
2020-01-16 23:42 Kirinn Note Added: 0120489
2020-01-29 18:52 Zeljan Rikalo Relationship added related to 0036637
2020-01-31 08:06 Zeljan Rikalo Relationship added related to 0036642
2020-01-31 08:06 Zeljan Rikalo Relationship deleted related to 0036642
2020-01-31 08:07 Zeljan Rikalo Relationship added related to 0036641
2020-01-31 09:27 Zeljan Rikalo Status assigned => confirmed
2020-01-31 09:27 Zeljan Rikalo Note Added: 0120820
2020-01-31 12:08 Zeljan Rikalo Note Added: 0120827
2020-01-31 14:18 Zeljan Rikalo Status confirmed => resolved
2020-01-31 14:18 Zeljan Rikalo Resolution open => fixed
2020-01-31 14:18 Zeljan Rikalo Fixed in Revision => 62604
2020-01-31 14:18 Zeljan Rikalo Widgetset QT5 => QT5
2020-01-31 14:18 Zeljan Rikalo Note Added: 0120828
2020-01-31 14:19 Zeljan Rikalo Relationship deleted related to 0036641
2020-02-08 12:50 Kirinn Note Added: 0120942
2020-06-06 19:52 void09 Status resolved => assigned
2020-06-06 19:52 void09 Resolution fixed => reopened
2020-06-06 19:52 void09 Note Added: 0123281
2020-07-02 04:04 Kirinn Note Added: 0123711
2020-07-02 07:05 Zeljan Rikalo Note Added: 0123713
2020-08-22 09:58 Michael Karcher Note Added: 0125077
2020-12-14 22:42 void09 Note Added: 0127614
2021-01-07 20:36 void09 Note Added: 0128153
2021-01-07 21:12 void09 Note Edited: 0128153 View Revisions
2021-01-07 22:11 void09 Note Edited: 0128153 View Revisions
2021-01-07 22:38 Juha Manninen Note Added: 0128164
2021-01-08 00:55 void09 Note Added: 0128166
2021-02-26 19:06 Christian Ortiz Note Added: 0129178
2021-02-26 19:06 Christian Ortiz File Added: Screenshot_20210226_140416.png
2021-02-27 21:37 Lutz Mändle Note Added: 0129217
2021-02-27 21:38 Lutz Mändle Note Edited: 0129217 View Revisions
2021-05-18 12:40 Alan Chamberlain Note Added: 0130939
2021-05-27 12:23 Zeljan Rikalo Status assigned => resolved
2021-05-27 12:23 Zeljan Rikalo Widgetset QT5 => QT5
2021-05-27 12:23 Zeljan Rikalo Note Added: 0131049