font anti-aliasing and dpi settings

The standard theme switcher of LXDE - http://wiki.lxde.org/en/LXAppearance
mathiraj
Posts: 12
Joined: Wed Apr 21, 2010 5:37 pm

font anti-aliasing and dpi settings

Postby mathiraj » Wed Apr 21, 2010 5:46 pm

How to change font anti-aliasing and dpi settings in lxde? lxappearance doesn't look like it has an option for these...

thanks in advance for any replies...

Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: font anti-aliasing and dpi settings

Postby Marty Jack » Thu Apr 22, 2010 10:02 am

As far as I know, font antialiasing should Just Work. It may be that you have some leftover on your system that is preventing it. As to DPI, this should be automatically calculated by the X server when it starts from the monitor-reported EDID. Why don't you take a look in your /var/log/Xorg.0.log for clues if your monitor isn't set correctly at startup, and work with your distro to solve these issues. They know what configuration files they ship and how their startup is intended to work.

mathiraj
Posts: 12
Joined: Wed Apr 21, 2010 5:37 pm

Re: font anti-aliasing and dpi settings

Postby mathiraj » Thu Apr 22, 2010 5:22 pm

thanks Marty. I need to change the hinting to full for the anti-aliasing settings and xorg somehow messed up the dpi settings for my monitor. Looks like there is no gui tool in lxde to do that. I'm attaching the screen shot of a similar tool found in xfce.
Attachments
Screenshot.png
xfce dialog for font-anti aliasing & dpi settings
Screenshot.png (22.46 KiB) Viewed 26360 times

Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: font anti-aliasing and dpi settings

Postby Marty Jack » Thu Apr 22, 2010 8:34 pm

A bit of searching indicates those settings might be in ~/.Xdefaults, which you could certainly edit by hand.

!Xft settings
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.antialias: 1
Xft.rgba: rgb

For now I'll take it as an investigation item to see if we should be adding this to LXAppearance.

L39
Posts: 1
Joined: Mon May 31, 2010 10:22 am

Re: font anti-aliasing and dpi settings

Postby L39 » Mon May 31, 2010 10:27 am

I think these setting/option are very useful for chinese font....

please add these setting to LXAppearance as soon as possible


^^

craigevil
Posts: 31
Joined: Fri Jul 24, 2009 8:48 am
Location: down the rabbit hole
Contact:

Re: font anti-aliasing and dpi settings

Postby craigevil » Wed Jun 02, 2010 5:21 am

On Debian just run dpkg-reconfigure fontconfig-config

Or edit .fontconf

</fontconfig>

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="autohint" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>false</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintnone</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

You check the dpi easily enough.

$ xrdb -query
*customization: -color
Xcursor.size: 16
Xcursor.theme_core: true
$ xdpyinfo | grep resolution
resolution: 95x96 dots per inch
Debian Sid LXDE Kernel liquorix CPU Pentium IV 2.80GHz GeForce 9400 GT
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi

kjdixo
Posts: 21
Joined: Wed Jan 11, 2012 10:22 pm

Re: font anti-aliasing and dpi settings

Postby kjdixo » Wed Jan 11, 2012 10:45 pm

I am trying out Debian Squeeze with LXDE.
debian-live-6.0.3-amd64-lxde-desktop.iso
I could not find a simple interface for Font Aliasing, Hinting and DPI as was available in Xfce.
In Xfce I could set hinting to 'slight' and adjust a few other settings.
The current LXDE in Debian Squeeze does not have that facility, although it may have been added to Debian unstable.
So I decided to search the forums.
I tried some of the methods posted on the forums (some posts were quite old and so some of the solutions didn't work anymore).

The 'fonts.conf method' does work (with most of my apps including Iceweasel) but not with my latest version of Opera browser (11.60 build 1185) which seems to ignore fonts.conf.
Through experimentation and research I have found that creating a file named .Xresources instead of fonts.conf works for all my apps including my latest Opera browser.
https://wiki.archlinux.org/index.php/Xresources
Note: ~/.Xdefaults is deprecated, so use ~/.Xresources instead.

! Xft settings ---------------------------------------------------------------

Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight

Logout and Login for the settings to take effect.
I hope this helps someone and saves them some time and I also hope it works for people who were about to give up and revert back to Xfce (excellent though it is).
Kevin Dixon


Return to “LXAppearance”

Who is online

Users browsing this forum: No registered users and 1 guest