bugfix: set toc/bookmark window dimension smaller than screen size
Otherwise if text widgets in toc window expands out of screen, memory
free on these widgets will mess up the heap. It sounds ridiculous but
after we restrict toc window well inside the screen the bug in #815
is fixed.
add standalone glyph cache
I found it will be especially helpful to cache glyph separately
so that glyph caches won't be washed out by a single page cache.
Merge pull request #820 from chrox/toc_crash_fix

bugfix: set toc/bookmark window dimension smaller than screen size to fix Toc crash in #815