mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-04 07:17:15 +08:00
tuningfonts -
Make all internal sections of tuning-fontconfig Sect2 so that the titles are all in the same font size.
This commit is contained in:
parent
3a579120b5
commit
9c1319c602
@ -701,41 +701,45 @@ EOF</userinput></screen>
|
||||
there a number of different ways of achieving this.
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" id="fontconfig-user-docs"
|
||||
xreflabel="Fontconfig user documentation">Fontconfig user documentation</bridgehead>
|
||||
</sect2>
|
||||
|
||||
<para>
|
||||
<application>Fontconfig</application> installs user documentation that
|
||||
includes an example 'User configuration file' which among other things
|
||||
prefers <xref linkend="wenquanyi-zenhei"/> (a Sans font) if a
|
||||
<emphasis>Serif</emphasis> font is requested for Chinese (this part
|
||||
might be anachronistic unless you have non-free Chinese fonts, because
|
||||
in <filename>65-nonlatin.conf</filename> this font is already among the
|
||||
preferred fonts when Serif is specified for Chinese) and to prefer the
|
||||
modern <xref linkend="VLGothic"/> font if a Sans font is specified on a
|
||||
Japanese page (otherwise a couple of other fonts would be preferred if
|
||||
they have been installed).
|
||||
</para>
|
||||
<sect2 role="configuration" id="fontconfig-user-docs" xreflabel="Fontconfig user documentation">
|
||||
<title>Fontconfig user documentation</title>
|
||||
|
||||
<para>
|
||||
If you have installed the current version, the user documentation is
|
||||
available in HTML, PDF, and text versions at <filename
|
||||
class="directory">/usr/share/doc/fontconfig-&fontconfig-version;/</filename>
|
||||
: change the version if you installed a different one.
|
||||
</para>
|
||||
<para>
|
||||
<application>Fontconfig</application> installs user documentation that
|
||||
includes an example 'User configuration file' which among other things
|
||||
prefers <xref linkend="wenquanyi-zenhei"/> (a Sans font) if a
|
||||
<emphasis>Serif</emphasis> font is requested for Chinese (this part
|
||||
might be anachronistic unless you have non-free Chinese fonts, because
|
||||
in <filename>65-nonlatin.conf</filename> this font is already among the
|
||||
preferred fonts when Serif is specified for Chinese) and to prefer the
|
||||
modern <xref linkend="VLGothic"/> font if a Sans font is specified on a
|
||||
Japanese page (otherwise a couple of other fonts would be preferred if
|
||||
they have been installed).
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" id="prefer-a-specific-font"
|
||||
xreflabel="Prefer a specific font">Prefer a specific font</bridgehead>
|
||||
<para>
|
||||
If you have installed the current version, the user documentation is
|
||||
available in HTML, PDF, and text versions at <filename
|
||||
class="directory">/usr/share/doc/fontconfig-&fontconfig-version;/</filename>
|
||||
: change the version if you installed a different one.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As an example, if for some reason you wished to use the <ulink
|
||||
url="https://www.fontsquirrel.com/fonts/nimbus-roman-no9-l">Nimbus Roman
|
||||
No9 L</ulink> font wherever Times New Roman is referenced (it is
|
||||
metrically similar, and preferred for Times Roman, but the Serif font
|
||||
from <xref linkend="liberation-fonts"/> will be preferred for the Times
|
||||
<emphasis>New</emphasis> Roman font if installed), as an individual user
|
||||
you could install the font and then create the following file:
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="configuration" id="prefer-a-specific-font" xreflabel="Prefer a specific font">
|
||||
<title>Prefer a specific font</title>
|
||||
|
||||
<para>
|
||||
As an example, if for some reason you wished to use the <ulink
|
||||
url="https://www.fontsquirrel.com/fonts/nimbus-roman-no9-l">Nimbus Roman
|
||||
No9 L</ulink> font wherever Times New Roman is referenced (it is
|
||||
metrically similar, and preferred for Times Roman, but the Serif font
|
||||
from <xref linkend="liberation-fonts"/> will be preferred for the Times
|
||||
<emphasis>New</emphasis> Roman font if installed), as an individual user
|
||||
you could install the font and then create the following file:
|
||||
</para>
|
||||
|
||||
<screen><userinput>mkdir -pv ~/.config/fontconfig/conf.d &&
|
||||
cat > ~/.config/fontconfig/conf.d/35-prefer-nimbus-for-timesnew.conf << "EOF"
|
||||
@ -754,73 +758,75 @@ cat > ~/.config/fontconfig/conf.d/35-prefer-nimbus-for-timesnew.conf << "
|
||||
</fontconfig></literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>
|
||||
This is something you would normally do in an individual user's
|
||||
settings, but the file in this case has been prefixed '35-' so that it
|
||||
could, if desired, be used system-wide in <filename
|
||||
class="directory">/etc/fonts/conf.d/</filename>.
|
||||
</para>
|
||||
<para>
|
||||
This is something you would normally do in an individual user's
|
||||
settings, but the file in this case has been prefixed '35-' so that it
|
||||
could, if desired, be used system-wide in <filename
|
||||
class="directory">/etc/fonts/conf.d/</filename>.
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" id="prefer-chosen-CJK-fonts"
|
||||
xreflabel="Prefer chosen CJK fonts">Prefer chosen CJK fonts</bridgehead>
|
||||
</sect2>
|
||||
|
||||
<para>
|
||||
The following example of a local configuration (i.e. one that applies
|
||||
for all users of the machine) does several things. It is particularly
|
||||
appropriate where no language is specified, or for reading CJK text
|
||||
in a non-CJK locale, and where the Japanese forms of the codepoints
|
||||
shared with Chinese are preferred. In particular, alternative
|
||||
approaches would be to specify a Chinese font ahead of the Japanese
|
||||
font, meaning that only Kana symbols will be used from the Japanese
|
||||
font, or to not specify DejaVu so that the first font in each set
|
||||
of preferences is preferred for text using Latin alphabets.
|
||||
</para>
|
||||
<sect2 role="configuration" id="prefer-chosen-CJK-fonts" xreflabel="Preferring chosen CJK fonts">
|
||||
<title>Prefer chosen CJK fonts</title>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
If a Serif font is specified, it prefers <xref linkend="dejavu-fonts"/>.
|
||||
If Han codepoints are found, or the Japanese language is specified,
|
||||
the Mincho font from <xref linkend="IPAex"/> will be used. If Hangul
|
||||
codepoints are found or the Korean language is specified, UnBatang
|
||||
(see <xref linkend="Korean-fonts"/>) will be used: Change that line
|
||||
If you installed a different Korean serif font. After that,
|
||||
<xref linkend="wenquanyi-zenhei"/> (Sans, but a default for Serif
|
||||
and monospace) is used. A previous version of this page mentioned
|
||||
using UMing which is a Traditional Chinese font that ships
|
||||
with an old conf file preferring it for zh-tw and zh-hk language
|
||||
codes (and for sans-serif and monospace). But without the conf file,
|
||||
<application>Fontconfig</application> will only treat it as suitable
|
||||
for zh-hk.
|
||||
The conf file needs to be edited to current style and will then be
|
||||
prepended, so specifying UMing does not belong in this
|
||||
<filename>local.conf</filename> file.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
For Sans Serif preferences again start with <xref linkend="dejavu-fonts"/>,
|
||||
then <xref linkend="VLGothic"/> for Japanese before falling back to
|
||||
WenQuanYi Zen Hei which is Sans and covers both Chinese and Korean
|
||||
Hangul.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The Monospace fonts are forced to the preferred Sans fonts. If the
|
||||
text is in Chinese or Korean then <xref
|
||||
linkend="wenquanyi-zenhei"/> will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<para>
|
||||
The following example of a local configuration (i.e. one that applies
|
||||
for all users of the machine) does several things. It is particularly
|
||||
appropriate where no language is specified, or for reading CJK text
|
||||
in a non-CJK locale, and where the Japanese forms of the codepoints
|
||||
shared with Chinese are preferred. In particular, alternative
|
||||
approaches would be to specify a Chinese font ahead of the Japanese
|
||||
font, meaning that only Kana symbols will be used from the Japanese
|
||||
font, or to not specify DejaVu so that the first font in each set
|
||||
of preferences is preferred for text using Latin alphabets.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In a non-CJK locale, the result is that suitable fonts will be used for
|
||||
all variants of Chinese, Japanese and Hangul Korean (but Japanese variants
|
||||
of the glyphs shared with Chinese Han will be used). All other languages
|
||||
should already work if a font is present. As the <systemitem
|
||||
class="username">root</systemitem> user:
|
||||
</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
If a Serif font is specified, it prefers <xref linkend="dejavu-fonts"/>.
|
||||
If Han codepoints are found, or the Japanese language is specified,
|
||||
the Mincho font from <xref linkend="IPAex"/> will be used. If Hangul
|
||||
codepoints are found or the Korean language is specified, UnBatang
|
||||
(see <xref linkend="Korean-fonts"/>) will be used: Change that line
|
||||
If you installed a different Korean serif font. After that,
|
||||
<xref linkend="wenquanyi-zenhei"/> (Sans, but a default for Serif
|
||||
and monospace) is used. A previous version of this page mentioned
|
||||
using UMing which is a Traditional Chinese font that ships
|
||||
with an old conf file preferring it for zh-tw and zh-hk language
|
||||
codes (and for sans-serif and monospace). But without the conf file,
|
||||
<application>Fontconfig</application> will only treat it as suitable
|
||||
for zh-hk.
|
||||
The conf file needs to be edited to current style and will then be
|
||||
prepended, so specifying UMing does not belong in this
|
||||
<filename>local.conf</filename> file.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
For Sans Serif preferences again start with <xref linkend="dejavu-fonts"/>,
|
||||
then <xref linkend="VLGothic"/> for Japanese before falling back to
|
||||
WenQuanYi Zen Hei which is Sans and covers both Chinese and Korean
|
||||
Hangul.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The Monospace fonts are forced to the preferred Sans fonts. If the
|
||||
text is in Chinese or Korean then <xref
|
||||
linkend="wenquanyi-zenhei"/> will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>
|
||||
In a non-CJK locale, the result is that suitable fonts will be used for
|
||||
all variants of Chinese, Japanese and Hangul Korean (but Japanese variants
|
||||
of the glyphs shared with Chinese Han will be used). All other languages
|
||||
should already work if a font is present. As the <systemitem
|
||||
class="username">root</systemitem> user:
|
||||
</para>
|
||||
|
||||
<screen role="root"><userinput>cat > /etc/fonts/local.conf << "EOF"
|
||||
<literal><?xml version='1.0'?>
|
||||
@ -857,7 +863,6 @@ EOF</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 role="configuration" id="editing-old-style-conf-files"
|
||||
xreflabel="Editing Old-Style conf files">
|
||||
<title>Editing Old-Style conf files</title>
|
||||
@ -950,8 +955,10 @@ EOF</userinput></screen>
|
||||
</match></literallayout>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" id="font-weights"
|
||||
xreflabel="About font weights">About font weights</bridgehead>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="configuration" id="font-weights" xreflabel="About font weights">
|
||||
<title>About font weights</title>
|
||||
|
||||
<para>
|
||||
When this page and the next page were first created, Latin fonts came
|
||||
@ -1020,8 +1027,10 @@ EOF</userinput></screen>
|
||||
adequate : ken -->
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" id="items-which-can-override-fontconfig"
|
||||
xreflabel="Items which can override fontconfig">Items which can override Fontconfig</bridgehead>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="configuration" id="items-which-can-override-fontconfig" xreflabel="Items which can override Fontconfig">
|
||||
<title>Items which can override Fontconfig</title>
|
||||
|
||||
<para>
|
||||
Several desktop environments, as well as some programs, will use
|
||||
|
Loading…
Reference in New Issue
Block a user