Commit graph

105 commits

Author SHA1 Message Date
Daniel Eklöf
c2a58451e0
meson/pkgbuild: bump to 1.4.2 2020-07-23 18:51:48 +02:00
Daniel Eklöf
b238443a71
meson/pkgbuild: bump version to 1.4.1 2020-07-22 20:03:48 +02:00
Daniel Eklöf
591829bf50
meson/pkgbuild: bump version to 1.4.0, require fcft 2.2.2 2020-07-22 18:59:36 +02:00
Daniel Eklöf
9cdccdd2ac
term: break out fork+exec functionality to a separate file 2020-07-15 12:39:10 +02:00
Daniel Eklöf
aafa120f92
selection: refactor: break out text extraction to a separate file 2020-07-15 11:19:18 +02:00
Daniel Eklöf
bd0a003a4c
meson/PKGBUILD: bump fcft requirement to 2.2.0 2020-07-07 11:57:07 +02:00
Daniel Eklöf
69e4213e4a
term: don't use deprecated fcft_size_adjust()
When resizing the font on-the-fly, we now do a complete
font-reload (this is basically what fcft_size_adjust() did anyway).

To get the correct size, we maintain the current size ourselves.

We get the initial size from the user-provided font pattern, by
converting the string to an FcPattern, and using FcPatternGet() to
retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These
attributes are then removed from the pattern, and the pattern is
converted back to a string.

The terminal struct maintains a copy of the font sizes. These are
initially set to the sizes from the config.

When the user resizes the font, the terminal-local sizes are
adjusted. To ensure the primary and user-configured fallback fonts are
resizes equally much, convert any pixel sizes to point sizes at this
point.

When the font size is reset, we reload the font sizes from the
config (thus once again returning actual pixel-sizes, if that's what
the user has configured).
2020-07-07 10:44:55 +02:00
Lennard Hofmann
6b889564f7 Add logo, fixes #27
The SVG can be scaled to any size, thus we only provide the "minimum" of
PNGs as specified by XDG, see "Installing Application Icons" in
https://specifications.freedesktop.org/icon-theme-spec/
2020-06-27 21:23:50 +02:00
Daniel Eklöf
5ff9bd5c9d
meson/PKGBUILD: require fcft 2.1.1
We really want that ÖCD RGB/BGR fix...
2020-06-02 19:53:15 +02:00
Daniel Eklöf
a324004fdb
meson: don't set -Wno-missing-profile
We don't do PGO by default
2020-05-25 21:15:17 +02:00
Daniel Eklöf
8bf8a12362
meson: -fprofile-correction is automatically added by meson 2020-05-25 19:42:47 +02:00
Daniel Eklöf
f49742ebba
reaper: new module, uses a signalfd to wait() on child processes
Use a signalfd to listen for SIGCHLD signals.

When we receive a SIGCHLD over the signalfd, reap all dead children by
looping over all registered child PIDs and call waitpid(WNOHANG) on
them.
2020-05-21 20:15:10 +02:00
Daniel Eklöf
98fde56c51
meson: add -fprofile-correction 2020-05-21 18:01:53 +02:00
Daniel Eklöf
3ed177bb39
meson/PKGBUILD: bump version to 1.3.0 2020-05-13 13:10:08 +02:00
Daniel Eklöf
00df12f1a3
unicode-combine: simplify - remove -Dunicode-precompose option
Since the pre-composing functionality is now part of fcft, it makes
little sense to have a compile time option - there's no size benefit
to be had.

Furthermore, virtually all terminal emulators do
pre-composing (alacritty being an exception), this really isn't that
controversial.
2020-05-10 17:10:33 +02:00
Daniel Eklöf
cce76909c4
meson/PKGBUILD: we now require fcft-2.1.0 2020-05-09 12:06:11 +02:00
Daniel Eklöf
718ba1602a
meson: explicitly define _POSIX_C_SOURCE 2020-05-09 12:06:11 +02:00
Daniel Eklöf
b1b32152c1
unicode-precompose: use fcft's precompose functionality
This allows us more options when determining whether to use a
pre-composed character or not:

We now only use the pre-composed character if it's from the primary
font, or if at least one of the base or combining characters are from
a fallback font.

I.e. use glyphs from the primary font if possible. But, if one or more
of the decomposed glyphs are from a fallback font, use the
pre-composed character anyway.
2020-05-09 12:06:11 +02:00
Daniel Eklöf
728db1df0e
meson: use find_program() to find 'tic' 2020-05-03 16:39:10 +02:00
Daniel Eklöf
62e0774319
unicode-combining: store seen combining chains "globally" in the term struct
Instead of storing combining data per cell, realize that most
combinations are re-occurring and that there's lots of available space
left in the unicode range, and store seen base+combining combinations
chains in a per-terminal array.

When we encounter a combining character, we first try to pre-compose,
like before. If that fails, we then search for the current
base+combining combo in the list of previously seen combinations. If
not found there either, we allocate a new combo and add it to the
list. Regardless, the result is an index into this array. We store
this index, offsetted by COMB_CHARS_LO=0x40000000ul in the cell.

When rendering, we need to check if the cell character is a plain
character, or if it's a composed character (identified by checking if
the cell character is >= COMB_CHARS_LO).

Then we render the grapheme pretty much like before.
2020-05-03 11:03:22 +02:00
Daniel Eklöf
804642580e
meson: don't generate pre-compose table when -Dunicode-precompose=false 2020-05-02 18:43:13 +02:00
Daniel Eklöf
d8ebed0ee0
meson: only define FOOT_UNICODE_PRECOMPOSE if combining chars > 0 2020-05-02 18:42:47 +02:00
Daniel Eklöf
265a88c1ce
meson: generate unicode compose table
This replaces the pre-generated table used up until now.
2020-05-02 18:29:39 +02:00
Daniel Eklöf
d945b68b73
unicode-combine: remove utf8proc dependency
We only used utf8proc to try to pre-compose a glyph from a base and
combining character.

We can do this ourselves by using a pre-compiled table of valid
pre-compositions. This table isn't _that_ big, and binary searching it
is fast.

That is, for a very small amount of code, and not too much extra RO
data, we can get rid of the utf8proc dependency.
2020-05-02 17:29:00 +02:00
Daniel Eklöf
a6cd151cc7
meson: emit a 'summary()' at the end 2020-05-01 12:32:10 +02:00
Daniel Eklöf
4283a8c51b
utf8: add support for unicode combining characters
This feature lets foot combine e.g. "a\u0301" to "á".

We first check if the current character (that we're about to print) is
a combining character, by checking if it's in one of the following
ranges:

* Combining Diacritical Marks (0300–036F), since version 1.0, with
  modifications in subsequent versions down to 4.1
* Combining Diacritical Marks Extended (1AB0–1AFF), version 7.0
* Combining Diacritical Marks Supplement (1DC0–1DFF), versions 4.1 to 5.2
* Combining Diacritical Marks for Symbols (20D0–20FF), since version
  1.0, with modifications in subsequent versions down to 5.1
* Combining Half Marks (FE20–FE2F), versions 1.0, with modifications
  in subsequent versions down to 8.0

If it is, we check if the last cell appears to contain a valid symbol,
and if so, we attempt to compose (combine) the last cell with the
current character, using utf8proc.

If the result is a combined character, we replace the content in the
previous cell with the new, combined character.

Thus, if you select and copy the printed character, you would get
e.g. "\u00e1" instead of "a\u0301".

This feature can be disabled. By default, it is enabled if the
utf8proc library is found, but can be explicitly disabled, or enabled,
with 'meson -Dunicode-combining=disabled|enabled'.
2020-04-27 12:13:30 +02:00
Daniel Eklöf
d959b98822
meson: bump C standard to c18 2020-04-26 19:39:08 +02:00
Daniel Eklöf
c82378863c
meson: dependency: use fallback without variable name
Now that both tllist and fcft use meson.override_dependency(), we can
use the simpler form of fallback in our dependency call().

This requires meson >= 0.53, tllist >= 1.0.1 and fcft >= 2.0.0
2020-04-24 20:32:37 +02:00
Daniel Eklöf
c5212694c1
meson: we now require fcft 2.0.x 2020-04-23 11:24:54 +02:00
Daniel Eklöf
f54657569b
meson: don't set -fno-stack-protector
Disabling the stack protection is generally bad, and I can't measure
any performance drops with it enabled.
2020-04-04 14:41:43 +02:00
Daniel Eklöf
cc9337721b
meson/PKGBUILD: bump version to 1.2.3 2020-03-15 11:28:01 +01:00
Daniel Eklöf
07002bb941
meson/PKGBUILD/changelog: bump to 1.2.1 2020-03-06 21:21:34 +01:00
Daniel Eklöf
4c56c8c63d
meson/PKGBUILD/changelog: prepare for 1.2.0 2020-03-06 20:11:50 +01:00
Daniel Eklöf
b6f8a2e422
search: enable/disable weston sub-surface desync quirk when rendering search box 2020-03-01 13:06:00 +01:00
Daniel Eklöf
f96eb5ff07
sixel: add HLS color format support 2020-02-22 21:18:55 +01:00
Daniel Eklöf
9e3bfb1eab
sixel: initial support
This implements basic parsing of sixel data. Lots of limitations and
temporary solutions as this is still work-in-progress:

* Maximum image size hardcoded to 800x800
* No HLS color format support
* Image is always rendered at 0x0 in the terminal
2020-02-21 21:53:23 +01:00
Daniel Eklöf
3073b88d09
meson: always disable stack-protector and enable strict-aliasing 2020-02-16 14:40:15 +01:00
Daniel Eklöf
3e6321155e
meson: strip build relative paths from file macros 2020-02-16 14:40:02 +01:00
Daniel Eklöf
ac11909f80
meson/PKGBUILD: adjust fcft requirements; the new version is 1.1.1 2020-02-09 11:05:59 +01:00
Daniel Eklöf
a96341368d
meson/PKGBUILD: bump fcft required version to 1.2.0 2020-02-08 14:10:18 +01:00
Daniel Eklöf
31baf334b3
fcft: update to 1.1.0 2020-02-01 20:20:22 +01:00
Daniel Eklöf
506c1da390
desktop: add foot-server.desktop - launches a foot server instance 2020-01-24 22:27:11 +01:00
Daniel Eklöf
767a0ec232
fcft: update to 1.0.0
Allow/disallow subpixel antialiasing in font_glyph_for_wc(), not using
font_enable_subpixel_antialias().
2020-01-19 12:44:21 +01:00
Daniel Eklöf
15ef3ecfad
meson/PKGBUILD: need fcft >= 0.4.3 to configure subpixel antialiasing 2020-01-18 19:58:50 +01:00
Daniel Eklöf
9567b29d1e
meson/PKGBUILD: bump version to 1.1.0 2020-01-15 14:22:01 +01:00
Daniel Eklöf
5a6cbb8c3e
dcs: initial handling of DCS in general
Add data structure to term->vt. This structure tracks the free-form
data that is passed-through, and the handler to call at the end.

Intermediates and parameters are collected by the normal VT
parser. Then, when we enter the passthrough state, we call dcs_hook().

This function checks the intermediate(s) and parameters, and selects
the appropriate unhook handler (and optionally does some execution
already).

In passthrough mode, we simply append strings to an internal
buffer. This might have to be changed in the future, if we need to
support a DCS that needs to execute as we go.

In unhook (i.e. when the DCS is terminated), we execute the unhook
handler.

As a proof-of-concept, handlers for BSU/ESU (Begin/End Synchronized
Update) has been added (but are left unimplemented).
2020-01-12 11:55:22 +01:00
Daniel Eklöf
5a07419096
wayland: optionally use the presentation time protocol to measure input lag
This adds a flag, -p,--presentation-timings, that enables input lag
measuring using the presentation time Wayland protocol.

When enabled, we store a timestamp when we *send* a key to the
slave. Then, when we commit a frame for rendering to the compositor,
we request presentation feedback. We also store a timestamp for when
the frame was committed.

The 'presented' callback then looks at the input and commit
timestamps, and compares it with the presented timestamp.

The delay is logged at INFO when the delay was less than one frame
interval, at WARN when it was one frame interval, and at ERR when it
was two or more frame intervals.

We also update statistic counters that we log when foot is shut down.
2019-12-31 15:39:40 +01:00
Daniel Eklöf
0e2219daa9
PKGBUILD/meson: bump version to 1.0.0 2019-12-15 12:43:46 +01:00
Daniel Eklöf
5cd8af44c6
meson: we now require -lm 2019-12-05 19:35:54 +01:00
Daniel Eklöf
cbef66ac07
meson: require fcft 0.4.x 2019-12-05 19:33:31 +01:00