How to configure a fallback font for Konsole

Hello everyone,

Is there a way to configure multiple fonts for Konsole? I write in English and Arabic, and the font I choose for English does not support the Arabic Unicodes, the current work around is to merge fonts into one font. is there another easy way to configure multiple fonts in Konsole?

Thanks

To solve the issue without manually merging font files, you should use Fontconfig, the standard font management system on Linux. Konsole itself doesn’t have a “Fallback” button in its settings because it relies on the OS to handle characters it can’t find in your primary font.

Here is the specific recommendation to set this up:

1. Identify Your Font Names

Open your terminal and run this command to find the exact “Family” names of the fonts you want to use:

fc-list : family | grep -i "your font name"

  • Primary (English): e.g., Hack, Fira Code, or JetBrains Mono.

  • Fallback (Arabic): e.g., Noto Sans Arabic or IBM Plex Sans Arabic.

2. Create a Custom Font Configuration

You don’t need to change system files. Create a local configuration file for your user:

  1. Open (or create) the file: ~/.config/fontconfig/fonts.conf

  2. Paste the following code into it:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>YOUR_ENGLISH_FONT_NAME</family>
        <prefer>
            <family>YOUR_ENGLISH_FONT_NAME</family>
            <family>YOUR_ARABIC_FONT_NAME</family>
        </prefer>
    </alias>

    <alias>
        <family>monospace</family>
        <prefer>
            <family>YOUR_ENGLISH_FONT_NAME</family>
            <family>YOUR_ARABIC_FONT_NAME</family>
        </prefer>
    </alias>
</fontconfig>

Replace YOUR_ENGLISH_FONT_NAME and YOUR_ARABIC_FONT_NAME with the names you found in Step 1.

3. Apply the Changes

Run this command to refresh the system’s font cache:

fc-cache -fv

Then, fully restart Konsole.

Why this is the “correct” way:

  • No File Merging: You keep your font files clean and original. If the fonts are updated by your Linux distribution, your fallback settings will still work.

  • System-Wide: This doesn’t just fix Konsole; it teaches your entire desktop that whenever you use your favorite English font, the Arabic one is its “partner” for missing characters.

  • Monospace Safety: By defining this in Fontconfig, the system handles the alignment issues better than a “Frankenstein” merged font file would.

If you are using a specific Konsole Profile, ensure that under Settings > Edit Current Profile > Appearance, the “Font” matches the YOUR_ENGLISH_FONT_NAME you put in the config file.

2 Likes

Thanks @nathaniel.krebs, It worked just like I wanted!

1 Like

@muga, glad that I was able to help out! Thank you for marking the thread solved, it will help future users with the same problem. :slightly_smiling_face: :clinking_beer_mugs: