| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+253D
* U+253E
* U+253F
* U+2540
* U+2541
* U+2542
* U+2542
* U+2543
* U+2544
* U+2545
* U+2546
* U+2547
* U+2548
* U+2549
* U+254A
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+2535
* U+2536
* U+2537
* U+2538
* U+2539
* U+253A
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+252d
* U+252e
* U+252f
* U+2530
* U+2531
* U+2532
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+2525
* U+2526
* U+2527
* U+2528
* U+2529
* U+252A
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+251D
* U+251E
* U+251F
* U+2520
* U+2521
* U+2522
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* U+250D
* U+250E
* U+2511
* U+2512
* U+2515
* U+2516
* U+2519
* U+251A
|
| | | |
| | |
| | |
| | |
| | | |
All solid lines LIGHT/HEAVY line drawings implemented so far can be
implemented in terms of these.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2500
* 2502
* 250c
* 2510
* 2514
* 2518
* 251c
* 2524
* 252c
* 2534
* 253c
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* ‘term’ struct contains an array of 160 fcft glyph pointers
* the glyph pointers are lazily allocated when we need to draw a box
drawings character
* Filtering out box drawings characters is easy - they are (except
unicode 13, which isn’t handled yet )all in a single range.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When tweak.allow-overflowing-double-width-glyphs=yes, then certain
glyphs are allowed to overflow into the neighbouring cell.
However, if the cell “owning” the double-width glyph is erased (_only_
that cell), then the cell overflowed into is not redrawn, causing
part of the double-width glyph to remain on screen.
To avoid checking for these glyphs when printing to the terminal (i.e
at parse time), simply mark both cells as dirty when we render the
overflowing glyph.
Yes, this means that the cells will always be re-rendered. We count on
them only making up a small portion of the screen.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
programatically -> programmatically
|
| |\ \ \
| |/ /
|/| |
| | | |
Closes #259
|
| | | |
| | |
| | |
| | | |
Closes #259
|
| |/ / |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Shutdown the terminal when the client process terminates, not when the
ptmx file descriptor is closed.
This fixes an issue where the terminal remains running after the
client process has terminated, if it spawned child processes that
inherited the ptmx file descriptor.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
When calling ‘reaper_add()’, the caller can provide a callback. If
non-NULL, the reaper will call the callback to handle the actual
reaping.
If the callback is NULL, or if it returns false, the reaper reaps the
child process.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\| |
|
| | | |
|
| |\| |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.
|
| | |
| |
| |
| |
| | |
This simplifies the instructions. People interested in performance are
likely to know how to use it.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
We don't need any C18 specifics, so C11 is also fine and more widely
supported (i. e. in older clang versions).
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.
|
| | |
| |
| |
| |
| | |
This simplifies the instructions. People interested in performance are
likely to know how to use it.
|
| |\ \ |
|
| | | | |
|
| |/ / |
|
| | | |
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | | |
We don't need any C18 specifics, so C11 is also fine and more widely
supported (i. e. in older clang versions).
|
| |/ / |
|
| |\| |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
|
| | |
| |
| |
| | |
It’s “38:5:<idx>”, not “38:2:5:<idx>”.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using Python's own PRNG should make the code cleaner and allow for
reproducible stimulus files if that is desired via setting --seed (at
least for the same versions of the script, changing the kind and/or
order of the random calls will of course impact the output in the
future).
I did the following substitutions:
* rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n →
random.randrange(n)
* rand.read(1)[0] → random.randrange(256)
* rand.read(n) → [random.randrange(256) for _ in range(n)]
(better alternative would have been random.randbytes(n), but is only
available for Python >= 3.9, switching to this in the future will
impact output)
* list[rand.read(1) % len(list)] → random.choice(list)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.
The algorithm for pre-multiplying a color channel is:
alpha_divider = 0xffff / alpha
pre_mult_color = color / alpha_divider
In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.
That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.
The algorithm can be trivially converted to:
pre_mult_color = color * alpha / 0xffff
Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.
Closes #249
|
| | |
| |
| |
| | |
This fixes a build failure of pgo.o
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dependency chains:
* pgolib -> terminal.c -> terminal.h -> wayland.h
* vtlib -> csi.c -> config.h -> wayland.h
wayland.h includes <primary-selection-unstable-v1.h>, which must be
generated by a custom_target() rule *before* any sources that require
it are built. Failure to fully specify these dependencies can otherwise
result in a race condition, where a dependent source file gets compiled
(and fails with a "header not found" error) before the header itself
has been generated.
|
| | | |
|
| | |
| |
| |
| | |
DPI_AWARE_ON has been renamed to DPI_AWARE_YES
|
| | | |
|
| | |
| |
| |
| |
| | |
This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
|
| | |
| |
| |
| | |
It’s “38:5:<idx>”, not “38:2:5:<idx>”.
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using Python's own PRNG should make the code cleaner and allow for
reproducible stimulus files if that is desired via setting --seed (at
least for the same versions of the script, changing the kind and/or
order of the random calls will of course impact the output in the
future).
I did the following substitutions:
* rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n →
random.randrange(n)
* rand.read(1)[0] → random.randrange(256)
* rand.read(n) → [random.randrange(256) for _ in range(n)]
(better alternative would have been random.randbytes(n), but is only
available for Python >= 3.9, switching to this in the future will
impact output)
* list[rand.read(1) % len(list)] → random.choice(list)
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | | |
See: https://mesonbuild.com/Wrap-dependency-system-manual.html
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.
The algorithm for pre-multiplying a color channel is:
alpha_divider = 0xffff / alpha
pre_mult_color = color / alpha_divider
In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.
That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.
The algorithm can be trivially converted to:
pre_mult_color = color * alpha / 0xffff
Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.
Closes #249
|
| | | |
| | |
| | |
| | | |
This fixes a build failure of pgo.o
|
| | | | |
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Dependency chains:
* pgolib -> terminal.c -> terminal.h -> wayland.h
* vtlib -> csi.c -> config.h -> wayland.h
wayland.h includes <primary-selection-unstable-v1.h>, which must be
generated by a custom_target() rule *before* any sources that require
it are built. Failure to fully specify these dependencies can otherwise
result in a race condition, where a dependent source file gets compiled
(and fails with a "header not found" error) before the header itself
has been generated.
|
| |\ \ \ |
|
| | |/ / |
|
| |/ /
| |
| |
| | |
DPI_AWARE_ON has been renamed to DPI_AWARE_YES
|
| | | |
|
| |\| |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This extends the new ‘dpi-aware’ option with a new default value,
‘auto’.
When set to ‘auto’, fonts are sized using monitors’ DPI when output
scaling is disabled. When output scaling is enabled, fonts are instead
sized using the scaling factor.
The reasoning here is that a user that has enabled output scaling is
obviously *not* relying on DPI scaling.
Output scaling can also be a way to compensate for different viewing
distances, in which case we do *not* want to break that by using DPI
scaling.
Users can still force DPI-only font sizing by setting ‘dpi-aware=yes’,
or disable it completely by setting ‘dpi-aware=no’.
|
| |\ \
| | |
| | |
| | | |
Closes #242
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
* hs - boolean, signals status line availability
* tsl - to_status_line: begin an OSC 2 sequence (set window title)
* fsl - from_status_line: OSC terminator
* dsl - disable status line: \E]2;\E\\ - clears the window title
Closes #242
|
| |\ \
| |/
|/| |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take ‘\E(#0’ for example - this is *not* the same as ‘\E(0’.
Up until now, foot has however treated them as the same escape,
because the handler for ‘\E(0’ didn’t verify there weren’t any _other_
private characters present.
Fix this by turning the ‘private’ array into a single 4-byte
integer. This allows us to match *all* privates with a single
comparison.
Private characters are added to the LSB first, and MSB last. This
means we can check for single privates in pretty much the same way as
before:
switch (term->vt.private) {
case ‘?’:
...
break;
}
Checking for two (or more) is much uglier, but foot only supports
a *single* escape with two privates, and no escapes with three or
more:
switch (term->vt.private) {
case 0x243f: /* ‘?$’ */
...
break;
}
The ‘clear’ action remains simple (and fast), with a single write
operation.
Collecting privates is potentially _slightly_ more complex than
before; we now need mask and compare, instead of simply comparing,
when checking how many privates we already have.
We _could_ add a counter, which would make collecting privates easier,
but this would add an additional write to the ‘clean’ action which is
really bad since it’s in the hot path.
|