[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: x11 font&res setting



Hallo Martin!

Hier die versprochene Antwort:
(Trans: here the promised answer:)

On Aug 02, Martin Steigerwald wrote:
> 
> Hi!
> 
> I dont know if this is really debian specific... how do I set the
> approbiate fonts for an resolution of 1152x900 or how do I set another
> resolution? I ask here cause maybe there is something Debian specific
> that eases setting things like this.

Setting a resolution and choosing another font are two different piece of
cakes. Here is the stuff about the resolutions:

Look in the file /etc/X11/XF86Config. At the very end of the file you will
find a section about your graphic card. There are different subsections for
the different color depths (means number of differnet colors you can have on
your screen at the same time):

    Subsection "Display"
        Depth       8
        Modes       "640x480" "800x600" "1024x768" "1280x1024"
        ViewPort    0 0
    EndSubsection

This is an example. "Depth" has the possible numbers  8,16,24. There are
others, but I'm sure you are not interested in them (1 is for black&white, 4
is for 16 color VGA, etc.) 8 is for nice 256 colors, but you can run out of
colors very quick (with color grabbing apps like netscape or sim.) If you
use 256 colors, some apps install a "private colormap". You can see a "wild
color swapping" on the screen, if you give the focus to a window with such a
private colormap. If you have Depth 16, or PSEUDOCOLOR, then you have more
colors, and therefore no need for a private colormap. But only with Depth 24
you have 256 possible values *for every color part red, green and blue*. But
I warn you: Depth 24 modes are slow and memory consuming. Try 16 instead.

Then you have the Modes line. This is what you want. You can add every Mode
here, that is defined in the file before. Somewhere in the middle of the
file. look for lines like 
Modeline "640x400"     25.175 640  664  760  800   400  409  411  450
in your file. Not every mode is valid for your monitor and graphic card. But
don't ask me: "Can I have mode 31415926x2718281828 with color depth 32?",
because it is very complex to write a modeline for a new resolution. Try the
existing 'common' modelines instead. You *can* write modelines, and it is
explained in /usr/X11R6/lib/X11/doc/VideoModes.doc, but I would not
recommend it. point. If you really need a 25x10009 mode, you are on your
own.

So, look for modelines that already exist. Proposed, that you have the
correct vertical refresh, horizontal refresh and video card in your file,
you can try to add the mode to the line in the Subsection "Display".

To switch between the resolutions in one line, start X or login with xdm,
and then press the {Strg}+{Alt}+{Numeric Block + or -} together. I hope you
get it.

To switch the color depth, do one of the following:
* If you start X with startx, start X with "startx -- -bpp 16" or similar.
* If you login via xdm, modify the file the file /etc/X11/xdm/Xservers.
  Add a "-bpp 16" to the very last line.


> I didnt find really clear docs that I actually understood about
> setting a resolution or fonts... I tried to set the default fontdir to
> 100dpi fonts but then I have again a fixed width font which is to
> small in the xterm windows.

Mmmh, perhaps you didn't want to know how to change the *screen* resolution?
I hope I didn't wrote the stuff above for nuts :-) I hope you found it
interesting anyways...

Now about fonts:

Your fonts are installed in /usr/X11R6/lib/X11/fonts...
Fonts have UGLY names, like this:
   -bitstream-charter-bold-r-normal--100-*-75-75-*-*-iso8859-1

You can see several fields: bitstream - firm or author?
charter - font style, somewhat interesting
bold - weight
r    - italic or normal?
100  - pixel size of the font!
the next field is not specified: it is the point size of the font (1 point
is 1/72.27 inch). It is an *, this is a wildcard. It is not senseful to
specify both, pixel size and point size. Specify one, set an * for the
other, it will be calculated.
75 - this is your font resolution! (I think in x and y?)
the last one is the characterset, but I don't know about the two * before.

My suggestion is, you install the "xcontrib" package, fire up a X session,
start xterm and type:
$ xeyes &
(just a joke, but try it)
$ xfontsel &

Play a little with this nice program, look for the right font.

> I am using fvwm95-2 for now. If you could drop me a link to usable
> info upon this I would highly appreciate it...

Somewhere in your configuration file under /etc/X11/fvwm95 (?) or in your
/home/martin/.fvwm95 you can configure *everything*. You can specify a
different font for every window title, if you want to (not that I would
suggest it...). But I don't know about fvwm95, so there you are for your
own.

If you have further trouble, mail to the list.

Thank you,
Marcus

-- 
"Rhubarb is no Egyptian god."
Marcus Brinkmann
Marcus.Brinkmann@rz.ruhr-uni-bochum.de
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: