Changeset 24975c4


Ignore:
Timestamp:
11/09/2023 11:22:59 PM (7 months ago)
Author:
Ken Moffat <ken@…>
Branches:
12.1, ken/TL2024, ken/tuningfonts, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18
Children:
9f55648
Parents:
6fa792b
git-author:
Ken Moffat <ken@…> (11/09/2023 11:11:25 PM)
git-committer:
Ken Moffat <ken@…> (11/09/2023 11:22:59 PM)
Message:

Fix and simplify 'Prefer Chosen CJK fonts' :

I had a setup like this on one of my machines, now that I'm
looking at the detail of fontconfig in a local branch I discovered
that there were certain problems with the example:

  1. I'm in an en locale, for pages that do not specify a locale

(or in vim/view, e.g. in mutt) the Japanese fonts were being
preferred.

  1. Fontconfig does not consider UMing suitable for zh-sc so it

was hardly ever used - and it does not really belong in local.conf.

3, Really prefer a Japanese font for Sans Serif and monospace, but
no point listing two of them.

  1. Comment where WenQuanYi Zen Hei is regarded as adequate and

therefore do not include it in these preferences, since it will
be picked up after them.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    r6fa792b r24975c4  
    4343      <itemizedlist>
    4444        <listitem>
     45          <para>[ken] - Simplify the 'Prefer chosen CJK fonts' example
     46          in 'tuning fontconfig' and ensure that DejaVu fonts are
     47          preferred for non-CJK.</para>
     48        </listitem>
     49        <listitem>
    4550          <para>[bdubbs] - Update to autofs-5.1.9. Fixes
    4651          <ulink url="&blfs-ticket-root;18832">#18832</ulink>.</para>
  • x/installing/TTF-and-OTF-fonts.xml

    r6fa792b r24975c4  
    743743    <para>
    744744      In Korean, Batang or Myeongjo (the older name) are Serif, Dotum or
    745       Gothic and are the main Sans fonts. BLFS previously recommended the
     745      Gothic are the main Sans fonts. BLFS previously recommended the
    746746      Baekmuk fonts, but the Nanum and Un fonts are now preferred to Baekmuk by
    747747      <application>fontconfig</application> because of user requests.
  • x/installing/tuning-fontconfig.xml

    r6fa792b r24975c4  
    523523      <para>
    524524        The following example of a local configuration (i.e. one that applies
    525         for all users of the machine) does several things:
     525        for all users of the machine) does several things. It is particularly
     526        appropriate where no language is specified, or for reading CJK text
     527        in a non-CJK locale, and where the Japanese forms of the codepoints
     528        shared with Chinese are preferred. In particular, alternative
     529        approaches would be to specify a Chinese font ahead of the Japanese
     530        font, meaning that only Kana symbols will be used from the Japanese
     531        font, or to not specify DejaVu so that the first font in each set
     532        of preferences is preferred for text using latin alphabets.
    526533      </para>
    527534
     
    529536        <listitem>
    530537          <para>
    531             If a Serif font is specified, it will prefer the <xref
    532             linkend="UMing"/> variants, so that in the zh-cn, zh-hk and zh-tw
    533             languages things should look good (also zh-sg which actually uses
    534             the same settings as zh-cn) <emphasis>without</emphasis> affecting
    535             Japanese.
     538            If a Serif font is specified, it prefers <xref linkend="dejavu-fonts"/>.
     539            If Han codepoints are found, or the Japanese language is specified,
     540            the Mincho font from <xref linkend="IPAex"/> will be used. If Hangul
     541            codepoints are found or the Korean language is specified, UnBatang
     542            (see <xref linkend="Korean-fonts"/>) will be used: Change that line
     543            If you installed a different Korean serif font. After that,
     544            <xref linkend="wenquanyi-zenhei"/>  (Sans, but a default for Serif
     545            and monospace) is used. A previous version of this page mentioned
     546            using UMing which is a traditional-style chinese font that ships
     547            with an old conf file preferring it for zh-tw and zh-hk language
     548            codes (and for sans-serif and monospace). But without the conf file,
     549            fontconfig will only treat it as suitable for zh-hk.
     550            The conf file needs to be edited to current style and will then be
     551            prepended, so specifying UMing does not belong in this
     552            <filename>local.conf</filename> file.
    536553          </para>
    537554        </listitem>
    538555        <listitem>
    539556          <para>
    540             It prefers the Japanese <xref linkend="IPAex"/> if they have been
    541             installed (although <xref linkend="VLGothic"/> will take precedence
    542             for (Japanese) Sans if it has also been installed.
    543           </para>
    544         </listitem>
    545         <listitem>
    546           <para>
    547             Because <xref linkend="wenquanyi-zenhei"/> covers Korean Hangul
    548             glyphs and is also preferred for Serif in
    549             <filename>65-nonlatin.conf</filename>, if installed it will be used
    550             by default for Korean Serif. To get a proper Serif font, the
    551             UnBatang font is specified here - change that line if you installed
    552             a different Serif font from the choice of <xref
    553             linkend="Korean-fonts"/>.
     557            For Sans Serif preferences again start with <xref linkend="dejavu-fonts"/>,
     558            then <xref linkend="VLGothic"/> for Japanese before falling back to
     559            WenQuanYi Zen Hei which is Sans and covers both Chinese and Korean
     560            Hangul.
    554561          </para>
    555562        </listitem>
     
    557564          <para>
    558565            The Monospace fonts are forced to the preferred Sans fonts. If the
    559             text is in Korean then <xref linkend="wenquanyi-zenhei"/> will be
    560             used.
     566            text is in Chinese or Korean then <xref
     567            linkend="wenquanyi-zenhei"/> will be used.
    561568          </para>
    562569        </listitem>
     
    565572      <para>
    566573        In a non-CJK locale, the result is that suitable fonts will be used for
    567         all variants of Chinese, Japanese and Hangul Korean. All other languages
     574        all variants of Chinese, Japanese and Hangul Korean (but Japanese variants
     575        of the glyphs shared with Chinese Han will be used). All other languages
    568576        should already work if a font is present. As the <systemitem
    569577        class="username">root</systemitem> user:
     
    577585        &lt;family&gt;serif&lt;/family&gt;
    578586        &lt;prefer&gt;
    579             &lt;family&gt;AR PL UMing&lt;/family&gt;
     587            &lt;family&gt;DejaVu Serif&lt;/family&gt;
    580588            &lt;family&gt;IPAexMincho&lt;/family&gt;
    581589            &lt;!-- WenQuanYi is preferred as Serif in 65-nonlatin.conf,
     
    587595         &lt;family&gt;sans-serif&lt;/family&gt;
    588596         &lt;prefer&gt;
    589              &lt;family&gt;WenQuanYi Zen Hei&lt;/family&gt;
     597             &lt;family&gt;DejaVu Sans&lt;/family&gt;
    590598             &lt;family&gt;VL Gothic&lt;/family&gt;
    591              &lt;family&gt;IPAexGothic&lt;/family&gt;
     599         &lt;!-- This assumes WenQuanYi is good enough for Korean Sans --&gt;
    592600         &lt;/prefer&gt;
    593601    &lt;/alias&gt;
     
    595603         &lt;family&gt;monospace&lt;/family&gt;
    596604         &lt;prefer&gt;
     605             &lt;family&gt;DejaVu Sans Mono&lt;/family&gt;
    597606             &lt;family&gt;VL Gothic&lt;/family&gt;
    598              &lt;family&gt;IPAexGothic&lt;/family&gt;
    599              &lt;family&gt;WenQuanYi Zen Hei&lt;/family&gt;
     607         &lt;!-- This assumes WenQuanYi is good enough for Korean Monospace --&gt;
    600608         &lt;/prefer&gt;
    601609    &lt;/alias&gt;
Note: See TracChangeset for help on using the changeset viewer.