Cannot manually add new fonts

New to Debian (Or Linux in general)? Ask your questions here!

Cannot manually add new fonts

Postby grayedfox » 2017-10-25 14:39

I've been trying to figure out why this isn't working for days now but for the life of me I cannot.

Following the instructions here I am trying to manually install a font.

First we wget the two fonts I want from this repository. They are DejaVu Sans Mono Powerline and DejaVu Sans Mono Bold Powerline.
Code: Select all
cd /usr/local/share/fonts
sudo wget https://github.com/powerline/fonts/blob/master/DejaVuSansMono/DejaVu%20Sans%20Mono%20for%20Powerline.ttf -O "DejaVuSansMono-Powerline.ttf"
sudo wget https://github.com/powerline/fonts/blob/master/DejaVuSansMono/DejaVu%20Sans%20Mono%20for%20Powerline.ttf -O "DejaVuSansMono-BoldPowerline.ttf"


Then we run fc-cache with verbose and rebuild options.
Code: Select all
fc-cache -fv


But no matter what the result is the same (even if I move the fonts into other font directories, such as /usr/share/fonts/truetype) or if I run fc-cache with sudo. The verbose output indicates that fc-cache has missed the new fonts (since the number of total fonts recognised doesn't change - at no point does it rise by 2). Going crazy.

Has anyone managed to install a font manually on Debian 9? Thanks in advance
grayedfox
 
Posts: 9
Joined: 2017-10-23 23:37

Re: Cannot manually add new fonts

Postby bigrigdriver » 2017-10-25 15:01

With the new fonts in place, try running
Code: Select all
dpkg-reconfigure fontconfig fontconfig-config
Registered GNU/Linux user #170078

Go as google before you ask on these boards.

It it isn't broken, Tweak It !!!
bigrigdriver
 
Posts: 132
Joined: 2014-09-01 17:04
Location: East Central Illinois, USA

Re: Cannot manually add new fonts

Postby debiman » 2017-10-25 17:27

maybe you need to add the directories to the font path.
but i'm guessing the above command will do that?
User avatar
debiman
 
Posts: 1528
Joined: 2013-03-12 07:18

Re: Cannot manually add new fonts

Postby Dai_trying » 2017-10-26 04:32

I just use a fonts directory in my $HOME and fc-cache always picks them up, could it be a permissions problem?
Dai_trying
 
Posts: 332
Joined: 2016-01-07 12:25

Re: Cannot manually add new fonts

Postby TonyT » 2017-10-26 19:47

Have you tried the installer that comes with the whole powerline font package?
https://github.com/powerline/fonts
afaik font permissions need to be 644.
TonyT
 
Posts: 525
Joined: 2006-09-04 11:57

Re: Cannot manually add new fonts

Postby debiman » 2017-10-28 08:02

is /usr/local/share/fonts in Xorg's font path???
iirc, you can find out with 'xset q'.
User avatar
debiman
 
Posts: 1528
Joined: 2013-03-12 07:18

Re: Cannot manually add new fonts

Postby grayedfox » 2017-10-31 14:08

bigrigdriver wrote:With the new fonts in place, try running
Code: Select all
dpkg-reconfigure fontconfig fontconfig-config


Ran this code (with sudo since reconfig isn't available to non sudoers?) and went through the prompts. This also regenerated the font cache but I still don't have my new fonts when I do fc-list. But good to know this command, thanks for the advice.

debiman wrote:is /usr/local/share/fonts in Xorg's font path???
iirc, you can find out with 'xset q'.


This only lists two directories under "Font path":
Code: Select all
Font Path:
  /usr/share/fonts/X11/misc,built-ins


I checked and there are no .ttf or .otf type files in that directory (all zipped gz files). I could dump them there but it seems like that is not where .ttf/.otf files should live on Debian stretch.

Latest attempt was from inside the truetype/dejavu directory (next to the other truetype dejavu fonts). Still no progress.

Finally, tried following the manual install Fonts page instructions but they are potentially wrong? If I edit the fontconfig configuration file at /etc/fonts/fonts.conf the very first line says DO NOT EDIT THIS FILE.

Headscratch.
grayedfox
 
Posts: 9
Joined: 2017-10-23 23:37

Re: Cannot manually add new fonts

Postby grayedfox » 2017-10-31 14:18

Dai_trying wrote:I just use a fonts directory in my $HOME and fc-cache always picks them up, could it be a permissions problem?


Just checked and all the font files (including the one's I downloaded) have the correct permissions:

Code: Select all
/usr/share/fonts/truetype/dejavu$ ll
total 10088
-rw-r--r-- 1 root root 577708 Jul 30  2016 DejaVuMathTeXGyre.ttf
-rw-r--r-- 1 root root 643292 Jul 30  2016 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 root root 705684 Jul 30  2016 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 611836 Jul 30  2016 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r-- 1 root root 665028 Jul 30  2016 DejaVuSansCondensed-Bold.ttf
-rw-r--r-- 1 root root 599292 Jul 30  2016 DejaVuSansCondensed-Oblique.ttf
-rw-r--r-- 1 root root 680264 Jul 30  2016 DejaVuSansCondensed.ttf
-rw-r--r-- 1 root root 355380 Jul 30  2016 DejaVuSans-ExtraLight.ttf
-rw-r--r-- 1 root root 253580 Jul 30  2016 DejaVuSansMono-BoldOblique.ttf
-rw-r--r-- 1 root root  34232 Oct 31 15:42 DejaVuSansMono-BoldPowerline.ttf
-rw-r--r-- 1 root root 331992 Jul 30  2016 DejaVuSansMono-Bold.ttf
-rw-r--r-- 1 root root 251932 Jul 30  2016 DejaVuSansMono-Oblique.ttf
-rw-r--r-- 1 root root  34232 Oct 31 15:42 DejaVuSansMono-Powerline.ttf
-rw-r--r-- 1 root root 340712 Jul 30  2016 DejaVuSansMono.ttf
-rw-r--r-- 1 root root 635416 Jul 30  2016 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 root root 757076 Jul 30  2016 DejaVuSans.ttf
-rw-r--r-- 1 root root 347460 Jul 30  2016 DejaVuSerif-BoldItalic.ttf
-rw-r--r-- 1 root root 356088 Jul 30  2016 DejaVuSerif-Bold.ttf
-rw-r--r-- 1 root root 346508 Jul 30  2016 DejaVuSerifCondensed-BoldItalic.ttf
-rw-r--r-- 1 root root 331244 Jul 30  2016 DejaVuSerifCondensed-Bold.ttf
-rw-r--r-- 1 root root 345324 Jul 30  2016 DejaVuSerifCondensed-Italic.ttf
-rw-r--r-- 1 root root 346664 Jul 30  2016 DejaVuSerifCondensed.ttf
-rw-r--r-- 1 root root 345996 Jul 30  2016 DejaVuSerif-Italic.ttf
-rw-r--r-- 1 root root 380132 Jul 30  2016 DejaVuSerif.ttf
grayedfox
 
Posts: 9
Joined: 2017-10-23 23:37

Re: Cannot manually add new fonts

Postby Dai_trying » 2017-10-31 15:27

If you copy (or move) them to a fonts directory in your $HOME do they get picked up by fc-cache?
Dai_trying
 
Posts: 332
Joined: 2016-01-07 12:25


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable