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

Conky exit with "you don't need that many fonts" message #41

Closed
ghost opened this issue Jan 23, 2014 · 4 comments
Closed

Conky exit with "you don't need that many fonts" message #41

ghost opened this issue Jan 23, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 23, 2014

Depending of your configuration, sometimes Conky exit after a random time with the message "you don't need that many fonts, sorry". This occurs when Conky try to use more than 256 fonts (see fonts.c line 73).

Except if you really use more than 256 fonts, this is a bug occurs when you have fonts objects placed after a ${if} block.

Exemple :
${if_match ${upspeedf eth0} > 0}${color2}${endif} ${font PizzaDude Bullets:size=10}O${font}

In this case Conky will allocate too much fonts along the time. Each time the ${if} condition change (true -> false or false -> true) the index of the font object (stored in the "specials" array defined in specials.c) will change and conky will reallocate a new font object (specials.c, function new_font(), line 341). The reason is that s->font_added is set to zero because the font object has been shifted by -1 or +1 in the specials array.

There is a workaround to this issue, but really possible only if you have only a few objects in the ${if} block. The solution consist to add an ${else} block and pad it with dummy objects. Exactly the same number you have in the ${if} block !

${if_match ${upspeedf eth0} > 0}${color2}${else}${color1}${endif} ${font PizzaDude Bullets:size=10}O${font}

In this case Conky will not allocate extra fonts along the time.

I will try to work on a patch for this issue but help will be appreciate :)
And sorry for my English...

@damluk
Copy link

damluk commented May 1, 2014

Hi David, could you try https://github.com/damluk/conky/branches/1.9.1, please?

@ghost
Copy link
Author

ghost commented Jun 8, 2014

Hi Damluk
Apologies for the late answer. I will try it next week.

@Vincent-C
Copy link
Contributor

This should be fixed by PR #47 (consider closing this bug?).

@mswanson-me
Copy link
Collaborator

Is this issue confirmed to be resolved? If this problem is still outstanding, please update the issue. Otherwise, this issue will be closed in 2 weeks.

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