Open sillysloft opened 7 years ago
in which revision of fluxbox does this happen?
Original comment by: akir
commit bdfaaa0e173ad63e64c1166c0b524e1639ced12f Author: Petr Vorel petr.vorel@gmail.com Date: Fri Feb 24 13:09:58 2017 +0100
Original comment by: ge0rg
ah, sorry … those who are able to read "1.3.7 as well as latest git master". ok, i'll see what can be done. having a textWidth() resulting in 0 is really really strange. the crash following textWidth() == 0 comes naturally. but why the font renders "WW" as something which is 0 pixels wide ... maybe the font does not contain the proper glyphs. mhh.
Original comment by: akir
Maybe a bad combination of old (Debian SID) font libraries and a new font? Maybe something wrong in my font config? For reference, here the fonts.conf file in full:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Make Emoji One Color the initial fallback font for sans-serif, sans, and monospace.
-->
<match>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Emoji One Color</string>
</edit>
</match>
<match>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Emoji One Color</string>
</edit>
</match>
<match>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Emoji One Color</string>
</edit>
</match>
<match>
<test name="family"><string>Apple Color Emoji</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Emoji One Color</string>
</edit>
</match>
</fontconfig>
Original comment by: ge0rg
yah, it might be a bad config. but that does not solve the problem: we use "WW" as a "pretty wide character" to find out how many pixels a given font might consume or rather, how many glyphs might fit into the 0x8000 pixels (0x8000 is the max-width of x11 - because of "short") ... anyway, if "WW" is something "small" in some fonts, it's a bad signal anyway. i wonder, which other "sample" text we could use to detect the max-length...
Original comment by: akir
Leaving aside that the division should be guarded, the sublying problem will not resolve w/o handling fallback fonts. The Emoji thing really has no glyphs on the ASCII codepoints (and is thus btw. hardly usable for fluxbox cases anyway?)
See https://sourceforge.net/p/fluxbox/feature-requests/210/ https://sourceforge.net/p/fluxbox/bugs/1066/
Original comment by: baghira-style
When starting up fluxbox with the Emoji Color One font installed and enabled in fonts.conf with a config similar to https://github.com/eosrei/emojione-color-font/issues/17#issuecomment-196067631, fluxbox (1.3.7 as well as latest git master) will crash:
stacktrace from gdb indicates that it tries to divide by zero:
Relevant source code:
Reported by: ge0rg