[Fontconfig] Issues with git master and my libxft emoji setup

Akira TAGOH akira at tagoh.org
Mon Aug 28 07:13:26 UTC 2017


You can't do anything for that problem in fontconfig because that is
application issue. they need to use the proper font according to the
context and that's the reason why there are rich rendering library
like pango is being developed at the upper layer.

The fact what you saw is just that Noto Color Emoji doesn't have any
glyphs for CJK and non-Latin things. that's true and it doesn't
actually support those languages right. that said, I don't think you
can see everything at the same time even if you drop prepending Noto.
so better use those rich library or write similar code to do.


On Mon, Aug 28, 2017 at 3:34 PM, dequis <dx at dxzone.com.ar> wrote:
> Hi! With emoji becoming some sort of official fontconfig feature, I
> decided it's time to reduce the amount of hacks in my setup. And I was
> hoping that updating to the latest fontconfig git master would mean
> not requiring the custom configs I wrote. Unfortunately, it made
> things worse.
>
> Some context before I go on with the actual issue:
>
> I wrote this libxft patch a couple of years ago, adding colored glyph support:
>
> https://patchwork.freedesktop.org/patch/57462/
>
> It didn't get any attention, probably because no one maintains libxft,
> and I didn't advertise it much so I'm probably the only user of that
> patch. Its biggest problem is those fonts have bitmap glyphs so big
> they result in X errors sometimes, and I've been using a manually
> scaled version of Noto Color Emoji since then.
>
> The other issue with the patch is that it doesn't do anything to
> prefer colored glyphs - I could use some advice there, if there's
> something libxft could do (like pango and/or cairo seem to do now).
> But I've been doing this:
>
>     <selectfont>
>         <rejectfont>
>             <glob>/usr/share/fonts/TTF/Symbola.ttf</glob>
>         </rejectfont>
>     </selectfont>
>
>     <match>
>         <test name="prgname" compare="eq" qual="any">
>             <string>[...]</string>
>         </test>
>         <edit mode="prepend" name="family">
>             <string>Noto Color Emoji</string>
>         </edit>
>     </match>
>
> Not pretty but it gets the job done. It sucks to need the global
> rejectfont, since it affects non-libxft applications, but I couldn't
> find a better way. I would also appreciate advice here.
>
> Anyway, that works up to fontconfig 2.12.4.
>
> I installed git master, "2.12.4-29-g92da67a", and:
>
> - the rejectfont is no longer needed (neat!)
> - the prepend of Noto Color Emoji breaks things
>
> I can see color emoji, but I stop being able to see most other fonts.
> Latin/greek/cyrillic/emoji display fine, but CJK, thai, braille are
> all gone.
>
> If I remove the prepend, CJK and others appear, and emoji go back to symbola.
>
> I'm not really sure what's going on and I ran out of weekend to play
> with this stuff. Any suggestions of stuff to check out are welcome!
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fontconfig



-- 
Akira TAGOH


More information about the Fontconfig mailing list