You are not logged in.

#1 2014-07-23 12:28:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

The complex beauty of terminus font variants.

I wanted to use terminus font in fbterm and in st, but neither application wanted to work with the terminus-font I had installed. I found out that's not a new issue, but thankfully I was able to fix this by using terminus-font-ttf from the AUR:

Tblue wrote:

This package contains (automatically generated and scalable) TTF versions of Terminus Font; the package in [community] contains the original (and official) bitmap fonts.

If in doubt, use the [community] package as the TTF versions are of lower quality -- they are intended mainly for Java applications which cannot use bitmap fonts.

$ grep "font-names" ~/.fbtermrc
font-names=Terminus (TTF)
$ grep "static char font" ~/apps/st-git/src/st/config.h
static char font[] = "Terminus (TTF):pixelsize=22:antialias=false:autohint=false";

I can add this to the respective wiki articles
https://wiki.archlinux.org/index.php/St
https://wiki.archlinux.org/index.php/Fbterm
but I maybe there should also be a note about another font with 'terminus' in the name:

$ pacman -Qo /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz
/usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz is owned by kbd 2.0.1-1

https://wiki.archlinux.org/index.php/Fo … sole_fonts


I get easily confused, so I'm posting here so that I can share the fix on how to use terminus in fbterm and in st and get some feedback on how to proceed with updating the wiki.
Maybe create a new page that discusses this all and add some info about terminus-inspired fonts?

Offline

#2 2014-07-24 17:11:20

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: The complex beauty of terminus font variants.

I'm a little confused. What do you mean by "neither application wanted to work with the terminus-font"? Is it general knowledge that those terminal emulators don't work with bitmap fonts?

You could simply add "terminus-font-ttf" in the list here: https://wiki.archlinux.org/index.php/Fonts#TrueType

Offline

#3 2014-07-24 17:20:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

Terminus (the regular one) has been working for me in fbterm.  Fbterm does use fontconfig, so as long as there's an fc-match for it you should be fine.  I tried the TTF version too, I'm not sure it worked, it looked like the fallback font, but I didn't tinker with it.  They both can be matched and differntiated by font-config:

$ fc-match Terminus
ter-112n.pcf.gz: "Terminus" "Regular"

$ fc-match "Terminus (TTF)"
TerminusTTF.ttf: "Terminus (TTF)" "Medium"

Do you get a fc-match for the 'regular' terminus?

EDIT: currently I'm trying to get terminess-powerline working with fbterm, but as it is not listed by font-config it's a no-go.  Why it isn't recognized by font-config, however, is beyond me.  Font-config has always struck me as some sort of mystical black magic.  Yes I followed the steps in the wiki, but they just never produced a font-config listing for terminess-powerline.

Last edited by Trilby (2014-07-24 17:21:19)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2014-07-24 17:35:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: The complex beauty of terminus font variants.

The regular terminus doesn't seem to support Polish letters like ąęćżńół - they were printed in a different font, a fallback one I suppose.
I'm using the regular terminus in the tty and I can read and write Polish just fine. Why fbterm doesn't like it - I don't know, maybe I misconfigured something.
Can you check if they're printed properly

$ cat fonttest
aąeęoólłżźćń
AĄOÓLŁZŻ

For example 'a' and 'ą' should differ only in the small hook at the bottom of 'ą', their size and shape should be the same.


Edit:

$ fc-match Terminus
ter-112n.pcf.gz: "Terminus" "Regular"
$ fc-match "Terminus (TTF)"
TerminusMedium.ttf: "Terminus (TTF)" "Medium"

Where did you get 'TerminusTTF.ttf' from?

Edit 2: I must have installed terminus-font-ttf from [aurbin] unofficial repo, because the 4.39-2 AUR package provides TerminusTTF.ttf.
Can I haz black belt in making things clear as mud?

Last edited by karol (2014-07-24 18:20:09)

Offline

#5 2014-07-24 18:10:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

I just confirmed your results with fbterm and the 'regular' terminus font.  The polish characters are not quite right - they seem to be drawn by a fallback font (e.g. the 'a' and 'ą' are both drawn, but with different size and proportions).

I just tried out a variety of options for additional text encodings (in fbtermrc) thinking it might be an encoding issue - but no change.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2014-07-24 18:22:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: The complex beauty of terminus font variants.

What about the ttf version? Do Polish letters look OK? 'ł' shouldn't be hair-thin, this should be just an 'l' with an extra line in the middle.

Offline

#7 2014-07-24 18:39:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

As mentioned, I couldn't even get the TTF version to load in fbterm - it just used the fallback.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2014-07-24 19:01:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: The complex beauty of terminus font variants.

Ah, I thought only some glyphs weren't loading.
What's the output of 'fbterm -v'? It should tell you which fonts you can use.

Offline

#9 2014-07-24 19:07:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

That doesn't seem to work as intended here.  The -v and --verbose flags are ignored and fbterm just starts.  To be sure I even tried:

fbterm -v >log 2>&1

and after I exited the fbterm session that it started 'log' was an empty file.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2014-07-24 19:34:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: The complex beauty of terminus font variants.

Are you using fbterm 1.7.0-6 from [community]?

Offline

#11 2014-07-24 20:12:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

Yes.  And no aliases or shell functions relating to fbterm (I just grepped my dot-files to be sure).  With the exception of setting the font, I use a stock fbtermrc - and even when removing the font setting, I get the same (lack of) result with the -v or --verbose switches.

EDIT: Out of curiosity, what does the '-v' switch do for you?  Does it start a session and print extra info, or does it just print extra info?  Does it work also from a terminal emulator?  When I try 'fbterm -v' from urxvt in X, I just get the error that it cannot start the session - specifically "stdin isn't a interactive tty!".

EDIT2: I just cleared my pacman cache, and redownloaded/installed fbterm - no change.

EDIT3: out of frustration I just grabbed the abs PKGBUILD and started hacking away.  I removed every check of the verbose variable so it would always behave as if it were set to true regardless of the command line options.  I still get no output.

Last edited by Trilby (2014-07-24 20:31:44)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2014-07-24 20:40:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: The complex beauty of terminus font variants.

Trilby wrote:

Out of curiosity, what does the '-v' switch do for you?  Does it start a session and print extra info

Yes.

I can't get the output saved in a file. Once I figure it out (or take a screenshot), I'll post it.
http://www.linuxquestions.org/questions … ost5200409

It works only from the tty, not under X.



OT: Motho ke motho ka botho - K.Mandla's blog of Linux experiences is active again.
http://kmandla.wordpress.com/

http://inconsolation.wordpress.com/ is still active.

Offline

#13 2014-07-24 20:42:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: The complex beauty of terminus font variants.

So does the fbterm verbose output display inside the new fbterm session, or do you only see it when you exit and go back to the tty?  This might help me track it down, as my screen might get cleared somewhere.  Knowing which 'level' to look into would help.

EDIT: nevermind - I just moved my entire bashrc and now it works - it shows up within the fbterm session. (found the offending "clear" command which I put in my tty section of bashrc specifically for ftberm as I get odd background color artifacts otherwise)

Last edited by Trilby (2014-07-24 20:49:23)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2014-07-25 00:06:34

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,601

Re: The complex beauty of terminus font variants.

Trilby wrote:

EDIT: nevermind - I just moved my entire bashrc and now it works - it shows up within the fbterm session. (found the offending "clear" command which I put in my tty section of bashrc specifically for ftberm as I get odd background color artifacts otherwise)

What happens if you leave a top session open? My background in fbterm has artifacts too, running top 'solves' that. It only happens if I switch between TTY's, don't actually know if that's what happening in your case?

Offline

Board footer

Powered by FluxBB