Author Topic: LXDE: Changing fonts [solved]  (Read 3257 times)

qbrick

  • Guest
LXDE: Changing fonts [solved]
« on: June 14, 2010, 03:51:16 AM »
Hello, I've just installed a beautiful new font and want to select it as the standard font for gtk applications. However, as already discussed in another thread the appearance dialogue is flawed and does not let us change the gtk theme, the font used in gtk programs and the icon theme.
So, how can I change the font?
« Last Edit: June 14, 2010, 10:39:09 AM by qbrick »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts
« Reply #1 on: June 14, 2010, 04:03:24 AM »
Open Menu > More Applications > Configuration > GTK Theme Switch 2. Click the green plus sign (+) to open the "Use font." Click the Browse button and choose the font. Click Apply. Close GTK Theme Switch 2.

qbrick

  • Guest
Re: LXDE: Changing fonts
« Reply #2 on: June 14, 2010, 05:54:10 AM »
Neal, I forgot about this option, but it doesn't work anyway. I can select a different font, the new font set is displayed by name and even the preview text changes, but after clicking 'Ok' in the 'Select font' dialogue, everything's still displayed in DejaVuSans. No need to mention, that 'applying' doesn't really apply a new font. 
I tried this with several preinstalled fonts, btw, with the same results.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts
« Reply #3 on: June 14, 2010, 06:14:48 AM »
Open /home/<you>/.config/openbox/lxde-rc.xml and edit lines 54, 62, 72, 81 and 90 to change the name of your font. You can also change the size and style here. Save your changes and exit.

qbrick

  • Guest
Re: LXDE: Changing fonts
« Reply #4 on: June 14, 2010, 06:49:36 AM »
ActiveWindow InactiveWindow MenuHeader MenuItem OnScreenDisplay

Hm, those are the tags I can adjust with the Openbox Configuration manager. Funny thing is, this works from the gui.
I'd like to change the fonts of the gtk apps.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts
« Reply #5 on: June 14, 2010, 07:07:04 AM »
The file I posted about is a hidden file. Open PCManFM, click View, click Show Hidden Files, click the .config folder, then click the openbox folder and open the lxde-rc.xml file with leafpad. Edit the lines for your fonts. To see which line is which number, click Options > Show line numbers in leafpad.

You already said the GUI wasn't working for you. This is the manual way.

qbrick

  • Guest
Re: LXDE: Changing fonts
« Reply #6 on: June 14, 2010, 07:24:33 AM »
The file I posted about is a hidden file. Open PCManFM, click View, click Show Hidden Files, click the .config folder, then click the openbox folder and open the lxde-rc.xml file with leafpad.

Yep, this is the one I had opened before my last post (it's the one with the Openbox tags (onscreen display, active/inactive window fonts etc.)).
I have no problems with changing the fonts settings of the Openbox related stuff. It's the gtk settings, that aren't adjustable by the setting programs

You already said the GUI wasn't working for you. This is the manual way.

I think, the font settings for the gtk application must be elsewhere. And those I cannot change via gui, neither with lxappearance nor with the gtk-theme-switcher-2, which you suggested in your first post.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts
« Reply #7 on: June 14, 2010, 07:33:13 AM »
In /home/<you> with hidden files shown, look for lxde-rc.xml. Edit lines 54, 63, 72, 81 and 90. (This is a different file in a different place, but with the same name.)


qbrick

  • Guest
Re: LXDE: Changing fonts
« Reply #8 on: June 14, 2010, 07:54:04 AM »
Ah, I see. It seems to be a kind of default config file or template, since the settings in this file differ from those I adjusted (for example the order of the window buttons which I changed towards a more maclike style).
It says at the beginning:
version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
        Copy the file to $HOME/.config/openbox/ instead. -->


But as the lxde-rc.xml file in $HOME/.config/openbox, it just contains font setting tags for Openbox (ActiveWindow, InactiveWindow, MenuHeader, MenuItem, OnScreenDisplay), not for gtk/gnome apps.

BTW I downloaded the gconf-editor, but changing values there does not have any effects either.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts
« Reply #9 on: June 14, 2010, 08:09:55 AM »
The same (hidden) file, lxde-rc.xml is in /etc/skel. It is from here that the setting is passed to new users as they are created. Edit it. Create a new user. Check the new user to see if the settings took. If so, copy the files over.

qbrick

  • Guest
Re: LXDE: Changing fonts
« Reply #10 on: June 14, 2010, 08:45:19 AM »
Just to clarify, adjusting the Openbox related Window font settings with the Openbox Configuration Manager works perfectly. But I can't change the font settings for the gtk applications.
But interesting directory with interesting files you hinted at. I'm looking for s.th. like the .gtkrc-2.0 file.

I noticed that Menu > More Applications > Configuration > GTK Theme Switch 2 writes the values into .gtkrc-2.0, but those values in this file are simply ignored, even after I log out and in again. My font for gtk applications is still DejaVu Sans 10, although my gtkrc-2.0 files reads:

# -- THEME AUTO-WRITTEN DO NOT EDIT

include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"

style "user-font"
{
  font_name="Linux Biolinum 13"
}
widget_class "*" style "user-font"

include "/home/oliver/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT


PS In the meantime I edited the gtkrc file in /usr/share/themes/mytheme... and added

style "user-font"
{
  font_name="Linux Biolinum 13"
}
widget_class "*" style "user-font"


at the end. Still no difference.

I'm looking for a more central file to adjust my font settings for gtk.

qbrick

  • Guest
Re: LXDE: Changing fonts [solved]
« Reply #11 on: June 14, 2010, 10:42:34 AM »
Ok, I found out, why changibng the font settings with the gtk theme switcher didn't work: With the Qt-Curve theme enabled, font settings among other stuff were taken from kde config files. Selecting Bluecurve allowed me to change to another font.
Sometimes I'm so stupid.  :D
Thanks for your patience, Neal.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE: Changing fonts [solved]
« Reply #12 on: June 14, 2010, 10:58:24 AM »
Oh. I hadn't known you were using qt-curve. :o