Harmonizing font sizes in XFCE? - Slackware

This is a discussion on Harmonizing font sizes in XFCE? - Slackware ; Hi, I'm fiddling with Slackware 12.0 to make a light desktop. I chose XFCE as main desktop. First thing, I set the main XFCE font from Sans 9 to Sans 12, so it's better legible. One thing that annoys me. ...

+ Reply to Thread
Results 1 to 17 of 17

Thread: Harmonizing font sizes in XFCE?

  1. Harmonizing font sizes in XFCE?

    Hi,

    I'm fiddling with Slackware 12.0 to make a light desktop. I chose XFCE as
    main desktop. First thing, I set the main XFCE font from Sans 9 to Sans
    12, so it's better legible.

    One thing that annoys me. Some apps like Seamonkey, Firefox or
    Thunderbird use fonts that seem disproportionately large. Here's a
    screenshot so you see how it actually looks:

    http://www.kikinovak.net/screenshots/fontsize.png

    Q: how can I configure fontsizes in these apps to be the same as those
    used within XFCE?

    Cheers,

    Niki

  2. Re: Harmonizing font sizes in XFCE?

    Le Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs a écritÂ*:

    > Hi,
    >
    > I'm fiddling with Slackware 12.0 to make a light desktop. I chose XFCE
    > as main desktop. First thing, I set the main XFCE font from Sans 9 to
    > Sans 12, so it's better legible.
    >
    > One thing that annoys me. Some apps like Seamonkey, Firefox or
    > Thunderbird use fonts that seem disproportionately large. Here's a
    > screenshot so you see how it actually looks:
    >
    > http://www.kikinovak.net/screenshots/fontsize.png
    >
    > Q: how can I configure fontsizes in these apps to be the same as those
    > used within XFCE?
    >


    I googled some more, and found a first little hint. I opened Firefox,
    'about:config', and set the value 'layout.css.dpi' from -1 to 0. Now when
    I restart Firefox, it uses the same fonts for menus as XFCE.

    Problem 1: it only applies for the user, and i can't expect all users on
    this machine (there will be quite a lot) to go through this procedure.
    Now what would be the system-wide equivalent for this?

    Problem 2: Thunderbird still uses the same huge fonts, and I don't know
    the trick to change these.

    Cheers,

    Niki

  3. Re: Harmonizing font sizes in XFCE?

    Le Tue, 17 Jul 2007 09:14:06 +0000, Niki Kovacs a écritÂ*:

    > Le Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs a écritÂ*:


    > I googled some more, and found a first little hint. I opened Firefox,
    > 'about:config', and set the value 'layout.css.dpi' from -1 to 0. Now
    > when I restart Firefox, it uses the same fonts for menus as XFCE.
    >

    Another follow-up. This half-solution appears to be a non-solution. Menu
    fonts may be OK now... but the fonts used to display webpages are so
    small they're nearly invisible.

    I'm still clueless.

    N.

  4. Re: Harmonizing font sizes in XFCE?

    Niki Kovacs wrote:
    > Le Tue, 17 Jul 2007 09:14:06 +0000, Niki Kovacs a écrit*:
    >
    >> Le Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs a écrit*:

    >
    >> I googled some more, and found a first little hint. I opened Firefox,
    >> 'about:config', and set the value 'layout.css.dpi' from -1 to 0. Now
    >> when I restart Firefox, it uses the same fonts for menus as XFCE.
    >>

    > Another follow-up. This half-solution appears to be a non-solution. Menu
    > fonts may be OK now... but the fonts used to display webpages are so
    > small they're nearly invisible.


    have you thought about asking this on some mozilla mailing list? you
    mention that seamonkey, firefox and thunderbird are affected. seems like
    mozilla's to blame... ;-)

    --
    Joost Kremers joostkremers@yahoo.com
    Selbst in die Unterwelt dringt durch Spalten Licht
    EN:SiS(9)

  5. Re: Harmonizing font sizes in XFCE?

    On Tue, 17 Jul 2007 11:07:43 +0000, Niki Kovacs wrote:

    >> I googled some more, and found a first little hint. I opened Firefox,
    >> 'about:config', and set the value 'layout.css.dpi' from -1 to 0. Now
    >> when I restart Firefox, it uses the same fonts for menus as XFCE.


    > Another follow-up. This half-solution appears to be a non-solution. Menu
    > fonts may be OK now... but the fonts used to display webpages are so small
    > they're nearly invisible.



    You need to investigate the file

    ~/.mozilla/firefox/XYZ.default/chrome/userChrome.css

    Where XYZ is whatever your install calls it. There is already a example
    file there. You can get a lot more info on the Mozilla website that
    explains the options in more detail. Also look into user.js as sometimes
    tweaks there help also. I'll post my files below for examples...

    user.js:

    user_pref("font.directory.truetype.1",
    "/usr/X11R6/lib/X11/fonts/truetype");

    user_pref("font.FreeType2.enable", true);
    user_pref("font.FreeType2.unhinted", false);

    userChrome.css:

    /*
    * Edit this file and copy it as userChrome.css into your
    * profile-directory/chrome/
    */

    /*
    * This file can be used to customize the look of Mozilla's user
    interface
    * You should consider using !important on rules which you want to
    * override default settings.
    */

    /*
    * Do not remove the @namespace line -- it's required for correct
    functioning
    */
    @namespace
    url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*
    set default namespace to XUL */


    /*
    * Some possible accessibility enhancements:
    */
    /*
    * Make all the default font sizes 20 pt:
    */
    {
    font-size: 16pt !important;
    }

    /*
    * Make menu items in particular 15 pt instead of the default size:
    */
    menupopup > * {
    font-size: 11pt !important;
    }

    /*
    * Give the Location (URL) Bar a fixed-width font
    *
    * #urlbar {
    * font-family: monospace !important;
    * }
    */

    /*
    * Eliminate the throbber and its annoying movement:
    *
    * #throbber-box {
    * display: none !important;
    * }
    */

    /*
    * For more examples see http://www.mozilla.org/unix/customizing.html
    */

    /* window {
    * font-size: 3.5mm !important;
    * font-family: helvetica !important;
    *}
    */

    menubar, menubutton, menulist, menu, menuitem, textbox, toolbar, tab,
    tree, tooltip
    {
    font-family: verdana, helvetica !important;
    font-size: 15px !important;
    }


    --
    Linux Help: http://rsgibson.com/linux.htm
    Email - rsgibson@verizon.borg
    Replace borg with net


  6. Re: Harmonizing font sizes in XFCE?

    Ron Gibson wrote:
    -------------------snip-------------------

    > * Do not remove the @namespace line -- it's required for correct
    > functioning
    > */
    > @namespace
    > url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*
    > set default namespace to XUL */
    >
    >

    --------------snip--------------

    That's pretty damn funny.

  7. Re: Harmonizing font sizes in XFCE?

    On 2007-07-17, King Beowulf wrote:
    > Ron Gibson wrote:
    > -------------------snip-------------------
    >
    >> * Do not remove the @namespace line -- it's required for correct
    >> functioning
    >> */
    >> @namespace
    >> url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*
    >> set default namespace to XUL */
    >>
    >>

    > --------------snip--------------
    >
    > That's pretty damn funny.


    Open the URL for more humor!

    --keith


    --
    kkeller-usenet@wombat.san-francisco.ca.us
    (try just my userid to email me)
    AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
    see X- headers for PGP signature information


  8. Re: Harmonizing font sizes in XFCE?

    On Tue, 17 Jul 2007 11:07:43 +0000, Niki Kovacs wrote:

    > Le Tue, 17 Jul 2007 09:14:06 +0000, Niki Kovacs a écritÂ*:
    >
    >> Le Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs a écritÂ*:

    >
    >> I googled some more, and found a first little hint. I opened Firefox,
    >> 'about:config', and set the value 'layout.css.dpi' from -1 to 0. Now
    >> when I restart Firefox, it uses the same fonts for menus as XFCE.
    >>

    > Another follow-up. This half-solution appears to be a non-solution. Menu
    > fonts may be OK now... but the fonts used to display webpages are so
    > small they're nearly invisible.
    >
    > I'm still clueless.
    >
    > N.


    Hi Niki,

    I create a hidden file in my home directory called .gtkrc-2.0

    I use "Arial 9" for my fonts so I add the following line to this file:

    gtk-font-name = "Arial 9"

    This will force the GTK applications like Pan, Firefox, Thunderbird, Gimp
    etc. to use the font specified in this file.

    No need to install any additional applications for this work either.

    HTH

  9. Re: Harmonizing font sizes in XFCE?

    On Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs wrote:

    > I'm fiddling with Slackware 12.0 to make a light desktop. I chose XFCE as
    > main desktop. First thing, I set the main XFCE font from Sans 9 to Sans
    > 12, so it's better legible.
    >
    > One thing that annoys me. Some apps like Seamonkey, Firefox or
    > Thunderbird use fonts that seem disproportionately large. Here's a
    > screenshot so you see how it actually looks:
    >
    > http://www.kikinovak.net/screenshots/fontsize.png
    >
    > Q: how can I configure fontsizes in these apps to be the same as those
    > used within XFCE?



    I am a recent convert to XFCE as well, and had very similar problems with
    font sizes. Don't remember where I found the following, but it has worked
    wonders for my system:

    The basic idea is to use 96 DPI fonts instead of the default(?) 75 DPI.
    DPI = dots per inch.

    Add this line: Xft.dpi: 96
    to the file: ~/.config/xfce4/Xft.xrdb

    Another thing I did (and I don't actually know which one fixed my problem
    since I made both changes at the same time, perhaps both are needed), was
    to add this line to the "Monitor" section of my /etc/X11/xorg.conf file:

    DisplaySize 270 203

    The above assumes a resolution of 1024x768 (this old laptop). The actual
    formula if you have something different is:

    (25.4 x ) divided by DPI

    for example: (25.4 x 1024) / 96 = 270

    Also in the desktop settings of XFCE, turn on AntiAliasing, set Hinting to
    medium, and enable the LCD mode if using an LCD. You certainly would
    have to restart X after all the changes, I just rebooted to be sure. All
    of this worked great for my display and I'm very happy with XFCE now.

    HTH.


    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me".


  10. Re: Harmonizing font sizes in XFCE?

    On Tue, 17 Jul 2007 08:23:29 +0000, Niki Kovacs wrote:

    > I'm fiddling with Slackware 12.0 to make a light desktop. I chose XFCE as
    > main desktop. First thing, I set the main XFCE font from Sans 9 to Sans
    > 12, so it's better legible.
    >
    > One thing that annoys me. Some apps like Seamonkey, Firefox or
    > Thunderbird use fonts that seem disproportionately large. Here's a
    > screenshot so you see how it actually looks:
    >
    > http://www.kikinovak.net/screenshots/fontsize.png
    >
    > Q: how can I configure fontsizes in these apps to be the same as those
    > used within XFCE?



    I am a recent convert to XFCE as well, and had very similar problems with
    font sizes. Don't remember where I found the following, but it has worked
    wonders for my system:

    The basic idea is to use 96 DPI fonts instead of the default(?) 75 DPI.
    DPI = dots per inch.

    Add this line: Xft.dpi: 96
    to the file: ~/.config/xfce4/Xft.xrdb

    Another thing I did (and I don't actually know which one fixed my problem
    since I made both changes at the same time, perhaps both are needed), was
    to add this line to the "Monitor" section of my /etc/X11/xorg.conf file:

    DisplaySize 270 203

    The above assumes a resolution of 1024x768 (this old laptop). The actual
    formula if you have something different is:

    (25.4 x ) divided by DPI

    for example: (25.4 x 1024) / 96 = 270

    Also in the desktop settings of XFCE, turn on AntiAliasing, set Hinting to
    medium, and enable the LCD mode if using an LCD. You certainly would
    have to restart X after all the changes, I just rebooted to be sure. All
    of this worked great for my display and I'm very happy with XFCE now.

    HTH.


    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me".


  11. Re: Harmonizing font sizes in XFCE?

    Dan C wrote:
    > Another thing I did (and I don't actually know which one fixed my problem
    > since I made both changes at the same time, perhaps both are needed), was
    > to add this line to the "Monitor" section of my /etc/X11/xorg.conf file:
    >
    > DisplaySize 270 203
    >
    > The above assumes a resolution of 1024x768 (this old laptop). The actual
    > formula if you have something different is:
    >
    > (25.4 x ) divided by DPI
    >
    > for example: (25.4 x 1024) / 96 = 270


    Why this calculation?

    From the xorg.conf(5x) manpage on a Slack 10.2 system:

    DisplaySize width height
    This optional entry gives the width and height, in millimetres,
    of the picture area of the monitor. If given this is used to
    calculate the horizontal and vertical pitch (DPI) of the screen.

    Just measure the size! Or are you trying to accompish some scaling
    by calculating with a 'wrong' DPI value? In that case you'll have
    the same effect if you scale the measured size by some factor.

    Regards,

    Kees.

    --
    Kees Theunissen.

  12. Re: Harmonizing font sizes in XFCE?

    On Wed, 18 Jul 2007 20:07:30 +0200, Kees Theunissen wrote:

    > Just measure the size! Or are you trying to accomplish some scaling by
    > calculating with a 'wrong' DPI value? In that case you'll have the
    > same effect if you scale the measured size by some factor.


    AFAIK all you need to do to change the dpi setting is...

    startx -- -dpi 96

    Convince yourself by running...

    xdpyinfo | grep resol

    Dan may have referred to an help file for OpenSuse for MS fonts (which
    is quite good for the more modern Xorg). They made one error as far as I
    can tell in saying you needed to do that calculation. Perhaps that is
    necessary for atypical monitors without a 4:3 aspect ratio.

    But on my regular old 19" CRT Viewsonic all I need is the startx switch.

    If you'd like the URL for the OSuse guide...

    http://en.opensuse.org/
    Optimal_Use_of_MS_TrueType_Core_Fonts_for_a_KDE_De sktop_on_SuSE#The_Bytec
    ode_Interpreter

    or...

    http://tinyurl.com/22shva

    PS: the dpi setting will indeed affect how fonts appear. A dpi setting
    of 96-100 is optimal on most machines, I've found.


    --
    Linux Help: http://rsgibson.com/linux.htm
    Email - rsgibson@verizon.borg
    Replace borg with net


  13. Re: Harmonizing font sizes in XFCE?

    On Wed, 18 Jul 2007 20:07:30 +0200, Kees Theunissen wrote:

    > Just measure the size! Or are you trying to accompish some scaling by
    > calculating with a 'wrong' DPI value? In that case you'll have the same
    > effect if you scale the measured size by some factor.


    I can't speak for Dan, but I use this calculation to insure that I am
    rendering my fonts in the desired dpi setting regardless of the
    resolution I may choose.

    Suppose I want to have my fonts display at 96 dpi on my laptop which
    displays best at 1440 x 900. I would use the DisplaySize option in
    xorg.conf by setting the values as:

    DisplaySize 379 237

    After a time I might decide the fonts are rendering too small and strain
    my eyes. I want to try 100 dpi to enlarge the font slightly for any
    given font size. I would change the DisplaySize option to:

    DisplaySize 364 227

    The values are determined using the calculation:

    1440/(desired dpi) x 25.25 and 900/(desired dpi) x 25.25

    As I'm stuck with this resolution (1440x900) the only way to manipulate
    the dpi and font size is through this method. Yes, I could just use
    larger font sizes, but the dpi setting can have significant impact on the
    percieved quality of the font rendering - particularly with MS core fonts
    and antialiasing turned off.

    Of course, if I were to start X via "startx" then this could easily be
    set from within the startx script as stated in a different post in this
    thread. This would have no impact though if I were to use KDM, GDM, XDM
    etc. which I do.

    As for whether or not this is the wrong dpi value, I can only say it does
    exactly what "I" want it to and does it predictably so in my case it is
    not wrong.

    Steve

  14. Re: Harmonizing font sizes in XFCE?

    Steve trolled:

    >Suppose I want to have my fonts display at 96 dpi on my laptop
    >which displays best at 1440 x 900. I would use the DisplaySize
    >option in xorg.conf by setting the values as:


    >DisplaySize 379 237


    >After a time I might decide the fonts are rendering too small and
    >strain my eyes. I want to try 100 dpi to enlarge the font slightly
    >for any given font size. I would change the DisplaySize option to:


    >DisplaySize 364 227


    We set the fonts from entirely within XFCE and they are perfect. We
    see no reason to go to X for font size issues.

    cordially, as always,

    rm
    --
    Guy Bacon's *newest* resume can be found here:

    http://guybacon.bounceme.net


  15. Re: Harmonizing font sizes in XFCE?

    On Wed, 18 Jul 2007 20:07:30 +0200, Kees Theunissen wrote:

    >> The above assumes a resolution of 1024x768 (this old laptop). The actual
    >> formula if you have something different is:
    >>
    >> (25.4 x ) divided by DPI
    >>
    >> for example: (25.4 x 1024) / 96 = 270


    > Why this calculation?


    Because that's what I found somewhere while Googling for information about
    it.

    > Just measure the size! Or are you trying to accompish some scaling
    > by calculating with a 'wrong' DPI value? In that case you'll have
    > the same effect if you scale the measured size by some factor.


    I don't have a millimeter-scaled ruler handy. I'm not trying to
    "accompish" anything but make my fonts look the way I want them to. The
    above method works for me, and that's why I posted the information. As
    always with Linux, there are likely many other ways to accomplish the same
    thing. Whatever floats your boat.


    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me".


  16. Re: Harmonizing font sizes in XFCE?

    On Thu, 19 Jul 2007 00:24:21 +0000, Steve wrote:

    > This would have no impact though if I were to use KDM, GDM, XDM
    > etc. which I do.


    I never ever use those things and you can't pass those startx options
    using them. I also always boot into runlevel 3.

    > As for whether or not this is the wrong dpi value, I can only say it does
    > exactly what "I" want it to and does it predictably so in my case it is
    > not wrong.


    Uhh, I didn't say it was wrong.

    In my case all my fonts are outstanding, way better than stock. But I'm
    sure you would not want to go to all the trouble I do to get them that
    way...so...in my case that is not wrong :-)

    --
    Linux Help: http://rsgibson.com/linux.htm
    Email - rsgibson@verizon.borg
    Replace borg with net


  17. Re: Harmonizing font sizes in XFCE?

    Dan C a écrit :

    > I am a recent convert to XFCE as well, and had very similar problems with
    > font sizes. Don't remember where I found the following, but it has worked
    > wonders for my system:
    >
    > The basic idea is to use 96 DPI fonts instead of the default(?) 75 DPI.
    > DPI = dots per inch.
    >
    > Add this line: Xft.dpi: 96
    > to the file: ~/.config/xfce4/Xft.xrdb
    >
    > Another thing I did (and I don't actually know which one fixed my problem
    > since I made both changes at the same time, perhaps both are needed), was
    > to add this line to the "Monitor" section of my /etc/X11/xorg.conf file:
    >
    > DisplaySize 270 203
    >
    > The above assumes a resolution of 1024x768 (this old laptop). The actual
    > formula if you have something different is:
    >
    > (25.4 x ) divided by DPI
    >
    > for example: (25.4 x 1024) / 96 = 270
    >
    > Also in the desktop settings of XFCE, turn on AntiAliasing, set Hinting to
    > medium, and enable the LCD mode if using an LCD. You certainly would
    > have to restart X after all the changes, I just rebooted to be sure. All
    > of this worked great for my display and I'm very happy with XFCE now.
    >
    > HTH.
    >

    That helped indeed! Thanks very much for your detailed explanation! I
    already began to bang my head against the keyboard while searching a
    solution to that problem.

    Also, thanks to everybody else for the suggestions.

    Cheers,

    Niki

+ Reply to Thread