Commit graph

132 commits

Author SHA1 Message Date
Daniel Eklöf
5ee9c19d21
meson: link ‘pgo’ with -lm and -pthreads 2020-11-22 19:28:54 +01:00
Daniel Eklöf
9e37d811e8
meson: move log.{c,h} to ‘misc’ 2020-11-22 19:28:53 +01:00
Daniel Eklöf
0e83732162
meson: add ‘version.h’ to vtlib 2020-11-22 19:28:53 +01:00
Daniel Eklöf
bff07b09b9
meson: vtlib: add missing ‘fcft’ dependecy 2020-11-22 19:28:53 +01:00
Daniel Eklöf
bf8c82c79a
meson: add missing ‘tllist’ dependency to vtlib, pgolib and pgo 2020-11-22 19:28:53 +01:00
Daniel Eklöf
4577bb2bb3
wip: pgo without Wayland
* Split up source files into several static libraries: misc + vtlib
* Add a new executable, pgo, that links to vtlib
* pgo is kind of like a mock test:
  - provides stub implementations of functions not present in vtlib
  - sets up a dummy terminal instance
  - calls vt_from_slave() with static (pre-generated) content
2020-11-22 19:28:53 +01:00
Daniel Eklöf
fc81f413c0
client/server: simplify setup packet handling
Instead of writing (and logging errors for) every parameter, one at a
time, send all fixed size data in a single struct, followed by all the
variable length data.
2020-11-21 20:21:18 +01:00
Daniel Eklöf
e0297daa1f
hsl: add our own implementations of rgb-to-hsl and hsl-to-rgb
* New function: rgb_to_hsl()
* New function: hsl_to_rgb()
* Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb().
* Ensure hue/lum/sat values are within range before calling
  hsl_to_rgb()

Note that sixels’ use the following primary hues:

*  blue:  0°
*  red:   120
*  green: 240°

While “standard” HSL uses:

*  red:   0°
*  green: 120°
*  blue:  240°

Thus, we need to adjust the sixel’s hue value before calling
hsl_to_rgb().
2020-11-15 19:45:33 +01:00
Daniel Eklöf
6f28c16023
Merge branch 'releases/1.5' 2020-11-06 20:21:33 +01:00
Daniel Eklöf
90abdab345
meson/pkgbuild: bump version to 1.5.3 2020-11-06 20:16:27 +01:00
Daniel Eklöf
608cc746ad
uri: add uri_parse() - new function extracts components from an URI 2020-10-28 19:10:44 +01:00
Daniel Eklöf
f1e422b25a
meson/pkgbuild: bump version to 1.5.2 2020-10-13 08:04:37 +02:00
Daniel Eklöf
2f20550893
meson/pkgbuild: bump version to 1.5.1 2020-10-11 19:31:25 +02:00
Daniel Eklöf
bfe3dfaf5c
meson/pkgbuild: bump version to 1.5.0 2020-09-18 21:23:27 +02:00
Daniel Eklöf
8dd358a8f4
meson/pkgbuild: bump fcft requirement to 2.3.0 2020-09-18 21:03:40 +02:00
Daniel Eklöf
0bba1edb9c
meson/pkgbuild: require fcft-2.2.90 2020-09-15 08:03:52 +02:00
Daniel Eklöf
51a7e44fa2
config: add tweak.scaling-filter
Use the new fcft_set_scaling_filter() API to use a non-default scaling
filter.

By default, we use lanczo3, the ‘best’ filter. This overrides the
default in fcft, which is ‘cubic’ filtering.
2020-09-13 17:59:56 +02:00
Daniel Eklöf
5c4af880fc
doc: rename footrc.5 to foot.ini.5, and update references 2020-08-27 20:02:30 +02:00
Daniel Eklöf
8fb7347150
meson/pkgbuild: bump tllist requirement to 1.0.4
This is the first version of tllist that compiles with '-pedantic'.
2020-08-25 18:52:44 +02:00
Daniel Eklöf
a5e9ea7c28
meson: build with -pedantic 2020-08-23 10:07:09 +02:00
Craig Barnes
ce57bfa1ea meson: use "-fno-asynchronous-unwind-tables" for non-debug builds
This removes the DWARF stack unwinding tables, which shrinks the
".eh_frame" and ".eh_frame_hdr" sections by about 24KiB. Stack
unwinding tables are pretty useless to a C program compiled in
release mode.
2020-08-19 17:22:21 +01:00
Craig Barnes
7a77958ba2 Convert most dynamic allocations to use functions from xmalloc.h 2020-08-08 20:37:57 +01:00
Craig Barnes
f1fce96a1d config: handle allocation failure explicitly 2020-08-04 23:28:16 +01:00
Daniel Eklöf
f6533a71e4
user-notification: 'productify' the user-warning system
* Rename user_warning to user_notification
* Add warning and error types (in addition to the existing deprecated)
* Simplify logic when emitting a user notification after forking; we
  don't need to copy the notification data since we're in a new
  process and have total control over that memory.
2020-07-30 18:58:54 +02:00
Daniel Eklöf
6b22758f35
meson/pkgbuild: update version to 1.4.4 2020-07-29 07:02:43 +02:00
Daniel Eklöf
e71108d7c3
meson/pkgbuild: bump version to 1.4.3 2020-07-27 18:55:28 +02:00
Daniel Eklöf
373745c597
meson: install LICENSE, README.md and CHANGELOG.md 2020-07-25 09:05:11 +02:00
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