Lite XL

EN

English Deutsch

About

FAQ Features Screenshots Contributors

Documentation

Usage Build Default Keymap MacOS Keymap

Tutorials

Simple Plugin Syntax Highlighting API Overview System Fonts

Plugins

Downloads

Search

Using system fonts

lite-xl does not provide a convenient way to use fonts on the system. There is literally _different APIs for the each platforms we support (Windows, Linux and Mac). This is where fontconfig comes to our rescue. fontconfig is installable on a lot of OSes.

lite-xl has a fontconfig plugin that we can use to find system fonts.

Installing fontconfig

Windows

mingw-w64-fontconfig provides a build that can be used directly on Windows. Download the file, extract it to somewhere and (optionally) add it to the PATH.

Linux

Check your distro-specific instructions.

# ubuntu / debian
apt install fontconfig
# arch
pacman -Su fontconfig
# fedora
dnf install fontconfig
...

MacOS

brew install fontconfig

Setting up

  1. Install the plugin
  2. Put this in your user module:
local fontconfig = require "plugins.fontconfig"
fontconfig.use {
     font = { name = "sans", size = 13 * SCALE },
     code_font = { name = "monospace", size = 13 * SCALE }
}

"sans" and "monospace" can be any fontconfig syntax. (check "Font Names")

Note that the font might not load immediately (because we need to wait for fc-match to return. If you want that, replace fontconfig.use with fontconfig.use_blocking. Doing this will force lite-xl to wait for fc-match, which can be much slower.

Get Involved

Github Discord Matrix

Status