Re: [dev] [st] libxft-bgra X Error

From: Luuk van Baal <luukvbaal_AT_gmail.com>
Date: Mon, 19 Apr 2021 19:58:04 +0200

From: Страхиња Радић<contact_AT_strahinja.org>
Sent:21/04/19 07:06pm
Subject:Re: [dev] [st] libxft-bgra X Error
> On 21/04/19 11:59, Luuk van Baal wrote:
> > I was looking for pointers in regards to this error I'm receiving when
> > using libxft-bgra(https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1). I explained the issue in (https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1#note_884325):
> >
> > "This patch (installed through this AUR package) leads to
> >
> > X Error of failed request: RenderBadPicture (invalid Picture parameter)
> > Major opcode of failed request: 139 (RENDER)
> > Minor opcode of failed request: 8 (RenderComposite)
> > Picture id in failed request: 0x3b84
> > Serial number of failed request: 15315
> > Current serial number in output stream: 15327
> >
> > when scrolling through this file(https://raw.githubusercontent.com/luukvbaal/iconlookup/master/iconlookup) in suckless' simple terminal using a patched nerd font. Very peculiar I know but this is the only way I've been able to reproduce this error.
> > This sequence crashes the terminal every time:
> > open st -> open iconlookup in vim -> press 160gg to go to line 160(full size terminal showing 47 lines centered around line 160).
> > The same error does not happen when using different terminals but also does not happen in st when using the standard libxft from the arch repositories.
> > I'm interested in figuring this out but I'm not sure how to debug the
> > error. Would appreciate any pointers or thoughts regarding this."
> >
> > I'm curious to know your thoughts on this as like I said the problem
> > does not occur with mainline libxft and st, does occur with libxft-bgra
> > and st, but does not occur with libxft-bgra and other terminals(tried
> > xterm/kitty/alacritty). Might this issue be fixed on st's side?
>
> Interesting, I'm not getting this error. I use Artix Linux, libxft-bgra
> 2.3.3.r7.7808631e-1 from AUR, vim 8.2.2653-1 and my modified st which I
> regularly update from suckless repo[1]. Also ttf-nerd-fonts-symbols, *not*
> ttf-nerd-fonts-symbols-mono, as the latter package has a bug with the uppercase
> "E".[2] (Maybe related?)
>
> Side note: I prefer :160 in vim to go to a particular line.
>
> [1]: https://git.sr.ht/~strahinja/st
> [2]: https://github.com/ryanoasis/nerd-fonts/issues/581
>

Taking a look at your st config led me to try to use the font2 patch and I can confirm that the error does not occor when using ttf-nerd-fonts-symbols in the font2 array and a regular font as the st font. Before this I was using a fontconfig setup like so:

 <alias>
    <family>monospace</family>
                <prefer>
                        <family>FiraCode Nerd Font[1]</family>
                        <family>Noto Color Emoji</family>
    </prefer>
        </alias>

with the st font set to mono:

static char *font = "mono:pixelsize=16:antialias=true:autohint=true";

It seems the error is caused by something only present when using a patched nerd font, not when using a seperate font containing the nerd font symbols.

P.S. using the font2 patch with ttf-nerd-fonts-symbols leaves me with a misaligned shell prompt(powerlevel10k[2]) but I suppose this can be fixed.

[1]: https://aur.archlinux.org/packages/nerd-fonts-fira-code/
[2]: https://github.com/romkatv/powerlevel10k
Received on Mon Apr 19 2021 - 19:58:04 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 19 2021 - 20:36:09 CEST