mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: Allow cells to bleed into their neighbor
This patch adds a `confined` flag to each cell to track if the last rendered glyph bled into it's right neighbor. To keep things simple, bleeding into any other neighbor cell than the immediate right one is not allowed. This should cover most use cases. Before rendering a row we now do a prepass and mark all cells unclean that are affected by a bleeding neighbor. If there are consecutive bleeding cells, the whole group must be re-rendered even if only a single cell has changed. The patch also deprecates both old overflowing glyph options *allow-overflowing-double-width-glyphs* and *pua-double-width* in favor of a single new one named *overflowing-glyphs*.
This commit is contained in:
parent
9211ee694c
commit
91801ae55d
6 changed files with 71 additions and 75 deletions
|
|
@ -847,34 +847,24 @@ any of these options.
|
|||
|
||||
Default: _lanczos3_.
|
||||
|
||||
*allow-overflowing-double-width-glyphs*
|
||||
Boolean. When enabled, double width glyphs with a character width
|
||||
of 1 are allowed to overflow into the neighbouring cell.
|
||||
*overflowing-glyphs*
|
||||
Boolean. When enabled, glyphs wider than their cell(s) are allowed
|
||||
to render into one additional neighbouring cell.
|
||||
|
||||
One use case for this is fonts "icon" characters in the Unicode
|
||||
private usage area, e.g. Nerd Fonts, or Powerline Fonts. Without
|
||||
this option, such glyphs will appear "cut off".
|
||||
One use case for this are fonts with wide italic characters that
|
||||
"bend" into the next cell. Without this option, such glyphs will
|
||||
appear "cut off".
|
||||
|
||||
Another use case are legacy emoji characters like *WHITE FROWNING
|
||||
FACE*.
|
||||
Another use case are fonts with "icon" characters in the Unicode
|
||||
private usage area, e.g. Nerd Fonts, or Powerline Fonts and legacy
|
||||
emoji characters like *WHITE FROWNING FACE*.
|
||||
|
||||
Note: this feature uses _heuristics_ to determine *which* glyphs
|
||||
should be allowed to overflow.
|
||||
|
||||
See also: *pua-double-width*
|
||||
Note: might impact performance depending on the font used.
|
||||
Especially small font sizes can cause many overflowing glyphs
|
||||
because of subpixel rendering.
|
||||
|
||||
Default: _yes_.
|
||||
|
||||
*pua-double-width*
|
||||
Boolean. When enabled, Unicode code points from the private usage
|
||||
area (PUA) are always considered to be double width, regardless of
|
||||
the actual glyph width.
|
||||
|
||||
Ignored if *allow-overflowing-double-width-glyphs* has been
|
||||
disabled.
|
||||
|
||||
Default: _no_.
|
||||
|
||||
*render-timer*
|
||||
Enables a frame rendering timer, that prints the time it takes to
|
||||
render each frame, in microseconds, either on-screen, to stderr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue