WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Fonts  (Read 10835 times)

Offline ldp

  • Newbie
  • *
  • Posts: 8
Fonts
« on: April 22, 2012, 12:53:22 PM »
Hope this is the right place to post a question which I'm sure has been raised before but I can't seem to find the answer I'm looking for (or at least I'm not doing /understanding what I'm seeing properly).

I'm new to TC and fairly new to linux in general. I've been playing arounf with various distributions nad have installed TC as one of three on an old machine.

The (minor) problems is: how to change the fonts I'm presented with on the title bars, menu bars and menus? I've managed to work out how to change styles but I was expecting the fonts to be included with the styles, but whichever style I choose (system or user) the font stays the same.

Can someone enlighten me and point out what I'm missing?

Thanks in anticipation.

I've got TC running with fluxbox - latest versions of both.

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #1 on: April 22, 2012, 01:30:18 PM »
As an ancillary question - why does the background change when I logout and restart X with one of the user styles?
« Last Edit: April 22, 2012, 01:43:30 PM by ldp »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Fonts
« Reply #2 on: April 22, 2012, 03:42:06 PM »
hi,

perhaps you want to control your fonts in fluxbox with the overlay-config-file

~/.fluxbox/overlay
menu.title.font:                     -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
menu.frame.font:                 -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-*
window.font:                         -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-*
window.tab.font:                   -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
toolbar.font:                          -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
toolbar.iconbar.focused.font:          -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
toolbar.iconbar.unfocused.font:      -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
toolbar.*.*.font:                      -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*
*.font:                                     -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-*

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #3 on: April 22, 2012, 03:55:03 PM »
I've seen and tried the overlay file, but I've failed to see any change to the fonts being displayed. This maybe because the fonts aren't setup properly and/or the description/format in the line is not correct. Any help on the correct font layout would be a great help.




Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Fonts
« Reply #4 on: April 22, 2012, 04:00:06 PM »
the other important config-file is ~/.Xdefaults

~/.Xdefaults
Xft.dpi:96.0
#Xft.dpi:84.0
#Xft.dpi:82.0
#Xft.dpi:80.0
fltk*scheme:gtk+
aterm*loginShell:true
aterm*font:*-fixed-*-*-*-20-*
#aterm*font:-misc-fixed-medium-r-normal-*-20--*-*-c-*-iso8859-1
aterm*scrollBar:true
aterm*scrollBar_right:true
aterm*saveLines:32767
aterm*geometry:80x25
aterm*title:aterm
aterm*transparent:true
aterm*foreground:white
aterm*background:black
aterm*cursorColor:yellow
aterm*cursorBlink:true
aterm*fading:90
aterm*shading:5
aterm*color12:DodgerBlue1
« Last Edit: April 22, 2012, 04:10:50 PM by netnomad »

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #5 on: April 22, 2012, 04:12:34 PM »
Apologies for being dense, but where does this file fit in with the way that fonts have to be set up? The example you displayed is the same as mine until the Xterm entries (the # entries excepted).

I sort of assumed that the initial tc install came with virtually no fonts to speak of, and I followed the instructions on the wiki to download and install some fonts, and I'm wondering if I've set them correctly.

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #6 on: April 22, 2012, 04:26:35 PM »
Hey, netnomad,  I've got the helvetica font as you listed in your overlay, now that I pasted the entire block rather than hand-writing a couple of lines. I don't know what I did wrong but thanks!

If you can indulge me again,where do the helvetica fonts lie, and how get/setup a different font?

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Fonts
« Reply #7 on: April 23, 2012, 12:50:37 AM »
this font is part of Xlibs.tcz -> /tmp/tcloop/Xlibs/usr/lib/X11/fonts/75dpi/*

you can find it in the path of  /usr/lib/X11/fonts/75dpi.

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #8 on: April 23, 2012, 02:14:24 PM »
I can see another folder 'misc' with additional fonts within, these seem available if I reference them in the same format as the helvetica entries in the overlay file.

How are these fonts made 'available' to the system? What fonts (rather what font formats should I download)?

I'm a bit confused as how it is all meant to fit together. Is there a definitive resource for us dummies to follow?

Thanks once again.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Fonts
« Reply #9 on: April 23, 2012, 02:56:30 PM »
@ldp

They are bitmap fonts, and I doubt you're going to find many of them on the 'net. xlsfonts lists them, the font path can be set with xset, and they need the index files in the same dir as the font (as generated by mkfontdir).

@netnomad

The fluxbox build doesn't do ttf?
The only barriers that can stop you are the ones you create yourself.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Fonts
« Reply #10 on: April 23, 2012, 03:12:59 PM »
hi curaga,

actually i'm very happy with that basic xlibs-fonts and with this configuration
i got uniform, readable fonts in all my applications.
some packages like libreoffice annoyed me with their dependency to dejavu-fonts-ttf.
in my configuration dejavu-fonts-ttf didn't look good,
(very wide fonts that weren't easy readable and that didn't attracted me),
especially in icecat, minefield or thunderbird...
... so i decided to create an empty dummy-package of dejavu-fonts-ttf to get rid of that annoyance.

perhaps it was my fault, that my dejavu-fonts-ttf-configuration didn't look good...
can you give me a hint to improve the appearance?

thank you in advance for some suggestions.
« Last Edit: April 23, 2012, 03:16:00 PM by netnomad »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Fonts
« Reply #11 on: April 23, 2012, 03:22:35 PM »
Can't think of anything, but I find the dejavu fonts not too good looking myself.
The only barriers that can stop you are the ones you create yourself.

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #12 on: April 23, 2012, 04:33:49 PM »
netnomad/curaga,

Thanks for your pointers and useful snippets of info.

To be honest I'm finding that just playing around on this spare box (which I've managed to get 3 different distros installed and booting) and just 'trying things' has been the best way to learn. I'm not going to break anything so it doesn't matter what I try or do!

Thanks again!

Offline solorin

  • Full Member
  • ***
  • Posts: 184
Re: Fonts
« Reply #13 on: April 24, 2012, 02:10:32 AM »
hey ldp.

maybe a couple tips to help you in your exploration. skip whatever parts you know already.
(this is pretty much a long-winded rehash of what curaga and others have posted above)
the arch wiki has some good documentation. often times i find myself there.
https://wiki.archlinux.org/index.php/Fonts
the differences to Core aren't that many. (coz' Core is really stripped down, the major
difficulties are finding which extension the command you want is packaged in, and how to make
your adjustments persistent).

I've only experimented with bitmap fonts so I can't help you with console fonts,TTF or other
font systems. (TTF for example requires an understanding of fontconfig).
bitmap fonts are screen fonts for X and usually have the file extension pcf, pcf.gz, or bdf. pcf
and pcf.gz are fairly ready to use on your system - you just need to tell X where they are. the
terminal command xlsfonts will list the fonts that X sees at the moment and their aliases. you
can use these in the .Xdefaults file, for example, to set the font in your terminal emulator.
other programs have other ways to configure their fonts.

the repository does have a couple packages with additional bitmap fonts but my experience with them
is that they don't quite work out of the box. you can use a keyword search for fonts and then look
in the file listing for pcf or pcf.gz files. ones that come to mind are schumacher-clean-fonts.tcz
and xfonts-unifont.tcz. time permitting, i'll also upload an extension or two.
once you load the font extension. you'll have to run mkfontscale and mkfontdir on or in the directory your new fonts are in.
if this directory already has a fonts.dir or fonts.scale file you'll have to
rm these (and sudo where appropriate). mkfontdir and mkfontscale are found in Xorg-7.6-bin.tcz, etc.

next you'll have to tell X to see them by running:

xset +fp /path/to/fonts
(you can skip this if the directory is in your font path, xset -q will tell you)

xset fp rehash

if you've got X running, you'll most likely have xset already (it's found in Xlibs.tcz or
Xorg-7.x-bin.tcz).

xlsfonts will tell you if X sees the new fonts.
I haven't found a way to autogenerate fonts.alias yet, and have been editing it by hand. the format
is pretty simple, and nothing's blown up yet(i think).

you can make these changes persistent by adding fonts.dir, fonts.scale, and fonts.alias to
/opt/.filetool.lst (make sure you prepend the appropriate path)
you'll also have to add the xset commands to a script in your ~/.X.d directory.
this will load the fonts for that login name (to make it universal you'll probably have to put
them somewhere like bootlocal.sh or bootsync.sh - not sure)

contrary to what curaga said before, i've found lots of bitmap fonts on the net, the source links
of font packages in the arch user repository are a good start. (this is probably just a matter
of perception tho.)

to use them you can
a) make an extension with them and proceed as above (if you do submit pls pack fonts.dir,
fonts.scale, and font.alias with it, but make sure they don't conflict with existing ones.)
b) just download it to ~/.fonts and run the same commands as above on this directory.
these fonts will only be available to that user.

finally if you find .bdf files (the source format for bitmap fonts) you can convert them to
pcf files with the bdftopcf command (found in Xorg-7.5-bin.tcz but not Xorg-7.6-bin.tcz for some
reason).

Hope that helped a little. Questions, clarifications, corrections and addendums are all welcome.

cheerio,
solorin
« Last Edit: April 24, 2012, 04:16:31 AM by solorin »
. . . if you don't know, now you know. . .
        ----- R.I.P. Biggie Smalls -----

Offline ldp

  • Newbie
  • *
  • Posts: 8
Re: Fonts
« Reply #14 on: April 24, 2012, 11:53:49 AM »
solorin,

Thanks for the reply. Really appreciate the responses and effort.

There's a fair bit to take in so let me digest it and I'll be sure to come back to you if I've any further queries!

Once again, thanks. LDP