LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.63k stars 194 forks source link

font name handling #80

Closed Evolution0 closed 9 years ago

Evolution0 commented 10 years ago

If a font has "," in its name it will get treated as a seperator between fonts no matter what you do to escape it.

Example: bar -f '--terminusmod,icons-medium--normal--12-------'

Returns: Could not load font -*-terminusmod

Tried single quotes, double quotes, and backslashes.

The same font worked fine in the old config.def.h.

Edit: I see the issue lies in the fact that strtok does not understand escapes.

LemonBoy commented 10 years ago

This is a serious issue, are commas allowed in font names by other programs ?

Evolution0 commented 10 years ago

urxvt doesn't seem to allow it either and escaping didn't work as well.

Seeing as bar isn't the only one to reject it and almost no other fonts have a comma in their name I suppose it isn't as important.

I was able to use the font by switching to a space delimiter, I tried ", " but that seemed to not be acceptable.

s-ol commented 9 years ago

No other place to ask: how do I even get it to load non-"xfontesel-fonts" (idk much about X-Fonts).

I can only get it to load .pcf files via the x name (-...-...-...-...-) but no TTFs etc, even if they are installed for Xorg.