antijingoist / opendyslexic

OpenDyslexic, a typeface that uses typeface shapes & features to help offset some visual symptoms of Dyslexia. Now in SIL-OFL.
https://opendyslexic.org
Other
610 stars 38 forks source link

Suggestion To Add To Your ReadMe file bundled with the otf download package #47

Closed ardhill closed 3 years ago

ardhill commented 4 years ago

Hi, In the ReadMe you have bundled with the download zip file, you have instruction on how to install on Windows and Mac. Here are the instruction on how to install on a Linux machine:

"Linux: Copy .OTF files to ~/.local/share/fonts "

I thought that you could add this to your ReadMe.

Like Windows, there are also font installers on the OS (on many Linux distributions), but as you just have the copy-paste instructions for Windows, I thought you would only want that for Linux too.

Added extra information:

Have the fonts available system-wide, not just that user:

Copy the .OTF files to /usr/local/share/fonts

justinclift commented 4 years ago

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.

ardhill commented 4 years ago

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

ardhill commented 4 years ago

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.

justinclift commented 4 years ago

Thanks, sounds useful. :smile:

ardhill commented 4 years ago

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'.

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

justinclift commented 4 years ago

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. :smile:

antijingoist commented 4 years ago

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

justinclift commented 4 years ago

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

ardhill commented 4 years ago

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

ardhill commented 4 years ago

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.

justinclift commented 4 years ago

I have sort of blended antijingoista and justinclift comments together

No worries. Whatever works. :wink:

antijingoist commented 3 years ago

Cool, I'll put that up now!