diff options
author | Federico I <git@federicoigne.com> | 2020-03-21 12:13:31 +0000 |
---|---|---|
committer | Federico I <git@federicoigne.com> | 2020-03-21 12:13:31 +0000 |
commit | 6524745f3a2e106037980b908c8890c650b16ba2 (patch) | |
tree | 8add35ec39fb3ef5c3655843d1838f2c932e79c0 /config.h | |
parent | 7922d05500ac68538819bf4028bdfbfe0e482810 (diff) | |
download | st-6524745f3a2e106037980b908c8890c650b16ba2.tar.gz st-6524745f3a2e106037980b908c8890c650b16ba2.zip |
Apply Font2 patch (with working color emoji support)
Patch Homepage: https://st.suckless.org/patches/font2/
Patch Link: https://st.suckless.org/patches/font2/st-font2-20190416-ba72400.diff
Additional notes:
This patch involved multiple steps:
+ libXft needs to be patched to avoid instant crash of st. The patch was
submitted as a PR here
(https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1)
and here for the patch file
(https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1/diffs.patch).
Gentoo x11-libs/libXft package can be easily patched following the
instructions here (https://wiki.gentoo.org/wiki//etc/portage/patches).
A patched package is available in the AUR for ArchLinux users
(https://aur.archlinux.org/packages/libxft-bgra/);
+ Install a font supporting colored emoji. In this case I prefer the
Twitter Color Emoji font buy Joy Pixels (formerly EmojiOne) has been
tested and works as well.
Follow the instructions here to install the font
(https://github.com/eosrei/twemoji-color-font#manual-install-on-any-linux).
They also suggest to install Bitstream Vera font to use for
serif/sans/sans serif fonts due to its (almost absent) coverage of
emojis, which won't interfere with the emoji font.
The installation script also deploys a fontconfig file to properly
setup fonts. From initial tests seems to work out of the box;
+ Apply patch (manually)
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -6,6 +6,11 @@ | |||
6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html | 6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html |
7 | */ | 7 | */ |
8 | static char *font = "curie"; | 8 | static char *font = "curie"; |
9 | static char *font2[] = { | ||
10 | "Twitter Color Emoji:size=8", | ||
11 | /* "Inconsolata for Powerline:pixelsize=12:antialias=true:autohint=true", */ | ||
12 | /* "Hack Nerd Font Mono:pixelsize=11:antialias=true:autohint=true", */ | ||
13 | }; | ||
9 | static int borderpx = 2; | 14 | static int borderpx = 2; |
10 | 15 | ||
11 | /* | 16 | /* |
@@ -24,7 +29,7 @@ char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; | |||
24 | char *vtiden = "\033[?6c"; | 29 | char *vtiden = "\033[?6c"; |
25 | 30 | ||
26 | /* Kerning / character bounding-box multipliers */ | 31 | /* Kerning / character bounding-box multipliers */ |
27 | static float cwscale = 0.6; | 32 | static float cwscale = 0.65; |
28 | static float chscale = 1.0; | 33 | static float chscale = 1.0; |
29 | 34 | ||
30 | /* | 35 | /* |