I recently switched from Windows 11 to Nobara 37 GNOME (Fedora) and found the following problem:
PyCharm and WebStorm display the font differently in Windows and Linux with completely identical IDE settings.
Font: JetBrains Mono (default)
Size: 13
Line height: 1.2
Antialiasing: Subpixel
Windows
Linux
https://i.stack.imgur.com/sTSph.png
https://i.stack.imgur.com/7KA8I.png
Overlay
https://i.stack.imgur.com/V63r0.gif
As you can see, on Linux, the font is smaller in height and looks "compressed and stretched".
It is extremely inconvenient to work, it hurts the eyes.
IDE Settings
https://i.stack.imgur.com/UXwQP.png
https://i.stack.imgur.com/aYEKo.png
What I've already tried:
Reinstall the IDE
Check the JetBrains Mono font files on Windows and Linux, they turned out to be the same
I noticed that on Linux, when font smoothing is turned off, the character height returns to normal, but on Windows, the character height does not change in any way and always remains the same.
It seems that I was able to achieve about the same result as in Windows. To do this, I had to increase the font by one size (14) and set the line height to 1.1. It seems that this is really an IDE or font problem, since there is no such problem with other fonts.
Related
OS: OpenSuSE TumbleWeed, XFCE 4.14, with HiDPI display, Font size #144DPI
GTK Programs UI are all fine.
QT_SCALE_FACTOR=1
if set in /etc/environment
QT_AUTO_SCREEN_SET_FACTOR=0
QT_SCALE_FACTOR=1.00
kate, keepassxc, KAddressBook, KTnef, KNotes... UI fonts are HUGE, like (144 * 144/96) DPI that huge, redundantly scaled.
KSuduku, KCalc, KCharSelect... UI font size are as expected.
QT_SCALE_FACTOR=0.75
if set in /etc/environment
QT_AUTO_SCREEN_SET_FACTOR=0
QT_SCALE_FACTOR=0.75
kate, keepassxc, KAddressBook, KTnef, KNotes... UI fonts are fine.
KSuduku, KCalc, KCharSelect, SMplayer, QPdfView... UI are corrupted. Menu items shifted, element and font size/position not match, elements overlapped...
I am new to fvwm machine which is used by my new employers.
I am struggling in customizing gvim menu (File, Edit,etc) font size.
As you can see in the attached image, the font size are decent, but menu size is pretty small as compared to text font size.
How to solve this??
Reference Image:
gvim uses gnome gtk in the gnome version of gvim and in this case you can configure your environment using a .gtkrc file see https://unix.stackexchange.com/questions/25043/what-is-this-gtkrc-file. As another answer pointed out for Gtk 2.x programs ~/.gtkrc-2.0 is the configuration file.
To modify your font see e.g.
https://ubuntuforums.org/showthread.php?t=846348
https://bbs.archlinux.org/viewtopic.php?id=164044
https://unix.stackexchange.com/a/478303/38701
examples:
gtk-font-name = "Sans 12"
which gives you a Sans-Serif font with size 12
gtk-font-name = "DejaVu Sans 11"
which is more specific regarding the font and uses size 11
Create .gtkrc-2.0 in your home directory if it isn't present already
and add:
gtk-font-name = "bitstream bold 16"
That should solve your problem.
I have a problem with my font rendering under Linux Mint 17.1 Rebecca with Kernel 3.17.1.
The spacing for monospace fonts is really wrong, some letters are bold and misplaced. At some places the font appears italic and I don't know why. It just looks terrible.
Gnome Terminal:
Sublime Text:
The font settings are set to default:
Default Font: Noto Sans 9
Desktop Font: Noto Sans 10
Document Font: Noto Sans 10
Monospace Font: Monospace 10
Window Title Font: Noto Sans Bold 10,
Text Scaling Factor: 1.0
Antialiasing: Rgba
Hinting: Slight
Antialiasing and Hinting are not the problem! Also, I did not touch the fonts themselves (I also ran diff).
The problem does appear when I log in with different users, and in cinnamon as well as in i3.
I am not using a custom ~/.config/fontconfig file and did not change /etc/fonts/fonts.conf.
Even if I change the font in Sublime to "Times", only numbers seem to be affected.
The problem affects the following applications:
Gnome Terminal (using the system's font)
Terminator
Sublime Text
while it does not affect:
Firefox (and other browsers)
Android Studio
GTK Applications (like Gnome Settings, Abiword...)
Default fonts on my site are defined in an external stylesheet as:
body { font-family: Arial; font-size:62.5%;}
This works fine in Windows and Mac.
To test my site I installed Linux Mint 13 (Mate) and loaded a selection of browsers from the Repository. I made two installations on separate PC’s. I left all browser settings as their defaults.
Firefox, Opera, Konqueror and Reconq displayed my pages as expected.
Web (Epiphany) overrides the default font style (i.e. it is not Arial) and also displays too large a font size.
Midori displays too large a font size. (installed in windows, midori displays the correct font size).
I believe Web (Epiphany) is designed principally for the GNOME desktop environment and maybe this is a factor or do I need to design differently for these two browsers to make them display the fonts correctly in Linux?
It seems that some distributions of Linux don't include the Arial font. I added Liberation Sans as an alternative font and this seems to be okay.
I don't understand however why some of the browsers didn't need this. Unless they include the font with the browser or accurately map some alternative?
I am trying to explore KDE a bit, but many of the tools I rely on have fonts that appear so much bigger under KDE than Gnome even though the chosen font size is the same and the resolution is the same (1920x1200). I have noticed this for gnome-terminal as well as GNU Emacs 23.1 (compiled with xft).
I run Ubuntu 11.10 if that helps.
Is there a simple explanation?
Thanks!
SetJmp
This is a font DPI configuration issue:
http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/461359-switched-gnome-kde-now-my-system-font-size-etc-all-screwy.html
The Font Settings menu has the appropriate dialogue. In my case changing to 96 DPI fixed the problem.