What's the proper way to install truetype fonts

bxbzq

Member

Reaction score: 6
Messages: 48

Hi there,
It is not very clear to me in the handbook as how to install TrueType fonts. Section 5.5.2:

Code:
...
Now make a directory for the TrueType® fonts (for example, /usr/local/share/fonts/TrueType ) and copy all
of the TrueType® fonts into this directory. Keep in mind that TrueType® fonts cannot be directly taken from an
Apple® Mac®; they must be in UNIX®/MS-DOS®/Windows® format for use by Xorg....

Does it mean I should just copy those TrueType fonts from C:\Windows\Fonts\ to /usr/local/share/fonts/TrueType, run #mkfontscale and continue other subsequent steps?
In the mean time there is /usr/ports/x11-fonts/xorg-fonts-truetype. What do I do with these fonts?
 

jmos

Well-Known Member

Reaction score: 192
Messages: 260

If it's just about you who wants a truetype font available here's how I am doing this: Just create a directory ~/.fonts, and copy the desired ttf file there. No more steps are needed, and if it's just for you: There's no need to touch more than your user account. (And if I would need a font for many user accounts I would set up a simple port for this according to other font packages.)
 
OP
B

bxbzq

Member

Reaction score: 6
Messages: 48

Thanks for relying. But, is what described in the handbook as I quoted considered a setup for multiple users?
My original question is about the handbook not being clear on where the TrueType fonts come from. A related question, do those fonts from Windows not have MS copyright?
 

jmos

Well-Known Member

Reaction score: 192
Messages: 260

First: The handbook describes in that section how to add fonts manually. That means: You already have ttf files, so there's no question where these files come from; But many fonts are available as port/package. If you're going with the fonts available as package just execute f.e. pkg install plex-ttf, and you're done with installing the Plex fonts for all users - studying the handbook isn't needed to get some fonts installed; You'll only have to add fonts manually if you really need a special font not available as port/package.

Everything outside your users HOME ("~" directory) of course belongs to all users of that computer. So yes, the handbook describes it for multiple users.

And yes, you can just copy fonts from MS Windows into your FreeBSD installation - why should that not be possible? But of course you need the permission therefore: Never ever use a font you do not own the rights for! As long you're using ports/packages you don't have to worry about this legal stuff. And in case of some basic MS fonts there's even a port: x11-fonts/webfonts (Microsoft kindly allows the use of the included fonts on other computers).

If you're adding fonts manually be careful about where you copy them, so that no port/package will copy the same filename in the same location (that's one reason the handbook recommends to add a new, own directory). If you're mixing own stuff with system wide things you should already know what you're doing, otherwise: stay in your users home. And if somehow possible I recommend to stay in your users home - and not mixing things.
 

kpedersen

Son of Beastie

Reaction score: 2,095
Messages: 2,953

When I add ttf and bdf fonts to ~/.fonts, I tend to need to run fc-cache -rv to update the cache before it appears in applications like Gimp. I don't often add custom fonts so I might be missing something.
 

jb_fvwm2

Daemon

Reaction score: 205
Messages: 1,830

Well, copying .ttf files to .fonts has at first made unreadable [ a thread I made in 2012-14... ] then upon renaming the directory to .fonts-renamed and all text on the page disappeared. [ text.npr.org ]. Maybe fixed on a reboot or reload of X I hope... [ one of the fonts I copied there overrode the default ... ] ... [ upon
loading in firefox not this browser, the problem is fixed already... ]
 

seanhodg

New Member


Messages: 1

Can I add a font I like to the Word I want to download? I just don't know much about it... I just found the perfect font to work with and would like to install it in Word. I found the cinzel font download website that I've been looking for for a very long time. The site says that I can easily install it everywhere, but I don't understand it a little.
By the way, I downloaded this font absolutely for free, so anyone can do so. I would be very happy if you could help me install the font.
 
Last edited:

grahamperrin

Daemon

Reaction score: 687
Messages: 2,195

Microsoft Comic Sans

Joking aside, fonts such as x11-fonts/comic-neue can be surprisingly pleasant in the right contexts:

1632633609606.png
 

tuxador

Active Member

Reaction score: 52
Messages: 124

It's recommanded to put the downloaded fonts on ~/.local/share/fonts instead of ~/.fonts .
I learned that from the arch wiki
 

tuxador

Active Member

Reaction score: 52
Messages: 124

grahamperrin

Daemon

Reaction score: 687
Messages: 2,195

No mention of ~/.local/share/fonts/ in the FreeBSD Handbook.

~/.fonts/ appears under 5.5.3.
 

kpedersen

Son of Beastie

Reaction score: 2,095
Messages: 2,953

No mention of ~/.local/share/fonts/ in the FreeBSD Handbook.

~/.fonts/ appears under 5.5.3.
I believe that ~/fonts is deprecated in favour of ~/.local/share/fonts.

It was from these forums that I learned this but I can't seem to find the thread. Personally I still use ~/.fonts because the other path was dictated by freedesktop "standards" (XDG) which I tend to avoid because they break too often.
 
Top