Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot manually add new fonts

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
grayedfox
Posts: 9
Joined: 2017-10-23 23:37

Cannot manually add new fonts

#1 Post by grayedfox »

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

bigrigdriver
Posts: 145
Joined: 2014-09-01 17:04
Location: East Central Illinois, USA

Re: Cannot manually add new fonts

#2 Post by bigrigdriver »

With the new fonts in place, try running

Code: Select all

dpkg-reconfigure fontconfig fontconfig-config
Registered GNU/Linux user #170078

Go ask google before you ask on these boards.

It it isn't broken, Tweak It !!!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Cannot manually add new fonts

#3 Post by debiman »

maybe you need to add the directories to the font path.
but i'm guessing the above command will do that?

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Cannot manually add new fonts

#4 Post by Dai_trying »

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

TonyT
Posts: 575
Joined: 2006-09-04 11:57

Re: Cannot manually add new fonts

#5 Post by TonyT »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Cannot manually add new fonts

#6 Post by debiman »

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

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

Re: Cannot manually add new fonts

#7 Post by grayedfox »

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

#8 Post by grayedfox »

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

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Cannot manually add new fonts

#9 Post by Dai_trying »

If you copy (or move) them to a fonts directory in your $HOME do they get picked up by fc-cache?

Post Reply