D12614: Fallback to fixed width fonts

Sassan Haradji noreply at phabricator.kde.org
Wed May 2 14:25:43 UTC 2018


sassanh added a comment.


  @hindenburg sure
  Edit `~/.config/fontconfig/fonts.conf` to something like this:
  
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <!-- -->
    <fontconfig>
      <!-- Generic name aliasing -->
      <alias>
        <family>sans-serif</family>
        <prefer>
          <family>SS1</family>
          <family>SS2</family>
        </prefer>
      </alias>
      <alias>
        <family>serif</family>
        <prefer>
          <family>S1</family>
          <family>S2</family>
        </prefer>
      </alias>
      <alias>
        <family>monospace</family>
        <prefer>
          <family>M1</family>
          <family>M2</family>
        </prefer>
      </alias>
    </fontconfig>
  
  It tells font config that by default applications are supposed to use `SS1` in case they need a sansserif font and if `SS1` doesn't have a special character they should use `SS2`. Same applies for `M1` and `M2` for apps that need monospace fonts.
  Now lets suppose we've selected a font `F` for Konsole which doesn't have character `C`. Before this commit Konsole would try to render it with `SS1` and then `SS2` but after applying this diff it'll try `M1` and then `M2`.
  I didn't put font names so that you can use the fonts installed on your machine, I've selected FuraCode for Konsole which doesn't have Persian characters. I have `IRANSans-Web` as my sansserif fallback font and `FreeFarsi Monospace` as my monospace fallback font. Before applying this patch Konsole falls back to `IRANSans-Web` for Persian characters but after applying this patch it falls back to `FreeFarsi Monospace` which is the correct thing to do.
  Let me know if more info is required.

REPOSITORY
  R319 Konsole

REVISION DETAIL
  https://phabricator.kde.org/D12614

To: sassanh, #konsole
Cc: hindenburg, mglb, ahmadsamir, herrold, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180502/1bc566a2/attachment.html>


More information about the konsole-devel mailing list