Add cairo and pixman as deps on Linux

Needed to render COLRv1 fonts. Which are needed because bitmap emoji
fonts dont render well at large font sizes such as can be used with
multicell chars.
This commit is contained in:
Kovid Goyal 2025-01-23 14:16:33 +05:30
parent c599b7e02f
commit 744145f392
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
5 changed files with 28 additions and 3 deletions

View file

@ -96,7 +96,7 @@ def install_deps() -> None:
run('sudo apt-get install -y libgl1-mesa-dev libxi-dev libxrandr-dev libxinerama-dev ca-certificates'
' libxcursor-dev libxcb-xkb-dev libdbus-1-dev libxkbcommon-dev libharfbuzz-dev libx11-xcb-dev zsh'
' libpng-dev liblcms2-dev libfontconfig-dev libxkbcommon-x11-dev libcanberra-dev libxxhash-dev uuid-dev'
' libsimde-dev libsystemd-dev zsh bash dash systemd-coredump gdb')
' libsimde-dev libsystemd-dev libcairo2-dev zsh bash dash systemd-coredump gdb')
# for some reason these directories are world writable which causes zsh
# compinit to break
run('sudo chmod -R og-w /usr/share/zsh')

View file

@ -26,7 +26,7 @@ def binary_includes():
return tuple(map(get_dll_path, (
'expat', 'sqlite3', 'ffi', 'z', 'lzma', 'png16', 'lcms2', 'ssl', 'crypto', 'crypt',
'iconv', 'pcre2-8', 'graphite2', 'glib-2.0', 'freetype', 'xxhash',
'harfbuzz', 'xkbcommon', 'xkbcommon-x11',
'pixman-1', 'cairo', 'harfbuzz', 'xkbcommon', 'xkbcommon-x11',
# fontconfig is not bundled because in typical brain dead Linux
# distro fashion, different distros use different default config
# paths for fontconfig.

View file

@ -239,6 +239,16 @@
}
},
{
"name": "pixman",
"os": "linux",
"unix": {
"filename": "pixman-0.44.2.tar.xz",
"hash": "sha256:50baf820dde0c5ff9714d03d2df4970f606a3d3b1024f5404c0398a9821cc4b0",
"urls": ["https://www.cairographics.org/releases/pixman-0.44.2.tar.xz"]
}
},
{
"name": "freetype",
"os": "linux",
@ -259,6 +269,16 @@
}
},
{
"name": "cairo",
"os": "linux",
"unix": {
"filename": "cairo-1.18.2.tar.xz",
"hash": "sha256:a62b9bb42425e844cc3d6ddde043ff39dbabedd1542eba57a2eb79f85889d45a",
"urls": ["https://www.cairographics.org/releases/cairo-1.18.2.tar.xz"]
}
},
{
"name": "harfbuzz",
"unix": {

View file

@ -91,6 +91,8 @@ Run-time dependencies:
* ``liblcms2``
* ``libxxhash``
* ``openssl``
* ``pixman`` (not needed on macOS)
* ``cairo`` (not needed on macOS)
* ``freetype`` (not needed on macOS)
* ``fontconfig`` (not needed on macOS)
* ``libcanberra`` (not needed on macOS)
@ -115,6 +117,7 @@ Build-time dependencies:
- ``libpython3-dev``
- ``libxxhash-dev``
- ``libsimde-dev``
- ``libcairo2-dev``
.. _x11-dev-libs:
@ -127,6 +130,7 @@ Build-time dependencies:
- ``libxinerama-dev``
- ``libgl1-mesa-dev``
- ``libxkbcommon-x11-dev``
- ``libfontconfig-dev``
- ``libx11-xcb-dev``

View file

@ -640,8 +640,9 @@ def kitty_env(args: Options) -> Env:
# warnings about it
cppflags.append('-DGL_SILENCE_DEPRECATION')
else:
cflags.extend(pkg_config('fontconfig', '--cflags-only-I'))
cflags.extend(pkg_config('cairo-fc', '--cflags-only-I'))
platform_libs = []
platform_libs.extend(pkg_config('cairo-fc', '--libs'))
cflags.extend(pkg_config('harfbuzz', '--cflags-only-I'))
platform_libs.extend(pkg_config('harfbuzz', '--libs'))
pylib = get_python_flags(args, cflags)