Dunst: UTF8 issues with spaces after symbols

Created on 9 Sep 2016  ·  11Comments  ·  Source: dunst-project/dunst

dunst

As seen in the image, if I encode a UTF8 symbol with a space after it, I get a weird symbol displayed.
This does not occur if I use a tab character directly after it.
This does not happen in my terminal or anywhere else AFAIK.

This may be me misunderstanding something, but I figured I'd be better off asking first.

Bug unconfirmed

All 11 comments

I can't reproduce this, what version are you running?
Does it still happen with HEAD?

That's most likely a font issue

Pulled latest from master.
Issue persists.

I have the ionicons font installed, but I don't see this issue anywhere else, so I'm not sure what may be the case.
Example

notify-send " test"

test

And for verbosity, what I see (on GitHub):

comparison

If I pango the space in any way, the problem does not occur.
E.g <b> </b>test is fine

Still happens in 1.2.0, to reproduce exactly, use ttf-ionicons and the above text.

I can reproduce this but I'm afraid this is a font limitation rather than a bug. You see some font icons if not most come with one font-weight variant which is usually normal. So the problem seems to arise when one has <b> (bold) tags on dunst format configuration which is a different font-weight (i.e bold) than the one supported by the font. The obvious solution would be to drop the bold tags or find a font icon that supports bold font-weight. But there's something else we can do, we can change the font-weight using pango markup, like this:
notify-send "<span font_weight='normal'></span>test"
Note the single quotes inside or you could escape the double quotes this way:
notify-send "<span font_weight=\"normal\"></span>test"

This should work as a workaround, could you confirm @dcousens ?

Just for the record same may go for other properties like using italics in which case one would also need to modify font_style='normal' or what the font supports. In my case your example was showing another icon for some reason (perhaps from another font) but specifying the font_family worked though:
notify-send "<span font_weight='normal' font_family='Ionicons'></span>test"

The obvious solution would be to drop the bold tags

The bold tags, for me, were a resolution, not the issue? I typically don't use pango/formatting.
E.g

notify-send "<b> </b>test"

Compared to

notify-send " test"

However, your explanation is sensible and I'm happy to close this issue as resolved if you are :+1: . Plenty of work-arounds available.
Thanks for the investigation!

The bold tags, for me, were a resolution, not the issue? I typically don't use pango/formatting.

By that i meant the bold tags inside dunst configuration on the format option which i assume is what is causing the problem.

However, your explanation is sensible and I'm happy to close this issue as resolved if you are 👍 . Plenty of work-arounds available.
Thanks for the investigation!

Unfortunately there's not much we can do from our side as it depends on the font. I'll close this issue then, feel free to comment if need be.

    format = "%s\n\n%b"

That is my format option?
plain_text = yes and/or markup = no doesn't change the situation.

That is my format option?
plain_text = yes and/or markup = no doesn't change the situation.

I can't reproduce the issue with that format regardless of how i set the markup option, that's why i assumed you had bold tags in it. Can you paste the output of dunst -print after you send that notification?. Also could you test if this happens with another font icon besides Ionicons (for example fontawesome)?.

Could not reproduce using otf-font-awesome.
Could not reproduce using ttf-font-awesome.

Reproduced using ttf-octicons.

Sigh, no idea of the implications.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kaligule picture Kaligule  ·  5Comments

progandy picture progandy  ·  6Comments

phuhl picture phuhl  ·  3Comments

Anachron picture Anachron  ·  4Comments

wpovell picture wpovell  ·  5Comments