Git Product home page Git Product logo

Comments (12)

ardhill avatar ardhill commented on August 31, 2024 3

I had a bit more of an investigation and checked out some other distributions.

The best way to check the font directories on your system is to have a look at the fonts configuration file:

/etc/fonts/fonts.conf

There is a bit of stuff in there, so you can find the information about the directories by grepping for it. The following command in terminal will find the lines you need.

cat /etc/fonts/fonts.conf | grep -iA 10 "font directory"

You will then see something like this:

<!-- Font directory list -->

	<dir>/usr/share/fonts</dir>
	<dir>/usr/local/share/fonts</dir>
	<dir prefix="xdg">fonts</dir>
	<!-- the following element will be removed in the future -->
	<dir>~/.fonts</dir>

I had a look at a number of systems to cover the main Linux 'Families'.

  • Ubuntu & Other Ubuntu family distributions
  • Fedora - Red Hat family
  • Open SuSE (Leap edition) – SuSE family
  • Manjaro – Arch family

The code above from the fonts.conf file is similar in them all. A few of the distributions had some extra directories for specific case use. For example, you can see that yourself in Open SuSE, in the fonts.conf file that there are a couple of other directories used by X11 and kde for fonts.

It seems like the linux system likes to use /usr/share/fonts

But users should install their own fonts in:

System wide fonts in: /usr/local/share/fonts
User only fonts in ~/.local/share/fonts

Either of these directories may or may not exist, depending on what has been installed. You simply make the new directory of you need it.

If you create a directory in /usr/local/share/fonts you will need your Super User powers:

sudo mkdir /usr/local/share/fonts

Some people just drop all their fonts into a font directory, and some have it a bit more in order, which is in my opinion, more in keeping with the linux way. So, if you were to install open dyslexic in the system wide directory, it would be nested inside another directory for that ‘font type’ e.g. “opentype”:

sudo cp -r ~/Downloads/open_dyslexic/ /usr/share/fonts/opentype/

True Type Fonts would be in a directory called “truetype” etc.

You can then re-create the font cache with the command I mentioned earlier. It will also work on just the one changed directory e.g.

fc-cache -fv /usr/share/fonts/

Paul

from opendyslexic.

ardhill avatar ardhill commented on August 31, 2024 1

On your zoho pages?

Probably better to put into something like that than ask people to navigate their way through our discussions on this page. If you wanted, I am happy to write something a bit more clear and defined, that you can review/edit to include in your online docs. Or maybe better in your style of writing. I'm happy to help a little if it suits you.

Paul

from opendyslexic.

ardhill avatar ardhill commented on August 31, 2024 1

Sorry, I am aware that I have sort of blended antijingoista and justinclift comments together, answering as if the one person. Replying on a phone is sometimes messy for me. @antijingoist if it suits you, I can give you a one-line for your ReadMe and a more detailed explanation for any online documentation if that suits you.

from opendyslexic.

antijingoist avatar antijingoist commented on August 31, 2024 1

Cool, I'll put that up now!

from opendyslexic.

justinclift avatar justinclift commented on August 31, 2024

Any idea which Linux environments use /usr/local/share/fonts and ~/.local/share/fonts?

Asking because it'll probably be useful to add that info as well. For example, I'm using OpenSUSE Leap (KDE based), and neither of those directories is present on my system.

from opendyslexic.

ardhill avatar ardhill commented on August 31, 2024

Any idea which Linux environments use /usr/local/share/fonts and ~/.local/share/fonts?

Asking because it'll probably be useful to add that info as well. For example, I'm using OpenSUSE Leap (KDE based), and neither of those directories is present on my system.

I use several Linux distros, but they are all either Ubunu or Ubuntu based.
If you have /usr/local/share/ or ~/.local/share/ on Open SuSE, you could try creating the fonts directory, drop a font in and see if that works.

On my systems, after adding a font, run this to get the system to re-create the font cache:
fc-cache -f -v
or just reboot

Paul

from opendyslexic.

ardhill avatar ardhill commented on August 31, 2024

I did a 'quick' check. and it does look like these are the default directories in Linux in general. So I assume if you create them, you should be OK. Try in your home first so you automatically have the correct permissions. I have to go to work now, so can't look it up, but you probably only need read and write permissions on the directory and read on the files as a minimum, but as I said, that't a guess without checking - no time ATM.

A quick note - some systems will have .fonts in their home directories, but I believe this directory is being deprecated.

from opendyslexic.

justinclift avatar justinclift commented on August 31, 2024

Thanks, sounds useful. 😄

from opendyslexic.

justinclift avatar justinclift commented on August 31, 2024

Thanks, that's really good info. Checking my local desktop, yep, it has the /usr/share/fonts directory (mentioned in the /etc/fonts/fonts.conf file as you pointed out).

And yep, the /usr/local/share/fonts directory doesn't exist on this system, but is listed in the config file as well. 😄

from opendyslexic.

antijingoist avatar antijingoist commented on August 31, 2024

Maybe I should link to this thread instead of including a one-line instruction? :D :D

from opendyslexic.

justinclift avatar justinclift commented on August 31, 2024

Maybe cut-n-paste-n-tweak that info into a wiki page, then link to that?

from opendyslexic.

justinclift avatar justinclift commented on August 31, 2024

I have sort of blended antijingoista and justinclift comments together

No worries. Whatever works. 😉

from opendyslexic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.