<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
**DO NOT EDIT THIS FILE!**
This file sets Tor Browser's bundled fonts as the only available system fonts
and standardizes rendering settings.
Any changes might deanonymize you, or expose you to fingerprinting vectors.
-->
<!--
Derived from fonts.conf.in of Fontconfig.

Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
Copyright © 2005 Patrick Lam
Copyright © 2009 Roozbeh Pournader
Copyright © 2008,2009 Red Hat, Inc.
Copyright © 2008 Danilo Šegan
Copyright © 2012 Google, Inc.


Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of the author(s) not be used in
advertising or publicity pertaining to distribution of the software without
specific, written prior permission.  The authors make no
representations about the suitability of this software for any purpose.  It
is provided "as is" without express or implied warranty.

THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
-->
<fontconfig>

<!-- Font directory list -->
	<dir>%%LOCALBASE%%/lib/tor-browser/fonts</dir>

<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>mono</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>monospace</string>
		</edit>
	</match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>sans serif</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>sans-serif</string>
		</edit>
	</match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>sans</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>sans-serif</string>
		</edit>
	</match>

<!--
  Set our default generic families.
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>sans-serif</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Arimo</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>serif</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Tinos</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>monospace</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Cousine</string>
		</edit>
	</match>

<!--
  tor-browser#41799, tor-browser-build#41237: Add some aliases for
  compatibility.
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>Arial</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Arimo</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>Times New Roman</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Tinos</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>Courier New</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Cousine</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>Helvetica</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Arimo</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>Times</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Tinos</string>
		</edit>
	</match>
	<match target="pattern">
		<test qual="any" name="family">
			<string>Courier</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>Cousine</string>
		</edit>
	</match>

<!-- Font cache directory list -->

	<cachedir prefix="xdg">fontconfig</cachedir>

	<config>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
		<rescan>
			<int>30</int>
		</rescan>
	</config>

	<!-- Standardize rendering settings. -->
	<match target="pattern">
		<edit name="antialias" mode="assign"><bool>true</bool></edit>
		<edit name="autohint" mode="assign"><bool>false</bool></edit>
		<edit name="hinting" mode="assign"><bool>true</bool></edit>
		<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
		<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
		<edit name="rgba" mode="assign"><const>none</const></edit>
	</match>
</fontconfig>
