summaryrefslogtreecommitdiff
path: root/src/entry_backend/pango.c
AgeCommit message (Collapse)Author
2022-07-29Redraw prompt each frame.Phil Jones
This fixes some slanted fonts being cut off if they extend back towards the prompt too far.
2022-07-26Add automatic detection of number of results.Phil Jones
Tofi will now try to autodetect how many results can be drawn if --num-results=0 is specified, which is now the default.
2022-07-05Sort results by match position.Phil Jones
Search results will now be sorted by history first, then by the position of the match, such that a match at the start of a result will appear before a match later in the result.
2022-06-26Add optional background around selected result.Phil Jones
2022-06-26Remove spurious debug log.Phil Jones
2022-06-25Don't double-draw background colour on first draw.Phil Jones
This improves start-up performance for large windows.
2022-06-25Fix padding and split into top/bottom/left/right.Phil Jones
2022-06-24Horizontal mode fixes.Phil Jones
Implement horizontal mode for Pango, and add min-input-width option.
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-23Add tofi-run symlink.Phil Jones
Invoking 'tofi' now acts like dmenu, expecting newline-separated options on stdin. Also fix history file handling and add an option to disable it.
2022-06-21Add result selection.Phil Jones
2022-06-21Add config file handling.Phil Jones
Single letter style arguments have been removed.
2022-06-21Add various command line arguments.Phil Jones
There are too many really to use single-character args, so the next step should be a config file.
2022-06-10Various small changes.Phil Jones
- Split the compgen and history sorting parts of compgen(), for future dmenu-like work. - Add a separate tofi-compgen executable. - Remove harfbuzz-glib usage, as we shouldn't be doing any complicated unicode stuff.
2022-06-10Space Pango lines correctly.Phil Jones
2022-06-10Remove unneeded Pango layouts.Phil Jones
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.
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.