Advanced Font Information And Settings In Ubuntu

by vitalbodies on July 23rd, 2008

Advanced Font Information And Settings In Ubuntu Hardy Heron

Advanced Font Information: At some point you might want to consider where you what your fonts and if you need them to be System Wide or Per User Account.

Secret Locations Of Fonts:

The secret locations of your fonts whereabouts are defined in /etc/fonts/fonts.conf.

gedit /etc/fonts/fonts.conf

Standard Locations:

/home/<username>/.fonts (where <username> is your user name).

Note that the .font folder is a hidden folder.

Places > Home Folder > View > Show Hidden Files.

System Wide: If you add them system-wide, then new users can use them. Below is the default location for system wide fonts.


Per User Account: You can create a .fonts directory in your /home folder if there in not one there already. Put all of the fonts you want in the user account in the .fonts folder. This would allow the fonts to used by one user and allow for backing them up if you only back up the home folder. the fonts will only be accessible by your user account, thus, new users will have to add fonts to their own accounts. Below is the default location for Per User Account

/home/<username>/.fonts (where <username> is your user name).

Note that the .font folder is a hidden folder.

Places > Home Folder > View > Show Hidden Files.

Reconfiguring Your Font Settings In Ubuntu Hardy Heron:

The command below does a clean up of your font configuration and should be used at your own risk.

	sudo dpkg-reconfigure fontconfig

Learn more: dpkg Help On Ubuntu Hardy Heron.


sudo dpkg-reconfigure defoma
man defoma

defoma – Debian Font Manager, a framework for automatic font configura‐

defoma-font [options] command args..
defoma-app [options] command args..
defoma-subst [options] command args..

Defoma stands for Debian Font Manager.  It  provides  a  framework  for
automatic  font  configuration.  This manpage introduces general Defoma
concepts, please refer  the  manpage  of  defoma-font,  defoma-app,  or
defoma-subst for the detailed information of each command.

Fonts  are used by numerous applications, but generally need to be con‐
figured separately for each application. Defoma solves this problem  by
calling  configuration  scripts  to  update  the  font configuration of
applications whenever a font is installed or removed.

A Defoma-configuration script is a perl library that  each  application
should       install       as       application-name.defoma       under
/usr/share/defoma/scripts and which configures a font for that applica‐
tion. The following is an example of a script named foo.defoma.

@ACCEPT_CATEGORIES = qw(type1 truetype);

package foo;

sub type1 {
my $com = shift;


sub truetype {
my $com = shift;



This  example  represents  an  application  foo that wants to configure
truetype and type1 category fonts. A function by the same name  as  the
relevant category is called by Defoma with a command as the first argu‐
ment, and then additional arguments depending on the command.  The fol‐
lowing is a list of commands.

* register
* unregister
* do-install-real do-install-alias do-install-subst
* do-remove-real do-remove-alias do-remove-subst
* init
* term
* purge

do-install-*  and  do-remove-*  commands are only called from Id cache.
init and term are called at the start and end (respectively) of the en‐
tire process.

Id cache is another feature of Defoma. A common problem during automat‐
ic configuration is name space conflicts. Usually  applications  access
fonts through logical font names (like XLFDs and PostScript font names)
rather than the fonts themselves  (as  font  filenames).  Logical  font
names,  called  identifiers  in  Defoma, can easily conflict especially
when font aliases are permitted. Through the Id cache  mechanism,  only
one  font  is actually installed for each identifier even if it is pro‐
vided by several fonts.

Id Substitution is an additional feature of Id  cache.   It  selects  a
font  to provide an id specified by a rulefile.  The rulefile describes
rules giving required ids and their hints.  A rule is used to have more
similar-looking  fonts  with  the  same characters substitute for a re‐
quired id. This feature can also be used for the  purpose  of  grouping
fonts into different categories.

category represents  a type of font. Generally fonts that belong to
the same category are configured the same way.

Hints represent essential font  information  and  typeface  information
about  the font.  They consist of some HintTypes and their values. They
can be specified from the  command  line  options  of  defoma-font,  or
through a hintfile.

Hintfile describes one or more fonts and their hints in a single file.
It is supposed to be put under /etc/defoma/hints as a conffile, so that
users can modify the hints.
Below  is an example hintfile.  defoma-hints is a tool to help generat‐
ing hints as well as the hintfile, so you do not  have  to  create  one
from scratch.

category type1
begin /usr/share/fonts/type1/foo.pfa
FontName = Helvetica
Charset = ISO8859-1
Family = Helvetica
Weight = Medium
Shape = Upright NoSerif
GeneralFamily = SansSerif
X-FontName = -urw-helvetica-medium-r-noraml–0-0-0-0-p-iso8859-1
begin /usr/share/fonts/type1/foob.pfa
FontName = Helvetica-Bold
Charset = ISO8859-1
Family = Helvetica
Weight = Bold
Shape = Upright NoSerif
GeneralFamily = SansSerif
X-FontName = -urw-helvetica-bold-r-noraml–0-0-0-0-p-iso8859-1

defoma-font(1).    defoma-app(1).   defoma-subst(1).   defoma-hints(1).
defoma-psfont-installer(1).  defoma-reconfigure(1).  Defoma::Font(3pm).
Defoma::Id(3pm).        Defoma::Subst(3pm).        Defoma::Common(3pm).

March  4, 2001                       defoma(1)

More Font Information:

For more detailed Font Information:

Xfree86 Font Information:


VitalBodies Guides – The How Tos Of Fonts In Ubuntu

From Ubuntu

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS