<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch 1.11.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2022-02-05T16:00:54Z</updated>
<entry>
<title>fcft: adapt to API changes in fcft-3.x</title>
<updated>2022-02-05T16:00:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-21T12:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0227266cabc015c282774ac898e3f52dce943df'/>
<id>urn:sha1:e0227266cabc015c282774ac898e3f52dce943df</id>
<content type='text'>
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.

Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.

For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).

Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.

These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.

For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the  __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.

FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.

Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.

Other fcft API changes:

* fcft_glyph_rasterize() -&gt; fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
</content>
</entry>
<entry>
<title>replace gettimeofday with clock_gettime</title>
<updated>2022-01-15T16:05:45Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-01-15T09:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0da19a81bc9a94f83bfcf8c5af0e3571f751cf38'/>
<id>urn:sha1:0da19a81bc9a94f83bfcf8c5af0e3571f751cf38</id>
<content type='text'>
POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the
use of clock_gettime(2) instead.

CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is
unaffected by manual changes in the system clock. This makes it better
for our purposes, namely, measuring the difference between two points in
time.

tv_sec has been casted to long in most places since POSIX does not
define the actual type of time_t.
</content>
</entry>
<entry>
<title>config: convert tweak.render_timer to an enum</title>
<updated>2022-01-13T11:08:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-01-13T11:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=891fce62364704b7fc05bfe723a3619297b5b9e0'/>
<id>urn:sha1:891fce62364704b7fc05bfe723a3619297b5b9e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: csd: scale border width when rendering the CSD border’s visible part</title>
<updated>2021-12-29T17:11:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-29T17:11:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=abec4f4e710f3c1bf72c7e989221efc2e2a25e1e'/>
<id>urn:sha1:abec4f4e710f3c1bf72c7e989221efc2e2a25e1e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: limit the unfocused block cursor’s outline width</title>
<updated>2021-12-29T17:05:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-29T17:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8ac2bcff67777f2bb14c95dd92810b3f7264f83a'/>
<id>urn:sha1:8ac2bcff67777f2bb14c95dd92810b3f7264f83a</id>
<content type='text'>
Ensure the outline width doesn’t exceed the cell width/height.
</content>
</entry>
<entry>
<title>render: scale the width out the outline of the unfocused block cursor</title>
<updated>2021-12-28T19:57:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-28T19:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef8d5ebca0a703d4f3c612caeabec18671a8815e'/>
<id>urn:sha1:ef8d5ebca0a703d4f3c612caeabec18671a8815e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: store color index, not actual color, in cell’s fg/bg attributes</title>
<updated>2021-12-26T11:37:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T16:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2bf2d3650b6a837efec834d23b1c3774c263852'/>
<id>urn:sha1:c2bf2d3650b6a837efec834d23b1c3774c263852</id>
<content type='text'>
When using indexed colors (i.e. SGR 30/40/90/100), store the index
into the cell’s fg/bg attributes, not the actual color value.

This has a couple of consequences:

Color table lookup is now done when rendering. This means a rendered
cell will always reflect the *current* color table, not the color
table that was in use when the cell was printed to.

This simplifies the OSC-4/104 logic, since we no longer need to update
the grid - we just have to damage it to trigger rendering.

Furthermore, this change simplifies the VT parsing, since we no longer
need to do any memory loads (except loading the SGR parameter values),
only writes.
</content>
</entry>
<entry>
<title>render: make sure ‘maximized’ button doesn’t use negative coordinates</title>
<updated>2021-12-22T19:31:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-22T19:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=41f7f8b7fad601422cf9b458928b73b210ba994a'/>
<id>urn:sha1:41f7f8b7fad601422cf9b458928b73b210ba994a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: csd.border_width now always reflects the full/total width</title>
<updated>2021-12-22T19:21:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-22T19:21:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=521bd84a99ee154af2866511774c1f6c8c2a2467'/>
<id>urn:sha1:521bd84a99ee154af2866511774c1f6c8c2a2467</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'window-menu'</title>
<updated>2021-11-30T21:10:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-30T21:10:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=90cfdcf1a5ddbaad44a46fb88b8dbafd319ee0ad'/>
<id>urn:sha1:90cfdcf1a5ddbaad44a46fb88b8dbafd319ee0ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: fix csd border rendering glitch when width &gt; 5px</title>
<updated>2021-11-29T18:32:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-29T18:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3afe317e4637d511bb4f795d20d8e0467c0e42bf'/>
<id>urn:sha1:3afe317e4637d511bb4f795d20d8e0467c0e42bf</id>
<content type='text'>
CSD borders are always *at least* 5px. If url.border-width=0, those
5px are all fully transparent (and act as interactive resize handles).

As csd.border-width increases, the number of transparent pixels
decrease. Once csd.border-width &gt;= 5, the border is fully opaque.

When csd.border-width &gt; 5, then width of the border is (obviously)
more than 5px. But, when rendering the opaque part of the border, we
still used 5px for the invisible part, which caused some pixman
rectangles to have negative x/y coordinates.

This resulted in rendering glitches due to overflows in pixman when
rendering the borders.

The fix is to ensure the total border size is always at least, but
not *always* 5px. That is, set it to max(5, csd.border-width).

This patch also fixes an issue where the CSD borders were not
dimmed (like the titlebar) when the window looses input focus.

Closes #823
</content>
</entry>
<entry>
<title>input: Add support for xdg_toplevl.show_window_menu()</title>
<updated>2021-11-29T15:26:40Z</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-11-19T14:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=38741baf9afc2697c7e508cb87c3b2983de9f0af'/>
<id>urn:sha1:38741baf9afc2697c7e508cb87c3b2983de9f0af</id>
<content type='text'>
This makes, if the compositor supports it, the window menu appear when
right clicking on the title bar.
</content>
</entry>
<entry>
<title>term: track cell color source</title>
<updated>2021-11-20T15:46:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-20T15:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d46af6bd7ac7606bf99d63b2453b656a5defb892'/>
<id>urn:sha1:d46af6bd7ac7606bf99d63b2453b656a5defb892</id>
<content type='text'>
Each cell now tracks it’s current color source:

* default fg/bg
* base16 fg/bg (maps to *both* the regular and bright colors)
* base256 fg/bg
* RGB

Note that we don’t have enough bits to separate the regular from the
bright colors. These _shouldn’t_ be the same, so we ought to be
fine...
</content>
</entry>
<entry>
<title>config: add [colors].dim0-7</title>
<updated>2021-11-13T16:39:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-03T13:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c01904a2c75e962e5159dd42a640cce3d7370b13'/>
<id>urn:sha1:c01904a2c75e962e5159dd42a640cce3d7370b13</id>
<content type='text'>
This allows you to configure custom colors to be used when colors are
being dimmed (`\E[2m`).

It is implemented by color matching (just like
bold-text-in-bright=palette-based); the color-to-be-dimmed is matched
against the current color palette.

If it matches one of the regular colors (colors 0-7), the
corresponding “dim” color will be used.

If it matches one of the bright colors (colors 8-15), the
corresponding “regular” color will be used (but *only* if the “dim”
color has been set).

Otherwise, the color is dimmed by reducing its luminance.

The default behavior, i.e. when dim0-7 hasn’t been configured, is to
dim by reducing luminance for *all* colors. I.e. we don’t do any color
matching at all. In particular, this means that dimming a bright color
will *not* result in the corresponding “regular” color.

Closes #776
</content>
</entry>
<entry>
<title>config: add {str,value}_to_uint{16,32}()</title>
<updated>2021-11-13T10:04:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T11:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d29c3cf7b76c6a1935684124b4d7cad69de94c78'/>
<id>urn:sha1:d29c3cf7b76c6a1935684124b4d7cad69de94c78</id>
<content type='text'>
This allows us to pass the final pointer directly to the conversion
functions, as well as allowing us to print outside-range errors.
</content>
</entry>
<entry>
<title>render: csd_part: we don’t use the ‘src’ pixman image</title>
<updated>2021-10-29T17:31:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-29T17:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e69c3e5b1e87a27c86fb4ca27c0078a00f5727ce'/>
<id>urn:sha1:e69c3e5b1e87a27c86fb4ca27c0078a00f5727ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csd: add support for a visible border</title>
<updated>2021-10-27T16:32:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-27T16:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5e4de143de6c43ab54a5df7cea169674f8ea79a3'/>
<id>urn:sha1:5e4de143de6c43ab54a5df7cea169674f8ea79a3</id>
<content type='text'>
When we’re using CSDs, we’ve up until now rendered a 5px invisible
border. This border handles interactive resizing. I.e. hovering it
changes the mouse cursor, and mouse button events are used to start an
interactive resize.

This patch makes it possible to color part of (or the entire) border,
with a configurable color.

To facilitate this, two new options have been added:

* csd.border-width
* csd.border-color

border-width defaults to 0, resulting in the look we’re used to.

border-color defaults to the title bar color. If the title bar color
hasn’t been set, it defaults to the default foreground color (just
like the title bar color does).

This means that, setting border-width but not border-color, results in
a border that blends with the title bar.
</content>
</entry>
<entry>
<title>render: tab -&gt; spaces</title>
<updated>2021-10-20T18:03:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-20T18:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b66592a57f5b5f5742dbda54d088634205a7a20'/>
<id>urn:sha1:5b66592a57f5b5f5742dbda54d088634205a7a20</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config, render: scrollback indicator: allow configuring scrollback indicator colors</title>
<updated>2021-10-09T20:59:52Z</updated>
<author>
<name>feeptr@codeberg.org</name>
<email>feeptr</email>
</author>
<published>2021-09-27T19:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=650cfa18efdc38164600959e90fdaa50f58910e4'/>
<id>urn:sha1:650cfa18efdc38164600959e90fdaa50f58910e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix crashes when resizing after CSD enabled at runtime with csd.size = 0</title>
<updated>2021-10-04T22:14:58Z</updated>
<author>
<name>feeptr</name>
<email>feeptr@codeberg.org</email>
</author>
<published>2021-09-23T22:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=304aacdb7a1dfbe92e4b0e1a419a872bd3ba6113'/>
<id>urn:sha1:304aacdb7a1dfbe92e4b0e1a419a872bd3ba6113</id>
<content type='text'>
</content>
</entry>
</feed>
