tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: noto-emoji-ttf not working correctly



On Fri, 8 Apr 2022, Thomas Klausner wrote:

On Thu, Apr 07, 2022 at 10:16:39PM +0000, RVP wrote:

That looks like a bitmap font specifier. Does:

	xterm -fd 'Noto Color Emoji:style=Regular'

followed by:

	echo $'\U1F3A4 \U1F352'

produce the microphone and cherry glyph (in B&W)?

No.


I get B&W emojis on 9.2_STABLE (bin pkgs from 2021Q4) with:

xterm: XTerm(366) system xterm
emacs: GNU Emacs 26.3
firefox: 95.0.1nb1

The only non-standard font-related things that I"ve done is:

$ cp /etc/fonts/conf.avail/70-no-bitmaps.conf ~/.config/fontconfig/conf.d/.

and in ~/.xinitrc:
```
# Remove 75dpi fonts
xset -fp /usr/X11R7/lib/X11/fonts/75dpi/

# Put the add-on TTF fonts before the system ones.
xset +fp /usr/pkg/share/fonts/X11/TTF/

xset fp rehash
```

Emacs 26.3 displayed hex-boxes instead of emojis, so I added this to
~/.emacs (as per https://ianyepan.github.io/posts/emacs-emojis/):
```
(when (member "Noto Emoji" (font-family-list))
  (set-fontset-font
    t 'symbol (font-spec :family "Noto Emoji") nil 'prepend))
```

Try "Noto Color Emoji" with your latest emacs.

Firefox produces this error in the F12 debugger:
```
downloadable font: no supported glyph data table(s) present (font-family: "Noto Color Emoji" style:normal weight:400 stretch:100 src index:0) source: file:///usr/pkg/share/fonts/X11/TTF/NotoColorEmoji.ttf
downloadable font: rejected by sanitizer (font-family: "Noto Color Emoji" style:normal weight:400 stretch:100 src index:0) source: file:///usr/pkg/share/fonts/X11/TTF/NotoColorEmoji.ttf
```

My test file is attached.

-RVP
<!DOCTYPE html>
<html><head><meta charset="utf-8"/>
<title>Emoji Test</title>
<style>
/*
@font-face {
 font-family: "Noto Color Emoji";
 // https://raw.githubusercontent.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf
 src: url("file:///usr/pkg/share/fonts/X11/TTF/NotoColorEmoji.ttf") format("truetype");
}
span {
 font-family: "Noto Color Emoji";
}
*/
@font-face {
 font-family: "Noto Emoji";
 src: url("file:///usr/pkg/share/fonts/X11/TTF/NotoEmoji-Regular.ttf") format("truetype");
}
span {
 font-family: "Noto Emoji";
}
</style>
</head>
<!-- <body style="font-family:Noto;"><h1>Emoji Test</h1> -->
<body><h1>Emoji Test</h1>
<pre>
Microphone      # <span>🎤 &#x1F3A4;</span>
Hat             # <span>👒 &#x1F452;</span>
Kiss            # <span>💋 &#x1F48B;</span>
Eggplant        # <span>🍆 &#x1F346;</span>
Face            # <span>😂 &#x1F602;</span>
</pre>
</body></html>

<!--
downloadable font: no supported glyph data table(s) present (font-family: "Noto Color Emoji" style:normal weight:400 stretch:100 src index:0) source: file:///usr/pkg/share/fonts/X11/TTF/NotoColorEmoji.ttf
downloadable font: rejected by sanitizer (font-family: "Noto Color Emoji" style:normal weight:400 stretch:100 src index:0) source: file:///usr/pkg/share/fonts/X11/TTF/NotoColorEmoji.ttf
-->

<!--
https://ianyepan.github.io/posts/emacs-emojis/
-->


Home | Main Index | Thread Index | Old Index