Skip to content
Snippets Groups Projects
Forked from drm / kernel
Loading
  • Akira Yokosawa's avatar
    66939df5
    docs: pdfdocs: Switch default CJK font to KR variants · 66939df5
    Akira Yokosawa authored
    
    xeCJK is enabled in Table of Contents (TOC) so that translations.pdf
    built by top-level "make pdfdocs" can have its TOC typeset properly.
    
    This causes quotation marks and apostrophe symbols appear too wide in
    Latin-script docs.
    This is because (1) Sphinx converts ASCII symbols into multi-byte
    UTF-8 ones in LaTeX and (2) in the SC variant of "Noto CJK" font
    families, those UTF-8 symbols have full-width glyph.
    
    The KR variant of the font families has half-width glyph for those
    symbols and TOC pages should look nicer when it is used instead.
    
    Switch the default CJK font families to the KR variant and teach
    xeCJK of those symbols' widths.
    To compensate the switch, teach xeCJK of the width in the SC and
    TC variants.
    
    Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Link: https://lore.kernel.org/r/0c8ea878-0a6f-ea01-ab45-4e66c5facee9@gmail.com
    
    
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
    66939df5
    History
    docs: pdfdocs: Switch default CJK font to KR variants
    Akira Yokosawa authored
    
    xeCJK is enabled in Table of Contents (TOC) so that translations.pdf
    built by top-level "make pdfdocs" can have its TOC typeset properly.
    
    This causes quotation marks and apostrophe symbols appear too wide in
    Latin-script docs.
    This is because (1) Sphinx converts ASCII symbols into multi-byte
    UTF-8 ones in LaTeX and (2) in the SC variant of "Noto CJK" font
    families, those UTF-8 symbols have full-width glyph.
    
    The KR variant of the font families has half-width glyph for those
    symbols and TOC pages should look nicer when it is used instead.
    
    Switch the default CJK font families to the KR variant and teach
    xeCJK of those symbols' widths.
    To compensate the switch, teach xeCJK of the width in the SC and
    TC variants.
    
    Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Link: https://lore.kernel.org/r/0c8ea878-0a6f-ea01-ab45-4e66c5facee9@gmail.com
    
    
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>