Page 1 of 2

[solved] Installing fonts?

Posted: Wed Apr 17, 2019 1:58 am
by Domarius
Should I follow the "Ubuntu" instructions from this page? Or is there a built-in way?
https://www.techrepublic.com/blog/linux ... -in-linux/

I found in Ubuntu I could just right-click on the .ttf file and click "Install". I was wondering if there was something as straight forward in MX Linux, because I've been led to believe that it's generally a bad idea to modify the system folders in Linux.

Re: Installing fonts?

Posted: Wed Apr 17, 2019 2:10 am
by skidoo
https://wiki.debian.org/Fonts
If the instructions therein are not exactly applicable, please post back to mention any points of confusion/difficulty... then those points could be covered in a future MX wiki page.

FWIW, the MX User Manual (PDF) does have a section (a few sentences) regarding "Adding Fonts"

Re: Installing fonts?  [Solved]

Posted: Wed Apr 17, 2019 4:34 am
by Domarius
Ah thank you - yes the instructions in the actual MX Manual worked. Basically copying the font file into /usr/share/fonts. It says to "open a root Thunar" so you can copy it, and if I search the manual for "root Thunar", I get the instructions to do that too. After I opened GIMP, the font was available.

I'm sure one day there will be an installer like Ubuntu has, so the average user doesn't have to mess around with admin file access, but the main thing is the MX Manual instructions are reliable. I'll start checking there first now that I'm more aware of it!

Re: Installing fonts?

Posted: Wed Apr 17, 2019 5:08 am
by Head_on_a_Stick
Domarius wrote: Wed Apr 17, 2019 4:34 am copying the font file into /usr/share/fonts
Copy the fonts to ~/.local/share/fonts/ instead to avoid needing elevated permissions. That will only apply per-user though (for obvious reasons).

As an aside, I like to set the fonts in all applications to one the aliases (serif, sans-serif or monospace) and then use ~/.config/fontconfig/fonts.conf to set the font used for any given alias, like this:

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <alias>
    <family>monospace</family>
    <prefer><family>Inconsolata</family></prefer>
  </alias>
  <alias>
    <family>serif</family>
    <prefer><family>Times New Roman</family></prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer><family>Microsoft Sans Serif</family></prefer>
  </alias>
</fontconfig>
With this method the fonts across all applications can be set from the fonts.conf file.

Re: [solved] Installing fonts?

Posted: Wed Apr 17, 2019 5:48 am
by Fibogacci
It is good to know, that for many fonts (Should I say hundreds? ;) ) freely available from Google there is application called TypeCatcher.

You will find it in MX Package Installer in Stable Repo.

Just select the font, click Download and you have it on your system.

I really like it and it is easy to discover new fonts.

Image

Re: [solved] Installing fonts?

Posted: Fri Apr 19, 2019 11:55 pm
by Domarius
Bluesguy wrote: Wed Apr 17, 2019 8:35 am Just another quick way to install fonts ... I keep a stash of xtra fonts (especially MS and Apple TTFs) that I install on all my (and others) Linux-based machines. Quite simple to do ... in MX you already have an invisible folder in your Home directory named .fonts ... simply copy over your xtras into that folder and run this in your terminal:
sudo fc-cache -rv
... exit the terminal then logout/in ...your new fonts are now "registered" system-wide. Any time you add or subtract from this folder, simply re-use the command. This way you can carry over your stash from machine/user to machine/user without having them all sitting in the Root directory and then having to filter through what is default-system and your new additions in order to install them to another machine/user.
Ah, I will do that moving forward!
Fibogacci wrote: Wed Apr 17, 2019 5:48 am It is good to know, that for many fonts (Should I say hundreds? ;) ) freely available from Google there is application called TypeCatcher.
Ah that looks convenient. I will try it out, thanks!

Re: [solved] Installing fonts?

Posted: Sat Apr 20, 2019 10:29 am
by Head_on_a_Stick
Bluesguy wrote: Wed Apr 17, 2019 8:35 am @Head_on_a_Stick
There is already a folder in the your MX Home directory as I've indicated above
Not on my system:

Code: Select all

empty@mx:~ $ ls .fonts
ls: cannot access '.fonts': No such file or directory
2|empty@mx:~ $
This is a fresh install; it was copied over onto the metal from a QEMU image rather than installed directly but I don't think that should make a difference.

Re: [solved] Installing fonts?

Posted: Sat Apr 20, 2019 11:21 am
by Head_on_a_Stick
Well it may be present in the "live" system but it isn't in my installed system.

I've just unpacked the ISO image to check and there doesn't seem to be /etc/skel/.fonts there either.

And anyway ~/.fonts is obsolete now, ~/.local/share/fonts is the preferred location.

Also note that the fc-cache command should be run as the normal user rather than root (and doesn't need to be run anyway if ~/.local/share/fonts is used).
Bluesguy wrote: Sat Apr 20, 2019 11:01 amunless, of course, you're still using MX-14
No, MX 18.2 is the first version I've tried.

Re: [solved] Installing fonts?

Posted: Sat Apr 20, 2019 3:56 pm
by Stevo
This program looks interesting: https://github.com/FontManager/font-manager

Though we already have a slightly older version in the Stretch repo already. I'll check to see if it's compiled with Thunar and Nemo integration, though.

But you can just install font-manager, and it should open up when you click a font file, plus it has a "Install Font" button.

Re: [solved] Installing fonts?

Posted: Sat Apr 20, 2019 6:41 pm
by dreamer
Stevo wrote: Sat Apr 20, 2019 3:56 pm This program looks interesting: https://github.com/FontManager/font-manager

Though we already have a slightly older version in the Stretch repo already. I'll check to see if it's compiled with Thunar and Nemo integration, though.

But you can just install font-manager, and it should open up when you click a font file, plus it has a "Install Font" button.
Font Manager doesn't display properly on my system. The left part of the application is cut off. Also the design is very, very Gnome 3. I used the MATE font installer (maybe part of Caja File Manager) and also manually copied fonts to usr/share/fonts.