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.
|
|
We don't use exceptions, attribute(cleanup) or similar techniques, so such sections just add up to binary size.
|
|
|
|
|
|
|
|
|
|
I now understand how this was supposed to be done.
|
|
|
|
The main change is that we now always have to set up the dummy surface
which was previously only used when multiple monitors were present. This
is because there's no way to determine an output's fractional scale
factor without displaying a surface on it, and we need to know the scale
factor before we create our main window surface.
The extra compositor round-trips lead to a slight slowdown for single
monitor setups (to the same speed as multi-monitor setups), but it's
currently unavoidable as far as I know.
|
|
|
|
This is the next step in supporting fractional scaling, as
wl_surface_set_buffer_scale only supports integer scale factors.
|
|
|
|
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.
|
|
|
|
|
|
This allows rounded background corners to work when a padding of -1 is
specified.
|
|
|
|
|
|
This turned out to be much more complex than anticipated, and the
potential for bugs is therefore quite high.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously, string vectors were built by reading input line-by line, and
multiple copies of string vectors were made when searching.
Now, input is read into one big buffer, and string vectors only contain
references to the strings in this buffer. This both speeds up reading of
input, and avoids unnecessary copying of strings in various places.
The main downside currently is that input read from stdin is no longer
UTF-8 normalised. This means, for example, that a search for `e` won't
necessarily match `é`. Normalisation is very slow relative to the rest
of tofi, however, and not needed for most use-cases. This could either
be solved by accepting the slowdown, or making this an option, such as
--unicode or --unicode-normalize.
|
|
|
|
|
|
|
|
|
|
We can assume that string vectors generated by tofi are already
normalised, so don't waste time normalising them again.
Also make sure to validate strings from the user.
|
|
Also fix a potential segfault in character parsing found by AFLplusplus.
|
|
|
|
|
|
Each piece of text is now individually themable, with foreground and
background colours and optionally rounded background corners.
|
|
The list was getting far too long, and is about to get even longer with
text styling options. The user is instead directed to the manpage.
Also, don't print usage to stderr if `-h` was passed.
|
|
This change avoids warning about old compositors on newer versions of
Sway. Sway never actually supported version 4, and recently changed to
report only version 3 as supported.
|
|
|