summaryrefslogtreecommitdiff
path: root/src/entry_backend/harfbuzz.h
AgeCommit message (Collapse)Author
2023-04-10Fix broken line spacing with some fonts.Phil Jones
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).
2023-03-16Fix selection background for Harfbuzz backend.Phil Jones
This was broken in the recent changes to allow fractional scaling, as a calculation hadn't been updated.
2023-02-28Convert to using Cairo scale.Phil Jones
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.
2022-11-21Add --font-variations option.Phil Jones
2022-11-20Add --font-features option.Phil Jones
2022-06-25Add option to disable font hinting.Phil Jones
Also improve text on non-hidpi screens.
2022-06-23Combine Harfbuzz & Pango backends.Phil Jones
Tofi now uses Harfbuzz if a file is passed to --font-name, and Pango otherwise.
2022-06-23Remove Cairo scale factor.Phil Jones
The scale factor is now only used to scale font sizes, not all Cairo drawing operations. This makes pixel-sized options correct.
2022-06-10Minor cleanup.Phil Jones
2022-06-10Avoid an unnecessary copy of the image buffer.Phil Jones
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.
2022-06-09Add Harfbuzz backend.Phil Jones
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.