Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fonts not working together #1211

Closed
kalirosenkreuz opened this issue Oct 17, 2023 · 5 comments
Closed

Multiple fonts not working together #1211

kalirosenkreuz opened this issue Oct 17, 2023 · 5 comments

Comments

@kalirosenkreuz
Copy link

kalirosenkreuz commented Oct 17, 2023

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

  • Version: <!-- output of dunst -v -->
    Dunst - A customizable and lightweight notification-daemon 1.9.2 (2023-04-20)
  • Install type: <!-- [package|manually|...] -->
    Package manager
  • Window manager / Desktop environment: <!-- -->
    i3-gaps
  • Distro: <!-- -->
    Void Linux
@kalirosenkreuz
Copy link
Author

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

@bynect
Copy link
Member

bynect commented Oct 25, 2023

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

@bynect
Copy link
Member

bynect commented Oct 28, 2023

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
Copy link
Member

fwsmit commented Feb 16, 2024

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

@bynect
Copy link
Member

bynect commented Mar 1, 2024

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

@bynect bynect closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants