Recent

Author Topic: Trouble with DejaVu fonts  (Read 3240 times)

dogriz

  • Full Member
  • ***
  • Posts: 105
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Trouble with DejaVu fonts
« on: April 07, 2014, 11:06:52 am »
I have a problem with DejaVu fonts in Lazarus 1.2 (gtk2) (Debian Jessie).
First thing I don't understand - is the way fonts are displayed in FontDialog - the list is different compared to LibreOffice Writer (Images attached).

And the problem is I can't apply (for example) DejaVu Sans - Condensed or ExtraLight. When I select "Condensed" style and click OK, "Book" style is applied!? Same goes for "Condensed Bold Obliqe" - "Bold Oblique" is applied, for DejaVu Serif "Condensed" I get "Book"...
FPC 3.0.4
Lazarus 2.0.2
Debian x86_64, arm

Rails

  • Guest
Re: Trouble with DejaVu fonts
« Reply #1 on: April 07, 2014, 11:42:14 am »
Debian Unstable, Laz 1.2 (64 bit), GTK-2 here. I do not see that particular problem. Jessie is Debian testing at the moment.

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Trouble with DejaVu fonts
« Reply #2 on: April 07, 2014, 12:34:05 pm »
Where are the lists different ? I can see that Lazarus has two columns where the font subsets are separated.

BTW, are you trying to use proportional font for Source Editor ?
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

dogriz

  • Full Member
  • ***
  • Posts: 105
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Re: Trouble with DejaVu fonts
« Reply #3 on: April 07, 2014, 01:03:41 pm »
FPC 3.0.4
Lazarus 2.0.2
Debian x86_64, arm

dogriz

  • Full Member
  • ***
  • Posts: 105
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Re: Trouble with DejaVu fonts
« Reply #4 on: April 07, 2014, 01:28:19 pm »
One more thing - I compiled this project on Windows for comparison. It works but with some glitches with "ExtraLight" style.
But I noticed something else - check the FontName property on attached images (Label at the top) - it shows different strings on Windows and Linux for the same selected font. Can that be the problem with FontDialog on Linux?
FPC 3.0.4
Lazarus 2.0.2
Debian x86_64, arm

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Trouble with DejaVu fonts
« Reply #5 on: April 07, 2014, 02:38:25 pm »
Quote
Can that be the problem with FontDialog on Linux?
I don't think so. I cannot select DejaVu Condensed too although the dialog offers me it (Lazarus uses system dialogs). So I think problem is the way how Lazarus manages system fonts on Linux. It seems to a bug.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

dogriz

  • Full Member
  • ***
  • Posts: 105
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Re: Trouble with DejaVu fonts
« Reply #6 on: April 07, 2014, 06:44:12 pm »
I managed to use font I want by typing its name manualy (not using FontDialog), but for DejaVu font - style classification is really bad.

Examples:

If I choose DejaVu Sans font with ExtraLight style, FontDialog gives me FontName "DejaVu Sans" (it should be "DejaVu Sans Light")
DejaVu Sans Condensed FontDialog.FontName is "DejaVu Sans". (no Condensed string anywhere)
DejaVu Sans Book => FontDialog.FontName = "DejaVu Sans"
...
So:
To get DejaVu Sans Condensed Oblique
must hardcode like this: Memo1.FontName := "DejaVu Sans Condensed";  Memo1.FontStyle = [fsItalic];
...
FPC 3.0.4
Lazarus 2.0.2
Debian x86_64, arm