yakimka/CherryTomato

Tomato icon shows as empty box?

wilfredom opened this issue · 5 comments

Heya,

Thanks for the really cool app—it's become my timer of choice in Manjaro, given it's elegant simplicity and useful features ("Interrupt me" option is great with different workspaces).

Anyway, not sure how or when this started happening, but I'm not seeing the fancy tomato icon in the timer:

Screenshot from 2020-08-24 11-55-39

Is there a font or theme I have to install? I couldn't find any references to it on the page.

Hello, sorry for the delayed response.
This sounds like a problem with your fonts setup. You can try to solve it by creating\editing /etc/fonts/local.conf.

Mine looks like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <alias>
   <family>sans-serif</family>
   <prefer>
     <family>Noto Sans</family>
     <family>Symbola</family>
     <family>DejaVu Sans</family>
   </prefer> 
 </alias>

 <alias>
   <family>serif</family>
   <prefer>
     <family>Noto Serif</family>
     <family>Symbola</family>
     <family>DejaVu Serif</family>
   </prefer>
 </alias>

 <alias>
  <family>monospace</family>
  <prefer>
    <family>Noto Mono</family>
    <family>Symbola</family>
    <family>DejaVu Sans Mono</family>
   </prefer>
 </alias>
</fontconfig>

The key point here is:

    ...
    <family>Symbola</family>
    ...

This is a font with emojis (install it, if you don't have this font in your system). When system
won't find the glyph in your main font it will fallback to Symbola.

After editing /etc/fonts/local.conf run fc-cache and rerun CherryTomaro or reboot\relogin.

Thanks for your feedback. I appreciate it.

I find a better solution. Place this to $HOME/.config/fontconfig/fonts.conf:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
        <match target="pattern"> 
                <edit name="family" mode="append"> 
                <string>Symbola</string> 
                </edit> 
        </match> 
</fontconfig>

Or if you want color emojis (first install Noto Color Emoji font):

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
	<match target="font">
		<edit mode="assign" name="rgba">
		<const>rgb</const>
		</edit>
	</match>
	<match target="font">
		<edit mode="assign" name="hinting">
		<bool>true</bool>
		</edit>
	</match>
	<match target="font">
		<edit mode="assign" name="hintstyle">
		<const>hintfull</const>
		</edit>
	</match>
	<match target="font">
		<edit mode="assign" name="antialias">
		<bool>true</bool>
		</edit>
	</match>
	<match target="font">
		<edit mode="assign" name="lcdfilter">
		<const>lcddefault</const>
		</edit>
	</match>
	<match target="font">
		<edit name="autohint" mode="assign">
		<bool>false</bool>
		</edit>
	</match>
	<match target="pattern"> 
		<edit name="family" mode="prepend"> 
		<string>Noto Color Emoji</string> 
		</edit> 
	</match> 
</fontconfig>

Or if you want color emojis (first install Noto Color Emoji font):

Similar issue here, except that I have Apple Color Emoji installed. Adding this config file at $HOME/.config/fontconfig/fonts.conf (I'm running an Arch distro that doesn't seem to ship with one by default, neither in this location nor the earlier mentioned system-wide one), and changing <string>Noto Color Emoji</string> to <string>Apple Color Emoji</string> takes care of it.