View previous topic :: View next topic |
Author |
Message |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jul 03, 2018 1:13 pm Post subject: [solved] media-fonts/noto,getting NotoColorEmoji.ttf to work |
|
|
This particular font's never fully worked as advertised, but for the past few months I've had to go out of my way to force fontconfig to reject using it, because all its glyphs now render at 128px in size in all freetype-using programs (screenshot, note the few correctly sized characters in there from Symbola).
What am I doing wrong (besides trying to display unicode emoji ofc.)? I'm using ~arch with up-to-date versions of fontconfig, freetype, cairo etc. but I don't see any obviously missing USE flags that would lead to this. Is the font file itself just broken? Is there a replacement in portage that'd actually display at the right size *and* in colour?
Last edited by Ant P. on Tue Aug 07, 2018 4:45 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bunder Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Tue Jul 03, 2018 1:34 pm Post subject: |
|
|
link no worky _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jul 17, 2018 3:00 am Post subject: |
|
|
Small update: I've managed to get the colour part to work by installing cairo-9999, the font size is still absurd however. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Aug 07, 2018 4:44 am Post subject: |
|
|
Here's a clue:
Code: | $ fc-query /usr/share/fonts/noto/NotoColorEmoji.ttf
Pattern has 27 elts (size 32)
family: "Noto Color Emoji"(s)
familylang: "en"(s)
style: "Regular"(s)
stylelang: "en"(s)
fullname: "Noto Color Emoji"(s)
fullnamelang: "en"(s)
slant: 0(i)(s)
weight: 80(f)(s)
width: 100(f)(s)
pixelsize: 109(f)(s)
spacing: 100(i)(s)
foundry: "GOOG"(s)
antialias: False(s)
file: "/usr/share/fonts/noto/NotoColorEmoji.ttf"(s)
index: 0(i)(s)
outline: False(s)
scalable: True(s)
...
|
Note the pixelsize is set (to a huge number), outline=False… and even though scalable=True freetype/fontconfig ignores it and just puts it on screen as is. And so I found out I can fix this via eselect fontconfig enable 10-scale-bitmap-fonts.conf, because this is actually a bitmap font.
But I only want it to scale this font, without ruining others like Terminus. Thus I needed to cut the good bits out of the conf file and put them into local.conf:
/etc/fonts/local.conf: | ...
<!-- force scaling on emoji bitmap fonts -->
<match target="font">
<test name="scalable" compare="eq"><bool>true</bool></test>
<test name="outline" compare="eq"><bool>false</bool></test>
<edit name="pixelsizefixupfactor" mode="assign">
<divide>
<name target="pattern">pixelsize</name>
<name target="font">pixelsize</name>
</divide>
</edit>
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix>
<name>pixelsizefixupfactor</name> <double>0</double>
<double>0</double> <name>pixelsizefixupfactor</name>
</matrix>
</times>
</edit>
<edit name="size" mode="assign">
<divide>
<name>size</name>
<name>pixelsizefixupfactor</name>
</divide>
</edit>
</match>
... |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Sep 20, 2018 11:21 pm Post subject: |
|
|
Looks like fontconfig-2.13.1 upstream added a similar fix (use `eselect fontconfig enable 10-scale-bitmap-fonts.conf`), so the above workaround is no longer needed — and in fact, needs to be removed to avoid double-scaling brokenness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mr. Tao Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/87923942548a9ae7087f82.gif)
Joined: 20 Jul 2007 Posts: 147
|
Posted: Wed Apr 03, 2019 9:54 am Post subject: |
|
|
I couldn’t get Noto Color Emoji to work on a newly installed system. After a lot of guesswork, I found out that the culprit is fontconfig-infinality. After I have eselect fontconfig disable 52-infinality.conf colour emoji appeared instantly in already running applications. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
subkelvin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 May 2020 Posts: 3
|
Posted: Tue Jun 09, 2020 12:11 am Post subject: |
|
|
Mr. Tao wrote: | I couldn’t get Noto Color Emoji to work on a newly installed system. After a lot of guesswork, I found out that the culprit is fontconfig-infinality. After I have eselect fontconfig disable 52-infinality.conf colour emoji appeared instantly in already running applications. |
This saved my day! Only after I disabled the infinality the Noto Emoji Color worked with polybar and i3!
Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lkraav Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/2325663314d8b46e94f6a0.jpg)
Joined: 13 Oct 2004 Posts: 130 Location: Estonia
|
Posted: Thu Jan 30, 2025 5:53 pm Post subject: |
|
|
Thanks for pointing out the relation to bitmap fonts: this pointed me to noticing for some reason `70-no-bitmaps` had appeared since Aug 2024, which matches the timeline when I think I at one point noticed emojis breaking:
```
2024-08-11T01:13:53 >>> media-libs/fontconfig-2.15.0
```
Why would `70-no-bitmaps` become enabled though, I don't know yet - ebuild itself doesn't seem to have anything related coded ![Surprised :o](images/smiles/icon_surprised.gif) _________________ Gentoo since 2004. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
flexibeast Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 04 Apr 2022 Posts: 488 Location: Naarm/Melbourne, Australia
|
Posted: Thu Jan 30, 2025 11:09 pm Post subject: |
|
|
lkraav wrote: | Why would `70-no-bitmaps` become enabled though, I don't know yet - ebuild itself doesn't seem to have anything related coded ![Surprised :o](images/smiles/icon_surprised.gif) |
Assuming you (or something else) hasn't enabled it via `eselect fontconfig`, is there a file in ~/.config/fontconfig/ (e.g. fonts.conf) that enables it? _________________ https://wiki.gentoo.org/wiki/User:Flexibeast |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|