View previous topic :: View next topic |
Author |
Message |
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Sun Mar 30, 2003 7:13 pm Post subject: Font size too large (Java, Mozilla) |
|
|
After installing XFree 4.2.1 and Freetype 2.1.3, some fonts appear to be too large in some applications like Mozilla or Java applets. I fixed the problem in Mozilla by adding the corresponding lines in UserChrome.css, but I haven't figured out how to change the font size of Java applets (e.g. the menu bar of Matlab). BTW, I use Blackdown JDK 1.3.1. Is there a global configuration file where I can change things like font family, font size etc.? |
|
Back to top |
|
|
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Sun Mar 30, 2003 7:20 pm Post subject: |
|
|
I just noticed that the font sizes in non-KDE applications are also too large, for example in the menus of XMMS. Any idea how I can change those font sizes too (besides the java fonts)? |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Sun Mar 30, 2003 9:23 pm Post subject: |
|
|
Hi
You could try to start the X-Server with a different dpi-setting. I had the same problem, for me
worked great (number found by trial and error). The more dpi you have set, the bigger the fonts are displayed.
Good luck |
|
Back to top |
|
|
soroko n00b
Joined: 13 Feb 2003 Posts: 35 Location: London
|
Posted: Sun Mar 30, 2003 10:55 pm Post subject: |
|
|
No need for trial and error.
If you know the pixel size size of the monitor you can compute it.
Lets say the pixel size is 0.25 mm.
Then you have 40 pixels (dots) in 1 cm. and the DPI is
40 * 2.54 = 101 |
|
Back to top |
|
|
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Mon Mar 31, 2003 6:56 am Post subject: |
|
|
I think my resolution is correct, because I have a Sony CPD-G400P @ 1280x1024, which corresponds to 90dpi x 96dpi (I measured the actual image size). The X server automatically chooses 87dpi x 96dpi, which isn't that far away. Anyway, I've also tried different resolutions like 105dpi, 110dpi, but still the java fonts and non-KDE fonts (XMMS) are way too big.
Plus, my KDE fonts are the right size (Arial 9), so the dpi should be correct. Isn't there a global config file for java apps or non-KDE (i.e. GTK or whatever) programs? Or should the KDE settings take care of those other programs? |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Mon Mar 31, 2003 10:35 am Post subject: |
|
|
Quote: | No need for trial and error.
If you know the pixel size size of the monitor you can compute it. |
That was my first trial, error included. The fonts are way too big if I calculate my dpi by resolution and monitorsize.
But anyway, getting fonts right in X always was a tricky part for me (confusions about fontconfig, xft and so on...). After the problems with size, there is now too much space between the characters in some bitmap fonts. But most of the TTF work, so I didn't spend that much time fixing the broken ones |
|
Back to top |
|
|
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Tue Apr 01, 2003 2:51 pm Post subject: |
|
|
Changing the dpi didn't help, I tried setting it to 70 dpi. The fonts inside the XMMS menus stay the same size, only the KDE fonts get smaller.
There must be a possibility to adjust font size in non-KDE programs... |
|
Back to top |
|
|
rezzi n00b
Joined: 02 Apr 2003 Posts: 14
|
Posted: Wed Apr 02, 2003 12:08 pm Post subject: wrong font... |
|
|
Your selected gtk font maybe use pixelsize (fixed size) not global DPI settings to draw text. You should switch gtk^s font setting metric "pixel" to "points". Handfull utility for this is "switch"
sorry my english lacks. |
|
Back to top |
|
|
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Wed Apr 02, 2003 3:04 pm Post subject: |
|
|
OK folks, I managed to fix the GTK fonts. I created a ~/.gtkrc with the following contents:
Code: |
style "default"
{
font="-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso8859-1"
}
class "*" style "default"
|
Now all GTK programs like XMMS look fine. Now what I need is a similar thing for java apps.
Rezzi, could you explain how to set GTK's font metric? I didn't find a utility called switch - is there a config file I have to edit? Maybe it's even ~/.gtkrc? If so, could you post the relevant code? |
|
Back to top |
|
|
leahcim n00b
Joined: 17 Mar 2003 Posts: 29
|
Posted: Wed Apr 02, 2003 3:15 pm Post subject: |
|
|
I'd make sure you're consistent. i.e make sure X , mozilla, kde etc are all using the same dpi (irrespective of what value you use)
Some apps might use .gtkrc-2.0, dunno whether that will fix java |
|
Back to top |
|
|
cle1109 n00b
Joined: 06 Mar 2003 Posts: 42
|
Posted: Wed Apr 02, 2003 3:29 pm Post subject: |
|
|
Quote: | I'd make sure you're consistent. i.e make sure X , mozilla, kde etc are all using the same dpi (irrespective of what value you use) |
Yeah, that's what I'm trying to do. My X server resolution is set to 87x96dpi, all my KDE fonts are size 9, now my GTK fonts are OK too, the only thing I'm still trying to fix is the font size of java apps. |
|
Back to top |
|
|
|