You are not logged in.
I have a set custom value for the DPI under X.Org in .Xresources. This is so that I don't have to keep messing with font sizes under various DEs.
However under certain circumstances the fonts aren't properly sized/aligned in Conky. Is it possible to set a DPI setting of 96 (the default) for Conky only?
Offline
You don't have to play with DPI when setting up conky: just change the font size in your config file.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Yes I'm trying to use a Conky script which has whitespaces in it and this particular script was written with a standard 96 DPI in mind.
So if I change the DPI on my own desktop the spacing is all wrong inspite of adjusting the font sizes.
DPI alters whitespaces too in addition to font sizes.
Offline
Open a terminal:
sudo nano /etc/x11/xorg.conf If you have an nvidia, scroll down to the DEVICE section and add a line at the end
Option "DPI" "96 x 96" Offline
I see your point -- thanks for clarification.
There is a trick with DPI you may try. Normally, you set the global DPI value in Xorg config file (or a parameter for startx: 'startx -- -nolisten tcp -dpi 96 vt1') and .Xresources. However, you can also specify one more value in /etc/fonts/fonts.conf or $HOME/.config/fontconfig/fonts.conf:
<match target="pattern">
<edit name="dpi" mode="assign">
<double>72</double>
</edit>
</match>You can consider it a sort of a 'corrective' setting which some applications respect (e.g. Chrome, Openbox). If conky is able to use it, then you should be able to fix letter spacing issues and set font size properly. Check this out, maybe it helps.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
^^^ Thanks for the sugestion Bohoo.
What's you're suggesting is to alter the DPI for just the fonts globally?
I prefer to alter the sizes of whitespaces too in order to maintain the proportion of screen realestate usage.
I was actually hoping for a solution to alter DPI exclusively for Conky windows only or something such like. I shall continue thinking about it in the meantime.
Offline
I'm afraid that if an option like this isn't mentioned in the conky manual--and it doesn't seem to be as far as I know--then it is probably impossible to apply a different resolution exclusively to it. By default, conky uses libXft as its backend, so altering DPI value in Xresources should let you achieve what you want. However, quite a few applications will be affected, too. That is why I'd try to experiment with fontconfig parameter as well since this particular one works in a different way (hence you can fix some rendering oddities with it). With the two--Xresources and fontconfig--you can try to find a happy medium. Alternatively, using a different font family may be the easiest and most effective workaround.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Start with editing xorg.conf and if it doesn't sort out your problem you can mark that off the list.
Offline