Zim

Fallback Font & Larger Checkbox - Solutions

Bug #1327630 reported by Piotr Szczepański
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Invalid
Undecided
Unassigned

Bug Description

Hi,

First of all, thanks for the great piece of software!

This isn't really a bug report. I'd like to share solutions to two separate issues I ran into. Hopefully if I post it here it can be googled and will save someone some time in the future. This is for with Zim 0.60 on Windows 8 (64-bit) but can probably be adapted for other environments.

Issue #1: Fallback font, or using multiple fonts in editor

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 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.

Issue #2: Increasing checkbox size without editing the source

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").

I'm attaching a screenshot to illustrate what this is all about.
Keep up the good work!

Revision history for this message
Piotr Szczepański (pioszcz) wrote :
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :
Changed in zim:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.