dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.57k stars 340 forks source link

Multiple fonts not working together #1211

Closed kalirosenkreuz closed 7 months ago

kalirosenkreuz commented 11 months ago

Issue description

I want to use a symbol font together with a text font for notifications. If I put the fonts in the order: font = "mononoki 8, Material Icons 8" Text does not show up at all, only the icons. However, the order: font = "Material Icons 8, mononoki 8" Has the opposite problem: icons will not show up at all. I'm unsure what could be causing this.

Installation info

kalirosenkreuz commented 11 months ago

"Fixed" the issue by merging the fonts in FontForge, but still unsure why this is happening.

bynect commented 11 months ago

I have the same problem with fontawesome. I think that it's related to the way pango loads fonts. Needs further investigation

bynect commented 11 months ago

Pango cairo seems to support loading only one font at a time. I made a pr for font fallback that should mitigate this (given that fontconfig is correctly configured). Alternatively specifying which font to use with pango markup should also work

fwsmit commented 7 months ago

This should be mostly fixed with #1222. Are there any issues remaining?

bynect commented 7 months ago

I have looked more into it, and this seems by design. Pango is made so that if you want to use multiple fonts you have to specify the fallbacks with fontconfig and they will be used as necessary, so that the font is not chosen at the application level but globally.

I will close this as we can't really do anything else without abandoning pango