dunst-project / dunst

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

Enable pango font fallback #1222

Closed bynect closed 5 months ago

bynect commented 9 months ago

This is a simple addition to text rendering that allows fallback fonts. This improved my experience with #1211 when using a monospace with font awesome glyphs.

However this is not a complete solution! The problem with multiple fonts is in pango design. It allows only one font to be loaded when rendering. In this patch I simply add the pango attribute for font fallback.

bynect commented 9 months ago

I just noticed that my editor removed some space 😅

bynect commented 8 months ago

Looking back at it, I am quite at loss as to why the ci failed

fwsmit commented 6 months ago

Looking back at it, I am quite at loss as to why the ci failed

It seems the test failed because of some other reason. Pushing some code should re-run the test (I cannot find the button to re-run).

fwsmit commented 6 months ago

Does it fallback to the second font in the list or to some other font on the system? It should fallback to the second font in the system, but I'm not sure why that's not happening. Do you have an idea?

bynect commented 6 months ago

Does it fallback to the second font in the list or to some other font on the system? It should fallback to the second font in the system, but I'm not sure why that's not happening. Do you have an idea?

According to pango docs it should fallback using system font settings (so ignoring the given font list). But it seems like this works only on supported systems (fontconfig and maybe others).

fwsmit commented 6 months ago

@bynect could you push this branch, so the CI runs again? You might need to make a small change, which you can revert afterwards.

bynect commented 6 months ago

@fwsmit I removed the change in the bar code and force pushed

codecov-commenter commented 6 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (19865c0) 66.03% compared to head (0d9c9d5) 65.43%. Report is 45 commits behind head on master.

Files Patch % Lines
src/draw.c 20.00% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1222 +/- ## ========================================== - Coverage 66.03% 65.43% -0.60% ========================================== Files 46 46 Lines 7595 7753 +158 ========================================== + Hits 5015 5073 +58 - Misses 2580 2680 +100 ``` | [Flag](https://app.codecov.io/gh/dunst-project/dunst/pull/1222/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dunst-project) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dunst-project/dunst/pull/1222/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dunst-project) | `65.43% <20.00%> (-0.60%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dunst-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fwsmit commented 5 months ago

@fwsmit I removed the change in the bar code and force pushed

Thanks! The tests pass now, so I'll go ahead an merge!