You are not logged in.

#1 2019-01-09 18:12:13

hotze
Member
Registered: 2014-03-04
Posts: 12

Cannot properly change Font in Termite

I have installed Arch with i3 and I use Termite as Terminal Emulator.
Currently, this line is in my  ~/.config/termite/config:

[options]
font = Monospace 18

which then looks like this, as expected:

https://imgur.com/download/Tjx9SBj

These are the installed fonts:

~> ls -lh /usr/share/fonts/
total 0
drwxr-xr-x 1 root root   22 Jan  9 17:40 100dpi
drwxr-xr-x 1 root root   22 Jan  9 17:40 75dpi
drwxr-xr-x 1 root root  748 Jan  9 17:32 adobe-source-code-pro
drwxr-xr-x 1 root root  374 Jan  6 22:47 awesome-terminal-fonts
drwxr-xr-x 1 root root  248 Jan  5 01:53 cantarell
drwxr-xr-x 1 root root   22 Jan  9 17:40 cyrillic
drwxr-xr-x 1 root root 1.3K Jan  4 18:53 encodings
drwxr-xr-x 1 root root  918 Jan  9 17:40 misc
drwxr-xr-x 1 root root  24K Jan  9 14:28 noto
drwxr-xr-x 1 root root 1.1K Jan  9 14:23 TTF
drwxr-xr-x 1 root root  460 Jan  4 18:53 util

And searching using "fc-list" gives many many results:

fc-list | grep -i noto
/usr/share/fonts/noto/NotoSansTaiLe-Regular.ttf: Noto Sans Tai Le:style=Regular
....
....
....
/usr/share/fonts/noto/NotoSerifDevanagari-Regular.ttf: Noto Serif Devanagari:style=Regular
/usr/share/fonts/noto/NotoSerifTamil-Bold.ttf: Noto Serif Tamil:style=Bold

However, if I change to the followign config:

[options]
font = Noto 18

I get this:
https://imgur.com/download/J4ftnA0


Which is obviously not what I want! Whatever I change the font to except "Monospace", I get the second result!

What am I missing here?

Last edited by jasonwryan (2019-01-09 18:18:20)

Offline

#2 2019-01-09 18:18:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cannot properly change Font in Termite

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-01-09 20:38:20

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

Re: Cannot properly change Font in Termite

And what do you get from `fc-match Noto`?

More importantly, wouldn't you at least want to use a monospace variant of Noto?

Last edited by Trilby (2019-01-09 20:39:22)


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

Offline

#4 2019-01-10 03:53:32

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Cannot properly change Font in Termite

This overlapping of characters seems fairly common when using fonts with variable spacing/width in the terminal.

Try font = Noto Sans Mono 18

Offline

#5 2019-01-10 07:37:35

hotze
Member
Registered: 2014-03-04
Posts: 12

Re: Cannot properly change Font in Termite

Thanks, Trilby and dmartins, the missing monospace was definately a problem.

Trilby wrote:

And what do you get from `fc-match Noto`?

More importantly, wouldn't you at least want to use a monospace variant of Noto?

This gives me

~> fc-match Noto
FreeSans.ttf: "FreeSans" "Regular"
~> fc-match gohu
FreeSans.ttf: "FreeSans" "Regular"

which I find peculiar - why do I get the same resulting font ?

Offline

#6 2019-01-10 08:01:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,687

Re: Cannot properly change Font in Termite

Because "Noto" is not a font, try

fc-match "Noto Sans"

No idea about gohu, try "fc-list | grep -i gohu" to get an idea of its actual name.

Offline

#7 2019-01-10 12:22:29

hotze
Member
Registered: 2014-03-04
Posts: 12

Re: Cannot properly change Font in Termite

seth wrote:

Because "Noto" is not a font, try

fc-match "Noto Sans"

Ah ok, thanks! This actually gives me

~> fc-match "Noto Sans"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
seth wrote:

No idea about gohu, try "fc-list | grep -i gohu" to get an idea of its actual name.

This is the result:

~> fc-list | grep -i gohu
/usr/share/fonts/misc/gohufont-uni-14.pcf.gz: Gohu GohuFont:style=Regular
/usr/share/fonts/misc/gohufont-11.pcf.gz: Gohu GohuFont:style=Regular
/usr/share/fonts/misc/gohufont-uni-11.pcf.gz: Gohu GohuFont:style=Regular
/usr/share/fonts/misc/gohufont-14.pcf.gz: Gohu GohuFont:style=Regular
/usr/share/fonts/misc/gohufont-uni-14b.pcf.gz: Gohu GohuFont:style=Bold
/usr/share/fonts/misc/gohufont-14b.pcf.gz: Gohu GohuFont:style=Bold
/usr/share/fonts/misc/gohufont-uni-11b.pcf.gz: Gohu GohuFont:style=Bold
/usr/share/fonts/misc/gohufont-11b.pcf.gz: Gohu GohuFont:style=Bold

what's the font name I need to use? fc-match always gives me "FreeSans" :

~> fc-match "Gohu"
FreeSans.ttf: "FreeSans" "Regular"
~> fc-match "GohuFont"
FreeSans.ttf: "FreeSans" "Regular"
~> fc-match "GohuFont Sans"
FreeSans.ttf: "FreeSans" "Regular"
~> fc-match "Gohu Sans"
FreeSans.ttf: "FreeSans" "Regular"
~> fc-match "GohuFont Bold"
FreeSans.ttf: "FreeSans" "Regular"

Sorry, I don't get whats happening. Where is the translation made between the files returned by "fc-list" and the name of the font?

Offline

#8 2019-01-10 13:13:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,687

Re: Cannot properly change Font in Termite

The name is "Gohu GohuFont" …

Offline

#9 2019-01-10 14:34:46

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

Re: Cannot properly change Font in Termite

hotze wrote:

Sorry, I don't get whats happening. Where is the translation made between the files returned by "fc-list" and the name of the font?

Seth's comment above should help you spot the pattern in fc-list output and how to get the name fc-match will (should) recognize.  The rest of your question goes a bit deeper though.  First, note that I consider myself quite proficient with linux in general and arch in particular, but FontConfig has always been a major headache for me: I just never fully "get it".  It seems quite non-determinisitic to me.  Of course it is in reality deterministic (as it's running on a computer, and I'm pretty sure it's not making use of a random number generator to pick fonts), but its behavior is determined by *many* disperate factors which are often rather opaque.

You can learn about many of these factors here:
https://wiki.archlinux.org/index.php/Font_configuration

Or, if you are like me, you will content yourself with learning a few heuristics from the patterns you see from font config and give up on trying to really understand it.

EDIT: for clarity, such "giving up" is not something I'd normally recommend and may be seen as quite out of character for me (I'd hope).  But I want to express that font config can be pretty confusing, so being confused is "ok".

Last edited by Trilby (2019-01-10 14:36:59)


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

Offline

Board footer

Powered by FluxBB