I've found the first minor annoyance with this setup. And it seemingly confirms that Firefox isn't using `<charset>` rules from FontConfig.

No, literally the ☹ emoji "WHITE FROWNING FACE".

GTK apps are rendering it fine because I explicitly exclude it from the font. But Firefox is back to rendering it as text. Because there's a text version in Noto Sans.

Maybe I need to swap my XCompose to use "SLIGHTLY FROWNING FACE", which doesn't have that problem. I'm already using 🙂 SLIGHTLY SMILING FACE instead of ☺ "WHITE SMILING FACE" for ":)"

#FontConfig #Firefox

Sinon, la mise à jour de #Fontconfig de cette nuit me met le bronx dans mes polices de caractères (ce qui devrait être affiché en Verdana l’est maintenant en Liberation Sans ??? Mais de quoi tu te mêles ??!)… Pfffff !!! 😤

Kinda found a way to make this work. And it's ugly.

`<alias><family>Noto Color Emoji</family><prefer><family>Noto Sans</family></prefer></alias>`

Basically "If you're going to use Noto Color Emoji, try Noto Sans first, THEN try Emoji".

Good: Seems to stop the emoji numbers (because Noto Sans has those glyphs)
Bad: Overrides it for EVERYTHING (not just Firefox)
Also bad: Forces sans serif, even if the site uses a serif font in the list _after_ the emoji font.

#FontConfig #UglyHacks

I'm putting this down to Firefox now.

Reverted my config. Tried a couple of checks.

`FC_DEBUG=4 pango-view --font="Noto Color Emoji" -t "9"` shows me a slightly fugly, non-Emoji 9 that apparently comes from StandardSymbolsPS

Changing Tilda to use Noto Color Emoji shows fugly wide text that looks like it's probably the same font.

But Firefox definitely still shows numerals.

I guess it doesn't implement the "charset" part of FontConfig or something?

#Firefox #FontConfig #Emoji

On the one hand, this feels like a Firefox problem, because that's where I'm seeing it.

On the other hand, it's probably only Firefox (web pages) where an emoji font is ever set as the first font 😐

#Linux #FontConfig

I spent some time debugging a font rendering issue after recent fontconfig changes on Linux.

At first I thought fontconfig itself was "broken", but after testing multiple setups I realized the issue was mostly related to how Iosevka behaved with the newer font matching/rendering changes.

Issue/MR related to this:
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/522
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/520

The funny part is that this ended up helping me discover a new font family:
IoskeleyMono (https://github.com/ahatem/IoskeleyMono)

After testing it in:

  • st
  • dwm
  • Firefox
  • Senpai IRC
  • Geany
  • websites/forums
the rendering and spacing ended up being MUCH better for my workflow, especially the "Term" variant.

Sometimes a small issue sends you in the right direction 🙂

I liked it so much that I already prepared and submitted a SlackBuild.

Huge thanks to the developers working on fontconfig and font rendering. People usually only notice this work when something changes, but good typography and font matching matter a lot on a daily desktop system.

#x11 #fontconfig #fonts #slackware #ioskeleymono

fontconfig 2.18 fails to match Iosevka TTC fonts with fc-match (#522) · Issues · fontconfig / fontconfig · GitLab

After upgrading to fontconfig 2.18, fc-match no longer resolves Iosevka font families correctly. The fonts are detected by fc-list, but fc-match falls back to DejaVu instead....

GitLab

Sigh, I wasted* hours hacking on #fontconfig, trying to make it be a better Windows citizen, and it is just horrible.

Apparently it was written back in the last years of the 1900s in what was supposed to be a very "portable" fashion, where "portability" then meant "run on any random hardware and Unix-like OS/environment with ancient C compilers that possibly could run the X Window System", and it has not been cleaned up since then.

For instance, what is the point with using this FcChar8 type, a typedef for unsigned char, and thus having to cast back and forth to char all the time whenever calling C library functions? What's wrong with using plain char?

(Sure, char might be signed or unsigned, but when manipulating strings that seldom matters. For actual arithmetics on chars, in those few code snippets where that is done, it could then use casts to unsigned char. Using FcChar8 all over the place is just bonkers.)

The Windows portability bits, at least partially written by my younger self over 20 years ago, use only "narrow" character APIs for pathname related APIs, which by now is deeply troubling.

Windows NT is the only type of Windows that remains. (Windows 2000 → XP → Vista → 7 → 8 → 10 → 11). Its file systems use UTF-16 for names, and to be able to access all files and folders one needs to use wide character APIs. Like _wopen() instead of open(), and FindFirstFileExW() instead of FindFirstFileEx().

Should I even bother trying to upstream improvements, or just do the bare minimum to make it work properly in non-ASCII situations in the new Collabora Office? Upstreaming fixes cleanly and properly will take a lot of time. Not interested enough to spend much own time on this, more than I already did.

The principle in a fontconfig cleanup for file names on Windows should be: Keep using plain narrow char strings, as for Unix, to avoid massive changes all over it, but assume/ensure they are in UTF-8 on Windows, and convert to/from UTF-16 only right before/after calling C library or Win32 APIs that take/return pathnames.

I wonder how much FLOSS software nowadays uses fontconfig on Windows? Probably more than I think. Which means a potential upstreaming of Windows-related improvements must be careful not to break such use.

*) Not actually ”wasted”, any investigation and experimentation where you learn things is useful.

fontconfigのこの問題は、いつまで放置するんだろうね。16年も放置されたままというのは、やっぱり異常だよ #linux #fontconfig

65-nonlatin should be updated for CJK fonts (\#53) · Issue · fontconfig/fontconfig: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/53

65-nonlatin should be updated for CJK fonts (#53) · Issues · fontconfig / fontconfig · GitLab

Submitted by Qianqian Fang Assigned to [email protected] Link to original bug...

GitLab

Debian SidにFirefox 143が降りてきたのでNoto color emojiフォントが表示されない問題を確認した

結論としては、143で不具合は直っているけどfontconfigの設定も確認しろ、です

というのもパッケージをアップグレードしただけでは、表示は変わりません。相変わらず絵文字は見えないままです。ここでfontconfigの設定(`/etc/fonts/local.conf`や`~/.config/fontconfig/fonts.conf`)を見て、ビットマップフォントを無効にする`embeddedbitmap`の設定があるか確認してください。あれば削除しましょう

ということでFirefox 142のときは、fontconfigに関係なくNoto color emojiが表示されなかったけれど、143では不具合は直りました。しかし、fontconfigの設定で見えないから注意しろというのが結論ということでした

#linux #firefox #emoji #fontconfig

I have managed to break my #Linux system, because I used Font Manager to deactivate most of the pre-installed #fonts. I despise font cruft.

BUT, that means that the configuration files for the #fontconfig subsystem are not referencing any of the fonts I actually have installed and activated, so when I installed Font Awesome 6 for a particular #Conky config I downloaded, other applications started using Font Awesome as their default font for sans-serif.