You are not logged in.

#26 2023-05-18 06:13:38

seth
Member
Registered: 2012-09-03
Posts: 51,206

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

ewaller wrote:

where to move it?

Newbie Corner.

The font lacks the latin alphabet

urxvt: unable to calculate font width for 'Noto Color Emoji-9:slant=0:weight=100:minspace=True', using max_advance_width.
seth wrote:

You may try one of the patched urxvt variants from the AUR for more lenient glyph handling.

eg. https://aur.archlinux.org/packages/rxvt … wideglyphs (idk. whether the patch to the patch I posted there still works)

Edit: patch on patch still works

Last edited by seth (2023-05-18 07:21:15)

Offline

#27 2023-05-18 15:01:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

Newbie it is.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#28 2023-05-18 15:14:24

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

seth wrote:

(idk. whether the patch to the patch I posted there still works)

Edit: patch on patch still works

But there's a comment, showing an error, more recent than your comment. I get that very same error.

And what is the "patch on patch"?

Last edited by Enrico1989 (2023-05-18 15:14:54)

Offline

#29 2023-05-18 15:21:50

seth
Member
Registered: 2012-09-03
Posts: 51,206

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

https://aur.archlinux.org/packages/rxvt … ent-881950 patches enable-wide-glyphs.patch which itself is a patch provided by the package on top of the urxvt cvs checkout.

The other comment simply didn't apply that patch, I rebuilt the package this morning to test whether something had broken again.
Also b

set over there wrote:

new sha1sum for 'enable-wide-glyphs.patch' is '764db81b7a1618bf24a3d512b088815d479a97a6'

Offline

#30 2023-05-18 17:57:04

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

Sorry, I don't know how to apply that patch. Considering enable-wide-glyphs.patch itself looks a lot like a git diff redirected to a file, I'm not sure whether I'm supposed to manually apply the diff of your comment or to put it in a file to make it have an effect. I've tried putting it in a file  enable-wide-glyphs.patch.patch, and then run makepkg -si. It did have an effect, as I was asked quite a few

Reversed (or previously applied) patch detected!  Assume -R? [n]

and answered y to all, but the procedure failed anyway. Can you give me more details as to how to apply the patch?

Ok, never mind, I've found the wiki.

However, it's not clear to me how to apply the patch. Here is my attempt to do it. What did I do wrong? (Patch and sha is copied from your comment, steps are from the wiki; I did makepkg to trigger the creation of src/ and the copy of the patches in it; not sure if that's what I needed)

Last edited by Enrico1989 (2023-05-18 17:59:22)

Offline

#31 2023-05-18 18:19:27

seth
Member
Registered: 2012-09-03
Posts: 51,206

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

You "git apply the_extra.patch" (I didn't include the shasum because I'm more changes to the PKGBUILD, enabling pixbuf and disabling frills)

But here's the the_extra.patch

diff --git a/PKGBUILD b/PKGBUILD
index d2e504f..3e4330d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -38,7 +38,7 @@ sha1sums=('b5a4507f85ebb7bac589db2e07d9bc40106720d9'
           '01ee8f212add79a158dcd4ed78d0ea1324bdc59b'
           'b7fde1c46af45e831828738874f14b092b1e795f'
           '69b77c0b4b4587117f3a6e240a5bd6389ed40be3'
-          '5b37be933d9b6cc1f7e3129a69c338d232bf7808')
+          '764db81b7a1618bf24a3d512b088815d479a97a6')
 
 prepare() {
   cd ${srcdir}
@@ -80,7 +80,9 @@ build() {
     --enable-wtmp \
     --enable-xft \
     --enable-xim \
-    --enable-xterm-scroll
+    --enable-xterm-scroll \
+    --enable-pixbuf \
+    --disable-frills
   make
 }
 
diff --git a/enable-wide-glyphs.patch b/enable-wide-glyphs.patch
index d7ca337..275f260 100644
--- a/enable-wide-glyphs.patch
+++ b/enable-wide-glyphs.patch
@@ -170,17 +170,17 @@ index c56921c8..9d75541a 100644
  
    return true;
  }
-@@ -1395,6 +1400,10 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
+@@ -1521,6 +1526,10 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
  
            ep->glyph = glyph;
-           ep->x = x_ + (cwidth - extents.xOff >> 1);
+           ep->x = x_;
 +#if ENABLE_WIDE_GLYPHS
 +          /* Left-align to bounding box, do not overlap to the left. */
 +          max_it(ep->x, x_);
 +#endif
            ep->y = y_ + ascent;
  
-           if (extents.xOff == 0)
+           // the xft font cell might differ from the terminal font cell,
 diff --git a/src/screen.C b/src/screen.C
 index 115afbf2..61681b84 100644
 --- a/src/screen.C

Offline

#32 2023-05-18 18:28:54

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

Do you mean I'd do that in a freshly downloaded git repo from there? If so, here's how it ends:

:: rxvt-unicode-cvs-patched-wideglyphs and rxvt-unicode are in conflict. Remove rxvt-unicode? [y/N] y

Packages (2) rxvt-unicode-9.31-2 [removal]  rxvt-unicode-cvs-patched-wideglyphs-20170412-12

Total Installed Size:  3.20 MiB
Net Upgrade Size:      0.01 MiB

:: Proceed with installation? [Y/n]

but the newly installed still shows squares with echo -e "\U1f34c\U1f680"

If you mean I'd do the git apply patch somewhere in the process I attempted, then when should I do it exactly?

Last edited by Enrico1989 (2023-05-18 18:31:28)

Offline

#33 2023-05-18 18:31:33

seth
Member
Registered: 2012-09-03
Posts: 51,206

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

Do you start it with the proper font configuration?

urxvt -fn 'xft:DejaVuSansM Nerd Font Mono:size=12,xft:Noto Color Emoji:size=9'

Also, sanity check

fc-list | grep -i nerd

Offline

#34 2023-05-18 18:32:45

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

seth wrote:

Do you start it with the proper font configuration?

urxvt -fn 'xft:DejaVuSansM Nerd Font Mono:size=12,xft:Noto Color Emoji:size=9'

Oh, darn it, I forgot that obvious thing.

It works!

Thank you very much smile

Offline

#35 2023-05-18 18:34:04

seth
Member
Registered: 2012-09-03
Posts: 51,206

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

See the xrdb wiki again how to configure urxvt properly and fyi, you've now pixbuf support, ie. background images.

Offline

#36 2023-05-18 18:37:12

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] Should urxvt wiki mention colored emojis are not supported?

seth wrote:

See the xrdb wiki again how to configure urxvt properly

Isn't the following line in ~/.Xdefaults enough?

URxvt*font:             xft:DejaVuSansM Nerd Font Mono:size=12,xft:Noto Color Emoji:size=12

and fyi, you've now pixbuf support, ie. background images.

Wow, great!

Offline

#37 2023-05-18 19:20:55

seth
Member
Registered: 2012-09-03
Posts: 51,206

Offline

Board footer

Powered by FluxBB