Age | Commit message (Collapse) | Author |
|
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.
|
|
We don't actually need a separate pango layout for each piece of text,
as we only use them one-by-one anyway, so just use one instead.
|
|
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.
|