Age | Commit message (Collapse) | Author |
|
I had misunderstood the purpose of the OpenType line gap field 'hlgp'. I
thought this was a suggested total line spacing, but it's actually extra
spacing to be added to (ascender - descender).
|
|
This was broken in the recent changes to allow fractional scaling, as a
calculation hadn't been updated.
|
|
Instead of scaling various theme parameters ourselves, just set the
scale in Cairo. This shouldn't result in any visible changes, but lays
the ground work for fractional scaling support.
|
|
|
|
|
|
Also improve text on non-hidpi screens.
|
|
Tofi now uses Harfbuzz if a file is passed to --font-name, and Pango
otherwise.
|
|
The scale factor is now only used to scale font sizes, not all Cairo
drawing operations. This makes pixel-sized options correct.
|
|
|
|
By pointing Cairo at the mmap-ed file used to create wl_shm buffers, we
can eliminate a memcpy() on every draw, providing a decent speedup
(especially for large window sizes).
This comes at the expense of having to keep track of two Cairo contexts,
one for each of our two buffers used for double buffering. Additionally,
a single memcpy() is still required for initialisation of the second
buffer, so the startup latency isn't affected much.
|
|
Another source of slow startup is initialising Pango. If the user
supplies a ttf file, we can skip any Pango stuff and use Harfbuzz
directly with Cairo to do our font rendering, providing a large speedup.
|