Re: [dev] Xft(?) bug with emoji

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Thu, 9 Aug 2018 17:07:52 +0200

On Thu, Aug 09, 2018 at 02:23:12PM +0300, Alexander Krotov wrote:
> Here is the program to reproduce Xft bug with X11 error. OK1 is printed,
> OK2 is not.
>
> Just FYI that the bug is localized and it is not a dmenu problem at all.

> /*
> gcc xftbug.c -lX11 -lXft -I /usr/include/freetype2 -lfontconfig
> */
> #include <stdio.h>
>
> #include <X11/Xlib.h>
> #include <X11/Xft/Xft.h>
>
> int main(void) {
> Display *dpy = XOpenDisplay(NULL);
> if(dpy == NULL)
> return 1;
> int screen = DefaultScreen(dpy);
>
> char *fontname = "Noto Color Emoji";
> XftFont *xfont = XftFontOpenName(dpy, screen, fontname);
> if(xfont == NULL) {
> printf("Can't load font pattern");
> return 1;
> }
>
> XGlyphInfo ext;
> XftTextExtentsUtf8(dpy, xfont, "\xf0\x9f\x93\x93", 4, &ext);
> fprintf(stderr, "OK1\n");
> XSync (dpy, False);
> fprintf(stderr, "OK2\n");
>
> XCloseDisplay(dpy);
> }

I went to https://www.google.com/get/noto/help/install/ and downloaded
the 1.1GB ZIP file and extracted the 1.5GB of fonts.
Then installed the Noto Color Emoji and ran your program.

Output:
OK1
OK2


I hope someone realises the absurdity of this.

-- 
Kind regards,
Hiltjo
Received on Thu Aug 09 2018 - 17:07:52 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2018 - 17:12:06 CEST