New to FreeBSD: Help Understanding Fonts & Font Configs

Trying to understand fonts and font settings in FreeBSD a little better. Below are some things I've learned after reading the Handbook and some man pages - please let me know if I've got these right or not?

1. Where fonts are stored:

/usr/local/share/fonts/
holds system wide fonts (installed from FreeBSD packages)

~/.fonts/
for single user custom fonts (from personal downloads)

both of these paths are automatically made available for anti-aliasing to Xft-aware applications.

2. Font Config:

/usr/local/etc/fonts/local.conf (System Wide Config)
for system wide settings, do not use the provided /usr/local/etc/fonts/fonts.conf. use /usr/local/etc/fonts/local.conf instead because /usr/local/etc/fonts/fonts.conf file will be replaced within next fontconfig package update.

~/.config/fontconfig/fonts.conf (Single User Config)

3. Question:

Inside my /usr/local/etc/fonts there's fonts.conf and fonts.conf.sample, but fonts.conf's content is exactly the same as fonts.conf.sample. all the match targets are filled with generic "pattern", "any", "family". is this supposed to be this way by default?

In addition, the handbook says 'for system wide settings, do not use the provided /usr/local/etc/fonts/fonts.conf but use /usr/local/fonts/local.conf instead because /usr/local/etc/fonts/fonts.conf file will be replaced within next fontconfig package update. so what's the purpose of that file? if we're just supposed to create the local.conf ourselves in the first place?

Inside /usr/local/etc/fonts/fonts.conf and fonts.conf.sample, it contains this segment:
Code:
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
the handbook mentioned ~/.fonts as an area where user can put fonts, but here in the file it's saying it's about to be deprecated? so where exactly is the right place to store single user custom fonts now?

Lastly, while creating/editing ~/.config/fontconfig/fonts.conf I was looking at the example given in the handbook:
Code:
<?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      <fontconfig>
in order to get another reference I looked at my /usr/local/etc/fonts/fonts.conf and it showed:
Code:
<?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
      <fontconfig>
should the DOCTYPE line have the string fonts.dtd or urn:fontconfig:fonts.dtd? Or does it not really matter?
 
Inside my /usr/local/etc/fonts there's fonts.conf and fonts.conf.sample, but fonts.conf's content is exactly the same as fonts.conf.sample.
This is due to the way packages and ports treat configuration files. When you install something that creates a configuration file, it checks if it exists or not. If the configuration file doesn't exist a new configuration file is created, which is a copy of the *.sample configuration file. If a configuration file does already exist only the *.sample file is installed. This is done so updates won't overwrite your customized configuration files.
 
Thank you SirDice.

For fonts.conf I just used local.conf with <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> and everything is working without a problem.
 
Back
Top