-
Notifications
You must be signed in to change notification settings - Fork 71
Fallback Font, Custom Fonts, and Larger Checkbox
From: https://bugs.launchpad.net/zim/+bug/1327630
Problem: The files I work with are generally in the Latin alphabet, but occasionally also use some Chinese characters. Generally, Latin fonts don't have Chinese glyphs, and while Chinese fonts usually can show Latin letters as well, these are almost always too ugly. Thus, what I want is to use a nice font as a first choice for the Latin characters but if a glyph is not there, I want to make the editor fall back to another font so that I can still see what's written there. This isn't really documented anywhere directly but actually quite easy to achieve.
Solution: Edit the file %APPDATA%\zim\config\zim\style.conf (or Zim's program file path if using portable Zim) replacing "font=" with the following line:
[TextView] font=Caecilia,Arial Unicode MS 16
Where "Caecilia" is a nice font with a limited glyph set (first choice), "Arial Unicode MS" is an ugly font that has nearly all Unicode glyphs (fallback), and "16" is the font size.
Problem: You want a font not already in the custom font options.
Solution: Add your custom .tff font to FILEPATH\zim\config\zim
Edit the file FILEPATH\zim\config\zim\style.conf replacing "font=" with the name of the .tff. (e.g. If it is cool.tff, it becomes font=cool)
Restart Zim for it to take effect.
Problem: This probably only affects you if you meddle with the display size in the Control Panel. I'm on 1920x1080 with a 13.3" screen, so I need to make everything larger: I've upped it to 150% and in such setting the checkbox icon is ridiculously small. This was discussed before on the mailing list at https://lists.launchpad.net/zim-wiki/msg02188.html and the workaround mentioned involves editing the source by hand and recompiling. Actually, you don't need to do that.
Solution: Edit the file %ProgramFiles(x86)%\Zim Desktop Wiki\share\themes\MS-Windows\gtk-2.0\gtkrc and replace "gtk-icon-sizes =" with the following line:
gtk-icon-sizes = "gtk-menu=24,24:gtk-small-toolbar=32,32:gtk-large-toolbar=24,24:gtk-dnd=32,32"
Here I enlarged the checkbox (the "gtk-menu" setting) from 13 to 24 pixels, which I find to be the perfect size for me. This also has the side effect of enlarging the small icons next to some menu items but, again, 24 is the size they should've been all along, at least in my situation. While I was here I also doubled the size of the toolbar icons ("gtk-small-toolbar").