You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fontconfig conf file provide by this package changes the default system sans font to Bitstream Vera.
The comments(and readme) indicate that the intent here was to replace avoid DejaVu Sans being used to render some emojis. I guess the author used DejaVu Sans, so the replacement is fine is fine for that particular setup.
However, there's a cleaner way to achieve the desired result: configuring fontconfig to ignore all of DejaVu Sans' characters in the emoji character range.
The results is that DejaVu's built-in emoji are ignored when rendering, so Twemoji is used instead. This means that user's don't have to unconditionally use Bitstream Vera (I agree 99% of the users using DejaVu won't notice, but for any other font the difference is far more obvious).
Here's a snippet, which I actually copied from the config file provided by ArchLinux [unofficial] package for ttf-twemoji.
<!-- If other fonts contain emoji glyphs, they could interfere and make some emojis rendered in wrong font (often in black-and-white). For example, DejaVu Sans contains black-and-white emojis, which we can remove using the following trick:-->
<matchtarget="scan">
<testname="family"compare="contains">
<string>DejaVu</string>
</test>
<editname="charset"mode="assign"binding="same">
<minus>
<name>charset</name>
<charset>
<range>
<int>0x1f600</int>
<int>0x1f640</int>
</range>
</charset>
</minus>
</edit>
</match>
The above linked file really has a few improvements which would also make sense to include in the packaged config file,
The key difference it doesn't reconfigure the system's default font (or, rather, it doesn't assume that everyone uses DejaVu Sans.
In reallity, I believe this can be extended to ignore emoji-range characters for all fonts that are not Twemoji, with something like (haven't fully tested this snippet):
The fontconfig conf file provide by this package changes the default system
sans
font to Bitstream Vera.The comments(and readme) indicate that the intent here was to replace avoid
DejaVu Sans
being used to render some emojis. I guess the author usedDejaVu Sans
, so the replacement is fine is fine for that particular setup.However, there's a cleaner way to achieve the desired result: configuring fontconfig to ignore all of DejaVu Sans' characters in the emoji character range.
The results is that DejaVu's built-in emoji are ignored when rendering, so Twemoji is used instead. This means that user's don't have to unconditionally use
Bitstream Vera
(I agree 99% of the users using DejaVu won't notice, but for any other font the difference is far more obvious).Here's a snippet, which I actually copied from the config file provided by ArchLinux [unofficial] package for
ttf-twemoji
.The above linked file really has a few improvements which would also make sense to include in the packaged config file,
The key difference it doesn't reconfigure the system's default font (or, rather, it doesn't assume that everyone uses
DejaVu Sans
.In reallity, I believe this can be extended to ignore emoji-range characters for all fonts that are not Twemoji, with something like (haven't fully tested this snippet):
Do you think switching to this strategy makes sense/
The text was updated successfully, but these errors were encountered: