You are not logged in.

#1 2017-08-19 23:23:27

maxpegua
Member
Registered: 2017-08-16
Posts: 25

text is overlapping in terminal [SOLVED]

Hi guys this is my first post here (totally newbie).

The problem is that I cannot get configured the terminal correctly. I am using dwm and st as terminal emulator. I have installed some monospace fonts with no luck. Loot at the picture:
https://s28.postimg.org/qk0jj3ybx/text.jpg

Output of fc-list commands:

fc-match mono
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

I would appreciate any help, since I have been looking to fix for about 4 days.

Last edited by maxpegua (2017-08-20 05:53:22)

Offline

#2 2017-08-19 23:28:18

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: text is overlapping in terminal [SOLVED]

How did you install st?  Although I don't use st, I do use some suckless software like dwm and slock.  My point is, you may have to edit the config.h file to set the font manually and then recompile.  Most suckless programs are this way.

Offline

#3 2017-08-19 23:32:46

maxpegua
Member
Registered: 2017-08-16
Posts: 25

Re: text is overlapping in terminal [SOLVED]

I did it compiling it. Also I set the font Terminus editing the config.h file, I installed terminus but nothing happened.

Offline

#4 2017-08-19 23:33:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: text is overlapping in terminal [SOLVED]

maxpegua wrote:

I set the font Terminus editing the config.h file

Please post your config.h


Jin, Jîyan, Azadî

Offline

#5 2017-08-19 23:56:38

maxpegua
Member
Registered: 2017-08-16
Posts: 25

Re: text is overlapping in terminal [SOLVED]

This is the variable fonts in config.h:

char font[] = "Terminus:pixelsize=24:antialias=true:autohint=true:fixed=true";

Last edited by maxpegua (2017-08-20 00:00:17)

Offline

#6 2017-08-20 00:08:13

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

Re: text is overlapping in terminal [SOLVED]

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


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-08-20 00:10:48

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: text is overlapping in terminal [SOLVED]

Hmmm... I get the same in my system, the name must be wrong.

Try this instead:

char font[] = "monospace:pixelsize=24:antialias=true:autohint=true:fixed=true";

Then set the monospace alias in ~/.config/fontconfig/fonts.conf with this stanza:

<alias>
	<family>monospace</family>
	<prefer><family>xos4 Terminus</family></prefer>
</alias>

That must go in between the <fontconfig> & </fontconfig> tags and it works for me.

This method also has the benefit of allowing for font changes without recompiling (I use it for dwm & dmenu as well).

EDIT: corrected name of Terminus font.

Last edited by Head_on_a_Stick (2017-08-20 11:38:09)


Jin, Jîyan, Azadî

Offline

#8 2017-08-20 00:19:26

maxpegua
Member
Registered: 2017-08-16
Posts: 25

Re: text is overlapping in terminal [SOLVED]

I don' t have the ~/.config/fontconfig/fonts.conf directory should I create it?

Offline

#9 2017-08-20 00:35:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: text is overlapping in terminal [SOLVED]

^ Yes, you can create a minimal configuration with just the posted stanza enclosed with the aforementioned <fontconfig></fontconfig> tags and it should work immediately.

I like to use this fonts.conf as a base:

https://github.com/BunsenLabs/bunsen-co … fonts.conf

That already has placeholders for all of the aliases.


Jin, Jîyan, Azadî

Offline

#10 2017-08-20 00:46:57

maxpegua
Member
Registered: 2017-08-16
Posts: 25

Re: text is overlapping in terminal [SOLVED]

Thank you very much. It works. I like that config too.

Offline

#11 2017-08-20 05:07:44

maxpegua
Member
Registered: 2017-08-16
Posts: 25

Re: text is overlapping in terminal [SOLVED]

Guys me again. The overlapping issue is fixed, but now whenever I change the font in ~/.config/fontconfig/fonts.conf it does not change. I would appreciate any help on this.

Offline

#12 2017-08-20 05:09:20

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

Re: text is overlapping in terminal [SOLVED]

This is a separate issue: https://wiki.archlinux.org/index.php/Co … ow_to_post

Mark this as solved and open a new thread, and describe your issue much more clearly.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2017-08-20 11:34:32

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: text is overlapping in terminal [SOLVED]

The name of the Terminus font is:

xos4 Terminus

If that is used in char font[] then it works, the name must be the X11 version of the font, I think.

XLFD doesn't seem to work, not sure why  hmm


Jin, Jîyan, Azadî

Offline

#14 2017-09-04 18:13:59

BurhanDanger
Member
From: Sylhet, Bangladesh.
Registered: 2016-09-13
Posts: 29

Re: text is overlapping in terminal [SOLVED]

I'm not sure why you're trying to change font by changing monospce font in fontconfig . You can directly launch st with font name (or from config.h) .
For terminus it'd be

$ st -f "xos4 Terminus:pixelsize=24"

Offline

Board footer

Powered by FluxBB