aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/PKGBUILD: bump version to 1.3.01.3.0releases/1.3Daniel Eklöf2020-05-13-2/+2
|
* changelog 1.3.0Daniel Eklöf2020-05-13-6/+3
|
* slave: configure pts to be the controlling terminal of the forked processDaniel Eklöf2020-05-13-0/+8
|
* Merge branch 'fcft-precompose'Daniel Eklöf2020-05-13-33920/+37
|\
| * unicode-combine: simplify - remove -Dunicode-precompose optionDaniel Eklöf2020-05-10-44/+7
| | | | | | | | | | | | | | | | | | | | 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.
| * readme: unicode-combining: mention when we render the decomposed versionDaniel Eklöf2020-05-09-0/+5
| |
| * meson/PKGBUILD: we now require fcft-2.1.0Daniel Eklöf2020-05-09-2/+2
| |
| * meson: explicitly define _POSIX_C_SOURCEDaniel Eklöf2020-05-09-1/+2
| |
| * unicode-precompose: use fcft's precompose functionalityDaniel Eklöf2020-05-09-33878/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | wayland: force-trigger a resize on 'configured' eventDaniel Eklöf2020-05-12-1/+2
| | | | | | | | | | | | | | | | | | This ensures we _always_ commit a **new** buffer in response to a configured event. This fixes an issue in Gnome where e.g. tiling the window (on the left/right side) only worked if that caused the windows size to change.
* | readme: use unicode RIGHT ARROW instead of '->'Daniel Eklöf2020-05-10-1/+1
| |
* | readme: short section describing the origins of the name 'foot'Daniel Eklöf2020-05-10-0/+18
| |
* | generate-unicode-precompose: /bin/sh is more standard than /usr/bin/shDaniel Eklöf2020-05-09-2/+2
|/ | | | | | | At the same time, fix `cut` command to pass filename last, as this is also more portable. Fixes build issues on e.g. Alpine Linux
* Revert "term: print: line-wrap multi-column characters instead of cutting them in half"Daniel Eklöf2020-05-09-6/+4
| | | | | | | This reverts commit 8448296bb3c0fa96f5af5cb7ec563bb0c7e99093. Applications need to be multi-column character aware anyway, and they should deal with this.
* term: print: line-wrap multi-column characters instead of cutting them in halfDaniel Eklöf2020-05-09-4/+6
|
* completions: zsh: complete command/shell, and its argumentsDaniel Eklöf2020-05-08-4/+8
|
* main/client: be POSIXLY_CORRECT when parsing command lineDaniel Eklöf2020-05-08-12/+15
| | | | | | | | | | | | | | | | | | | | This means command line parsing stops when it encounters the first nonoption argument. The result is that one no longer need to use '--' to ensure arguments are passed to the shell/command, instead of parsed by foot. That is, instead of foot -- sh -c true one can now do foot sh -c true Arguments to foot *must* go before the command: foot --fullscreen sh -c true
* term: don't register ptmx with FDM if we're shutting downDaniel Eklöf2020-05-04-2/+4
| | | | | This can happen when there's an error instantiating the terminal *after* we've spawned the slave process.
* term: set 'is_shutting_down' before calling term_destroy() on errorDaniel Eklöf2020-05-04-0/+1
|
* csi: ignore invalid parameters in 'CSI Ps <space> q'Daniel Eklöf2020-05-04-4/+10
| | | | | Before this patch, an invalid parameter would not change the cursor style, but could cause the cursor to start (or stop) blinking.
* term: check return value when instantiating thread synchronization primitivesDaniel Eklöf2020-05-04-4/+25
|
* meson: use find_program() to find 'tic'Daniel Eklöf2020-05-03-1/+2
|
* term: thrd_success isn't necessarily 0Daniel Eklöf2020-05-03-3/+3
|
* util: thrd_err_as_string: fix alignmentDaniel Eklöf2020-05-03-1/+1
|
* thrd_create(): handle errors correctlyDaniel Eklöf2020-05-03-13/+31
| | | | | | * Detect thrd_create() failures in all places where we instantiate threads * Log error correctl; thrd_create() does not return an errno value
* util: thrd_err_as_string(): new function, returns a thrd_*() error stringDaniel Eklöf2020-05-03-0/+18
|
* Merge branch 'space-optimize-combining-chars'Daniel Eklöf2020-05-03-115/+137
|\
| * unicode-combining: limit maximum number of allowed composed chainsDaniel Eklöf2020-05-03-5/+13
| |
| * unicode-combining: detect when we've reached the chain limitDaniel Eklöf2020-05-03-0/+14
| | | | | | | | | | | | | | | | | | | | | | We currently store up to 5 combining characters in any given base+combining chain. This adds a check for when that limit is about to be exceeded. When this happens, we log the chain + the new combining character. Since things will break anyway, we simply overwrite the last combining character.
| * changelog: update 'unicode comining' entry - only parts of the feature are optionalDaniel Eklöf2020-05-03-2/+3
| |
| * readme: update 'Unicode combining'Daniel Eklöf2020-05-03-21/+15
| |
| * unicode-combining: store seen combining chains "globally" in the term structDaniel Eklöf2020-05-03-92/+97
|/ | | | | | | | | | | | | | | | | | | | 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.
* osc: fix scaling of RGB formatted color specifiersDaniel Eklöf2020-05-02-4/+4
|
* osc: OSC 12: mimic xterm - a color value of 0 means use inverted fg/bgDaniel Eklöf2020-05-02-1/+6
|
* osc: fix 'OSC 12 ?' to return the cursor color, not the cursor text colorDaniel Eklöf2020-05-02-3/+5
|
* osc: fix scaling of legacy formatted color specifiersDaniel Eklöf2020-05-02-4/+4
|
* render: don't re-instantiate the foreground pixman sourceDaniel Eklöf2020-05-02-6/+5
|
* vt: use signed integers to correctly detect when we're doneDaniel Eklöf2020-05-02-2/+2
|
* readme: sligh re-wording of the "Unicode combining" chapterDaniel Eklöf2020-05-02-8/+9
|
* meson: don't generate pre-compose table when -Dunicode-precompose=falseDaniel Eklöf2020-05-02-6/+12
|
* meson: only define FOOT_UNICODE_PRECOMPOSE if combining chars > 0Daniel Eklöf2020-05-02-2/+3
|
* meson: generate unicode compose tableDaniel Eklöf2020-05-02-1037/+8
| | | | This replaces the pre-generated table used up until now.
* script: generate-unicode-precompose: generate a complete header fileDaniel Eklöf2020-05-02-2/+27
|
* readme: utf8proc is no longer a dependencyDaniel Eklöf2020-05-02-2/+0
|
* changelog: try to fix link for Codebergs markdown parserDaniel Eklöf2020-05-02-1/+1
|
* changelog: remove bad ']' in linkDaniel Eklöf2020-05-02-1/+1
|
* unicode-combine: remove utf8proc dependencyDaniel Eklöf2020-05-02-40/+34934
| | | | | | | | | | | | 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.
* unicode-combining: don't limit ourselves to the (western) diacritics blocksDaniel Eklöf2020-05-02-13/+19
|
* render: de-indent #if statementDaniel Eklöf2020-05-01-1/+1
|
* unicode-combining: pack structDaniel Eklöf2020-05-01-1/+1
|
* unicode-combine: leave a note saying we might need more than 2 combining charsDaniel Eklöf2020-05-01-1/+1
|
* unicode-combine: only compose if we don't have any other combining charactersDaniel Eklöf2020-05-01-16/+24
| | | | | | | | | If the client sent the sequence SAB, where SA does NOT have a composed representation, but SB does, the old code would compose SB and throw away A. This patch fixes this by only allowing a compose if there aren't any pre-existing combining characters.
* meson: emit a 'summary()' at the endDaniel Eklöf2020-05-01-0/+7
|
* Merge branch 'unicode-combining-for-real'Daniel Eklöf2020-05-01-89/+164
|\
| * unicode-combining: completely remove unicode combining characters when feature is disabledDaniel Eklöf2020-05-01-2/+26
| |
| * term: combining characters: reduce max number of combining charactersDaniel Eklöf2020-05-01-1/+1
| |
| * changelog: rewrite entry for combining charactersDaniel Eklöf2020-05-01-8/+6
| |
| * selection: extract text: also copy combining charactersDaniel Eklöf2020-05-01-14/+23
| |
| * render: render combining charactersDaniel Eklöf2020-05-01-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is basically just a loop that renders additional glyphs on top off the base glyph. Since we now need access to the row struct, for the combining characters, the function prototype for 'render_cell()' has changed. When rendering the combining characters we also need to deal with broken fonts; some fonts use positive offsets (as if the combining character was a regular character), while others use a negative offset (to be used as if you had already advanced the pen position). We handle both - a positive offset is rendered just like a regular glyph. When we see a negative offset we simply add the width of a cell first.
| * grid: reflow: copy combining charactersDaniel Eklöf2020-05-01-0/+9
| |
| * vt: utf8: track combining characters that we failed to composeDaniel Eklöf2020-05-01-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we detect a combining character, we first try to compose it with the base character (like before). When this fails, we instead add the combining character to the base cell's combining characters array. The reason for using a composed character when possible is twofold: one, the rendered glyph will look better since it will be a single glyph instead of two separate glyphs (possibly from different fonts(!)). And two, for performance. A composed glyph is a single glyph to render, while a decomposed glyph sequence means the renderer has to render multiple glyphs for a single cell.
| * term: print: reset combining characters for this cellDaniel Eklöf2020-05-01-0/+1
| | | | | | | | | | | | | | | | | | | | | | This is the *only* place combining characters are reset. In particular, we do *not* reset them in a normal cell erase. This is a performance design decision - clearing the combining characters in erase is way too slow. This way, we clear it only when we *have* to. Anything looking at the combining characters must first ensure the base character is not 0.
| * grid: add per-cell combining charactersDaniel Eklöf2020-05-01-1/+11
| | | | | | | | | | | | | | | | | | | | The data is *not* added to the cell struct, since that one is too performance critical. Instead, the data is added as a separate array in the row struct. This allows our performance critical code paths that e.g. clear cells to perform as before.
| * util.h: new header file defining commonly used macrosDaniel Eklöf2020-05-01-39/+18
|/
* term: don't enable ptmx FDM callback until Wayland window has been configuredDaniel Eklöf2020-04-30-4/+26
| | | | | | | | | | | | | The way things works right now, we cannot enable the ptmx FDM callback right away. We need to wait for the Wayland window to have been configured. Before the window is configured, we don't have a size, and no grid. Thus, if we try to process ptmx data we'll crash since we have no where to write it to. So, registering the ptmx fd with the FDM is now delayed until we've received the first 'configure' event from Wayland.
* term: start slave before loading fonts and starting rendering threadsDaniel Eklöf2020-04-30-8/+9
| | | | | This allows the client to load in parallel with our font loading, which should improve startup time.
* main: only set LC_CTYPEDaniel Eklöf2020-04-29-1/+1
| | | | | | This is the only locale variable we need. This ensures LC_NUMERIC in particular remains as "C", which is needed by fcft when instantiating new fonts.
* term: font size adjust: re-load fonts in parallelDaniel Eklöf2020-04-29-9/+30
|
* term: destroy: handle rendering threads not being initializedDaniel Eklöf2020-04-29-11/+15
| | | | | We sort of already did this. However, we did not handle the case where the thread array itself hadn't yet been allocated.
* term: initialize rendering worker threads after instantiating fontsDaniel Eklöf2020-04-29-3/+2
| | | | | | This ensures the resources (e.g. stack) used by the transient threads used to load the primary fonts can be re-used by the rendering worker threads.
* csd: buttons: use default color table as default colorsDaniel Eklöf2020-04-29-6/+9
| | | | | If the user hasn't configured any CSD button colors, use the color scheme's default colors for blue/green/red.
* changelog: change -> changesDaniel Eklöf2020-04-28-1/+1
|
* term: load primary fonts in parallelDaniel Eklöf2020-04-28-8/+38
| | | | | | | | Use four threads to load the four primary font variants - normal, bold, italic and bold italic. This speeds up initial startup, and reloading of fonts on a DPI change.
* wayland: monitor unplug: call surface_leave() to handle terminal unmappingDaniel Eklöf2020-04-28-14/+7
|
* wayland: handle outputs disappearingDaniel Eklöf2020-04-27-11/+51
| | | | | | | | | That is, deal with monitors being unplugged. At least on Sway 1.4, surfaces are not unmapped before the output is removed. Thus, in addition to free:ing the monitor resources, we also need to update all terminals that are mapped on this output - remove the output from their "mapped on" list.
* wayland: group handle_global() together with handle_global_removed()Daniel Eklöf2020-04-27-131/+131
|
* Merge branch 'unicode-combining'Daniel Eklöf2020-04-27-22/+68
|\
| * vt: lazily reset utf8 in action_utf8_*_entryDaniel Eklöf2020-04-27-4/+3
| | | | | | | | | | | | | | | | action_clear() is in the super hot code path. Avoid resetting utf8 state there, as utf8 input is relatively uncommon. Instead, reset it when we explicitly enter any of the utf8 collecting states, as this is exactly the point where we need it.
| * vt: action_utf8_print: idx is cleared in action_clear()Daniel Eklöf2020-04-27-3/+0
| |
| * vt: utf8-*-entry: idx is cleared in action_clear()Daniel Eklöf2020-04-27-3/+3
| |
| * term: remove unneeded utf8.left memberDaniel Eklöf2020-04-27-16/+0
| |
| * readme: link to utf8proc was cut offDaniel Eklöf2020-04-27-1/+1
| |
| * readme: add link to utf8procDaniel Eklöf2020-04-27-1/+2
| |
| * readme: add utf8proc to the list of dependenciesDaniel Eklöf2020-04-27-0/+1
| |
| * utf8: add support for unicode combining charactersDaniel Eklöf2020-04-27-3/+67
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* meson: bump C standard to c18Daniel Eklöf2020-04-26-1/+1
|
* damage: remove 'scroll' sub structDaniel Eklöf2020-04-26-34/+32
| | | | There is no other types of damage but scroll damage.
* render: make 'glyph' assignment more readableDaniel Eklöf2020-04-26-3/+4
|
* changelog: CSI 13;2t and CSI 14t have also been implementedDaniel Eklöf2020-04-25-1/+1
|
* changelog: use backticks for full escape sequence too, and shorten entryDaniel Eklöf2020-04-25-2/+2
|
* doc: foot.5: man page references do not embolden the section numberDaniel Eklöf2020-04-25-2/+2
|
* doc: foot.5: user -> usersDaniel Eklöf2020-04-25-1/+1
|
* doc: foot.5: padding and geometry are subject to output scalingDaniel Eklöf2020-04-25-4/+4
|
* csi: log 'unhandled' for invalid 'target' and 'operation' in CSI ? SDaniel Eklöf2020-04-25-0/+7
|
* readme: update descriptionDaniel Eklöf2020-04-24-2/+1
|
* changelog: one entry for conf-option + command line option changesDaniel Eklöf2020-04-24-6/+4
|
* Merge branch 'fcft-v2'Daniel Eklöf2020-04-24-42/+130
|\
| * PKGBUILD: bump tllist+fcft version dependenciesDaniel Eklöf2020-04-24-2/+2
| |
| * meson: dependency: use fallback without variable nameDaniel Eklöf2020-04-24-3/+3
| | | | | | | | | | | | | | 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
| * fcft: fcft_glyph_for_wc() has been renamed to fcft_glyph_rasterize()Daniel Eklöf2020-04-24-2/+4
| |