WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: change font size  (Read 11568 times)

Offline clyde987

  • Newbie
  • *
  • Posts: 18
change font size
« on: June 18, 2019, 12:40:58 AM »
Hello,
I have TCL 6.4. and how can I change the font size of the terminal? :'(

I found this page.
http://forum.tinycorelinux.net/index.php?topic=13129.0
But I couldn't find the right page for the answer.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: change font size
« Reply #1 on: June 18, 2019, 01:07:57 AM »
If you are using the stock aterm terminal, one has to edit the .Xdefaults file like we did back in '95.

The fastest way is to just fire up another terminal from within Aterm using one of these fonts typically:

Code: [Select]
aterm -fn 10x20 &
or
Code: [Select]
aterm -fn 12x24 &
They are bigger.  Not exactly beautiful, but functional.  They are the largest you'll find on a stock system, but provide a nicer environment to get started with.

If you run

Code: [Select]
xlsfonts
you'll see other smaller fixed-width fonts like 9x15 and so forth that may or may not be too small with a high resolution screen.   The font journey begins! :)
That's a UNIX book! - cool  -- Garth

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: change font size
« Reply #2 on: June 18, 2019, 01:24:44 AM »
Hi clyde987
Find the DPI listed in in your  .Xdefaults  file:
Code: [Select]
tc@box:~$ grep Xft.dpi .Xdefaults
Xft.dpi: 96.0
tc@box:~$

The following command can be used to list all the  14 point  fonts on your system suitable for  96 DPI:
Code: [Select]
tc@box:~$ xlsfonts -f -*-*-*-*-*-*-*-140-96-96-*-*-iso8859-1
-adobe-helvetica-bold-o-normal--19-140-96-96-p-0-iso8859-1
-adobe-helvetica-bold-r-normal--19-140-96-96-p-0-iso8859-1
-adobe-helvetica-medium-o-normal--19-140-96-96-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi mono-bold-o-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-bold-o-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-bold-r-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-bold-r-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-medium-o-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-medium-o-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi mono-medium-r-normal--19-140-96-96-c-0-iso8859-1
-b&h-luxi mono-medium-r-normal--19-140-96-96-m-0-iso8859-1
-b&h-luxi sans-bold-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-bold-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-bold-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-bold-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-medium-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-medium-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-medium-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi sans-medium-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-bold-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-bold-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-bold-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-bold-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-medium-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-medium-o-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-medium-r-normal--19-140-96-96-p-0-iso8859-1
-b&h-luxi serif-medium-r-normal--19-140-96-96-p-0-iso8859-1
-misc-fixed-bold-r-normal--19-140-96-96-c-0-iso8859-1
-misc-fixed-bold-r-normal--19-140-96-96-c-0-iso8859-1
-misc-fixed-bold-r-semicondensed--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-o-normal--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-o-semicondensed--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-r-normal--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-r-normal--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--19-140-96-96-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--19-140-96-96-c-0-iso8859-1
-sony-fixed-medium-r-normal--19-140-96-96-c-0-iso8859-1
tc@box:~$

Find the  Aterm*font: fixed  line in your  .Xdefaults  file and replace the word  fixed  with one of the fonts returned with the above
command.

 * For a list of appropriate fonts available on your system:
 *    xlsfonts -f -*-*-*-*-*-*-*-S-DPIx-DPIy-T-*-iso8859-1
 * Where:
 * S  Size of font in tenth of a point. For a 12 point font, use 120
 * DPIx and DPIy  These values can be found as  Xft.dpi   in in your  .Xdefaults  file
 * T  Use  p  for proportional. For monospace (fixed), try  m  or  c

Offline clyde987

  • Newbie
  • *
  • Posts: 18
Re: change font size
« Reply #3 on: June 18, 2019, 04:23:23 AM »
Hello PDP-8,
Thank you very much for your quick reply.

I like
Code: [Select]
aterm -fn 12x24 &,
and it is nice enough.

Yes, my font journey has begun since I did
Code: [Select]
xlsfonts. ;D

Offline clyde987

  • Newbie
  • *
  • Posts: 18
Re: change font size
« Reply #4 on: June 18, 2019, 04:30:20 AM »
Hello Rich,
Thank you for your quick reply.

My "Xft.dpi" was 96.0, too.
I tried
Code: [Select]
aterm -fn -adobe-helvetica-bold-o-normal--19-140-96-96-p-0-iso8859-1 &and it worked.

Thank you for your detailed explanation. ;D

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: change font size
« Reply #5 on: June 18, 2019, 04:50:54 AM »
Glad you got it working - I took the slacker's way out. :)

A couple of other options for better looking fonts also exist:

Use the terminus-fonts.tcz package.  They aren't truetype fonts, but are VERY clear and easy to read.  Up to a 32 fontsize which helps if you are running say native resolution like 1920x1080 like I am.  I can help there if the package info file isn't too clear since I was the one who made it.

Or, in true slacker form, download and install the XFCE-4 terminal, and perhaps the Deja-Vu truetype fonts tcz's.  From there you can point-n-click the font adjustment...

Fun times!
That's a UNIX book! - cool  -- Garth

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: change font size
« Reply #6 on: June 18, 2019, 08:30:08 AM »
Hi clyde987
... I tried
Code: [Select]
aterm -fn -adobe-helvetica-bold-o-normal--19-140-96-96-p-0-iso8859-1 &
There is a hidden file in your home directory called  .Xdefaults  (note the leading period in the name). If you open it with an editor
and change the line that sets the font from this:
Code: [Select]
Aterm*font: fixedto this:
Code: [Select]
Aterm*font: -adobe-helvetica-bold-o-normal--19-140-96-96-p-0-iso8859-1then  aterm  will use that font automatically without you having to specify it each time.


For more information than you'd ever want to know on specifying fonts in X, see:
http://csweb.cs.wfu.edu/~torgerse/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/apa.html

Offline clyde987

  • Newbie
  • *
  • Posts: 18
Re: change font size
« Reply #7 on: June 18, 2019, 09:25:22 AM »
Hello PDP-8 and Rich,
Thank you for your more informations.

I will try them later.
Those look interesting. ;)

Offline clyde987

  • Newbie
  • *
  • Posts: 18
Re: change font size
« Reply #8 on: June 26, 2019, 05:49:19 AM »
Hello PDP-8,
Unfortunately, there isn't terminus-fonts.tcz on my "Apps: Regular Applications (tcz)".
I viewed some websites, "Terminus Font Homepage", "XFC desktop Environment", and some screenshots of Deja-Vu fonts.

I found "terminus-font-4.47 tar. gz", but I use "12x24" for now.

Thank you. :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: change font size
« Reply #9 on: June 26, 2019, 07:46:07 AM »
Hi clyde987
Fonts are not executables and should be backwards compatible. If you want to try  terminus-fonts.tcz  you can download it from here:
http://tinycorelinux.net/9.x/x86/tcz/terminus-fonts.tcz
into your  tce/optional  directory. You can then use  Apps->Load App Locally  to load the font to try it out. Be sure to read the info file:
http://tinycorelinux.net/9.x/x86/tcz/terminus-fonts.tcz.info
If you like the fonts, add  terminus-fonts.tcz  to your  tce/optional/onboot.lst  file.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: change font size
« Reply #10 on: June 27, 2019, 02:58:52 AM »
Rich is right - the terminus-font.tcz should be compatible with older systems as well, although I haven't tested it on older releases myself.

Since I find the terminus fonts so important for legibility when running a very simple Tiny-x server without a full xorg install, I'll go through the process a bit since the info file is kind of a hint for those who already know what's going on....

The basic stumbling block for new users may be that the terminus-fonts.tcz is a multiple step process where automation in the later steps is left to to the user to provide since there are a few ways to achieve that.  I didn't want to force a setup that the user may not like.

Ie, just downloading and installing terminus-fonts won't leave you with something that works. Here is the layout:

1) Download the terminus-fonts.tcz package and place it in your <path/to>/optional directory.  Of course later editions of TinyCore make this easy since this package is in the tinycore apps repos.

2) Load that font into the system:

Code: [Select]
tce-load -i terminus-fonts.tcz
Ok, great.  The fonts are loaded but not usable until we do this:

3) Notify X of the additional font-path.  This is far different from a user's filepath!  We'll use the xset command to inform X of the new fonts:

Code: [Select]
xset fp+ /usr/local/share/fonts/terminus/
AND, although not absolutely mandatory, we'll force X to "rehash" the fonts.  This may be needed if you use this procedure with other systems.

Code: [Select]
xset fp rehash

4) All set?  Now we can fire up Aterm with the new font.  How about size 32?  (useful for my very high resolution screen)
Code: [Select]
aterm -fn terminus-32 &
Oh, you want that in BOLD?

Code: [Select]
aterm -fn terminus-bold-32 &

5)  AUTOMATE this.  There are a few ways.

The first thing to do if you like it, is to edit in a line for

terminus-fonts.tcz

into your <path/to>/onboot.lst file.

But what about all that xset configuration and the like?

Lately, I decided to put the automation into my hidden ~/.X.d directory.

a) Create a file inside the hidden .X.d directory with a name of your choosing.  I created a file titled "myXsetup" (no quotes).  I use "my" at the beginning to let me know that it was *me* that created it, not something the system itself did.  Whatever you prefer.

b) Inside myXsetup file, I added the following to run xset, rehash, and pop up a shiny new Aterm with the new font:

Code: [Select]
xset fp+ /usr/local/share/fonts/terminus/
xset fp rehash
aterm -fn terminus-32 &

Tada!

But we're not done.  What if you kill your Aterm?

Let's make a simple executable.  I picked "tm" as the shell script filename and inside, just edited in this line:

Code: [Select]
aterm -fn terminus-32 &
Let's go ahead and make that executable:
Code: [Select]
chmod +x ./tm
Great, so now if we kill all our Aterm's, we can fire it right back up with

./tm

Other options exist, like making this an alias or whatever your heart desires.

It reads like a lot, but if you do it once, you'll see it's quite easy.

Note to new lurkers:
Aterm only supports bitmap fonts.  Terminus is a mono-spaced bitmapped font designed specifically to get rid of fuzzy corners, seriphs and other things that might be a strain to read comfortably for hours on end.

BUT, if you don't want to go through all this, and just want an even simpler solution with true-type fonts, then you'll also have to use a terminal that supports those.

One good combo might be to download and install the Deja-Vu fonts, along with a terminal that will support that, like RXVT.  See the rxvt / urxvt documentation.  One place to automate that is inside your .Xdefaults file.
« Last Edit: June 27, 2019, 03:22:22 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: change font size
« Reply #11 on: June 27, 2019, 03:50:37 AM »
Request to tcz makers:

I created the terminus-fonts.tcz to scratch my own itch and share it with others.  But as you can see, I'm not an expert, and this was my first tcz ever made.

If anyone wants to touch, recreate, and own the terminus-fonts package and provide improvements, such as automatic xset filepath additions, rehashing, and perhaps culling through all the available fonts to something else, please be my guest!
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: change font size
« Reply #12 on: June 27, 2019, 05:14:35 AM »
EmelFM file manager users:

Once terminus-fonts.tcz is installed, Emelfm can be configured to use them in the file manager windows.  With a click-n-pointy setup too!  That's pretty awesome.

Very useful for high-res screens like mine (1920x1080).

The point is that I got the most legibility in the least amount of resources with just a simple bitmapped font and stock Tinycore.  Aterm and Emelfm rock now.  There might be more out there that can use them...
That's a UNIX book! - cool  -- Garth

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: change font size
« Reply #13 on: June 27, 2019, 11:09:43 AM »
...
We'll use the xset command to inform X of the new fonts:

Code: [Select]
xset fp+ /usr/local/share/fonts/terminus/...
The extension startup file might be best location for commands to ensure default behavior on all systems
No?


Sent from my iPhone using Tapatalk

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: change font size
« Reply #14 on: June 27, 2019, 03:08:31 PM »
...
We'll use the xset command to inform X of the new fonts:

Code: [Select]
xset fp+ /usr/local/share/fonts/terminus/...
The extension startup file might be best location for commands to ensure default behavior on all systems
No?


I think no, because extension startup file will be executed before X server started and will be useless.
I've made this in the same way as PDP-8 proposes.

Maybe, the best way will be to use startup file like
Code: [Select]
echo 'xset fp+ /usr/local/share/fonts/terminus/' > ~/.X.d/30-terminus
chmod +x ~/.X.d/30-terminus
grep '30-terminus' /opt/.xfiletool.lst || echo '/home/tc/.X.d/30-terminus' >> /opt/.xfiletool.lst

« Last Edit: June 27, 2019, 03:10:32 PM by jazzbiker »