<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch 1.16.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.16.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.16.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2023-10-10T12:23:33Z</updated>
<entry>
<title>term: cache font baseline</title>
<updated>2023-10-10T12:23:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-10T12:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4449177517c2d96857483acbc8afd7438fcdfadd'/>
<id>urn:sha1:4449177517c2d96857483acbc8afd7438fcdfadd</id>
<content type='text'>
No need to redo the calculation for every single cell we render,
every frame...
</content>
</entry>
<entry>
<title>render: better description of why we disable transparency in fullscreen</title>
<updated>2023-10-10T07:27:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-10T07:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4cf2c45baae517e5a1308bde5ed0c6f3d6b7e096'/>
<id>urn:sha1:4cf2c45baae517e5a1308bde5ed0c6f3d6b7e096</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Enable the use of flash as visual bell</title>
<updated>2023-10-10T06:12:48Z</updated>
<author>
<name>Raimund Sacherer</name>
<email>rsachere@redhat.com</email>
</author>
<published>2023-10-07T17:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=827396237253d3c784c7455a9f3f2c26a8128c51'/>
<id>urn:sha1:827396237253d3c784c7455a9f3f2c26a8128c51</id>
<content type='text'>
With this patch we can configure flash in the bell section. The colors
section allow now to configure the color and translucency of the
flash.
</content>
</entry>
<entry>
<title>render: more fine-grained wayland surface damage tracking</title>
<updated>2023-10-10T05:56:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-07T14:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c50b1f990093a2a453288b976ef7f6d9a303f793'/>
<id>urn:sha1:c50b1f990093a2a453288b976ef7f6d9a303f793</id>
<content type='text'>
Before this patch. Wayland surface damage tracking was done on a
per-row basis. That is, even if just one cell was updated, the entire
row was "damaged".

Now, damage is per cell. This hopefully results in lower latencies in
many use cases, and especially on high DPI monitors.
</content>
</entry>
<entry>
<title>render: disable transparency in margins when in fullscreen</title>
<updated>2023-10-07T05:58:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-07T05:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=56d5d4cc213d422b2f6dba26d94fb8770203abc5'/>
<id>urn:sha1:56d5d4cc213d422b2f6dba26d94fb8770203abc5</id>
<content type='text'>
This amends 899b768b744c74e88e54e6d8eb32f53accea79d8, where we started
disabling transparency in fullscreen

Closes #1503
</content>
</entry>
<entry>
<title>Codespell fixes</title>
<updated>2023-10-03T12:11:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-03T12:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=58d967b2f31ebe1f16bd0915f28ec93919d3fddc'/>
<id>urn:sha1:58d967b2f31ebe1f16bd0915f28ec93919d3fddc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: cursor-shape-v1 is now always available</title>
<updated>2023-08-07T14:53:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-31T14:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=698c5b54f32c885304d5e2ff55580ce7f52b5da7'/>
<id>urn:sha1:698c5b54f32c885304d5e2ff55580ce7f52b5da7</id>
<content type='text'>
Since we're requiring wayland-protocols &gt;= 1.32
</content>
</entry>
<entry>
<title>render: OSD: center text vertically</title>
<updated>2023-07-31T14:48:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-31T14:29:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=90ad3d6491670ecc38aa5dcf02b9e1dc626bbf51'/>
<id>urn:sha1:90ad3d6491670ecc38aa5dcf02b9e1dc626bbf51</id>
<content type='text'>
Rewrite render_osd(), and instead of passing in an y-offset, let
render_osd() itself center the text inside the OSD buffer.

This is done using the same baseline calculation term_font_baseline()
does, except we use the buffer height instead of the line height.

Note that most OSDs are sized based on the line height...

Closes #1430
</content>
</entry>
<entry>
<title>--window-size-chars: ensure width/height are valid for current scaling factor</title>
<updated>2023-07-30T05:53:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-30T05:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1af0277564f6347caa85fda4b46071c0cf03234c'/>
<id>urn:sha1:1af0277564f6347caa85fda4b46071c0cf03234c</id>
<content type='text'>
Before this patch, we didn’t ensure width and height were valid for
the current scaling factor, when fractional scaling _is_
available. That is, we didn’t ensure the width/height values
multiplied back to their original values after dividing with the
scaling factor.

Closes #1446
</content>
</entry>
<entry>
<title>fractional scaling: another round(!) of rounding fixes</title>
<updated>2023-07-28T14:03:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-28T13:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=17824744812c16560dd214b98f28977b0d2fb47d'/>
<id>urn:sha1:17824744812c16560dd214b98f28977b0d2fb47d</id>
<content type='text'>
* Ensure buffer sizes are valid. That is, ensure that
  size / scale * scale == size.
* Do size calculation of the window geometry in the same way we
  calculate the CSD offsets.
</content>
</entry>
<entry>
<title>render: round scaled border/title/button widths</title>
<updated>2023-07-28T14:03:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-27T18:07:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=753c4b5d4fb51574524af06ba56333f4241b1a9b'/>
<id>urn:sha1:753c4b5d4fb51574524af06ba56333f4241b1a9b</id>
<content type='text'>
And calculation of compounded offsets/widths/heights, to compensate
for compositor rounding when positioning and scaling/sizing
subsurfaces.

Closes #1441
</content>
</entry>
<entry>
<title>config: add tweak.bold-text-in-bright-amount</title>
<updated>2023-07-28T13:40:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-26T14:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f3c5b82c8276feda3c9eec522e549062c1589484'/>
<id>urn:sha1:f3c5b82c8276feda3c9eec522e549062c1589484</id>
<content type='text'>
By how much to increase the luminance when brightening bold
fonts. This was previously hard-coded to a factor of 1.3, which is now
the default value of the new config option.

Closes #1434
</content>
</entry>
<entry>
<title>render: revert part of a36f67cbe311bebd9321fbf58773dace8128fcd7</title>
<updated>2023-07-28T13:37:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-28T13:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e912656682cd6645241fd5ba9ce3c1d1533c03b4'/>
<id>urn:sha1:e912656682cd6645241fd5ba9ce3c1d1533c03b4</id>
<content type='text'>
render_osd() shouldn't use term_font_baseline().

This is because term_font_baseline() uses the line height to determine
the position, while render_osd() renders to surfaces that aren't sized
like the grid.

This fixes a regression, where the CSD title were sometimes rendered
too high up, and sometimes too low.
</content>
</entry>
<entry>
<title>scaling: always round the scaling factor when converting to int</title>
<updated>2023-07-25T14:48:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-25T13:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=613c61abb44e49236a893376764eb21702c0ef32'/>
<id>urn:sha1:613c61abb44e49236a893376764eb21702c0ef32</id>
<content type='text'>
* In all calls to wl_subsurface_set_position()
* (wp_viewport_set_destination() already does this)
* Whenever we use the scale to calculate margins (search box,
  scrollback indicator etc)
* Since the scaling factor is stored as a float (and not a double),
  use roundf() instead of round()
</content>
</entry>
<entry>
<title>render: apply new baseline calculation everywhere</title>
<updated>2023-07-25T13:53:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-23T15:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a36f67cbe311bebd9321fbf58773dace8128fcd7'/>
<id>urn:sha1:a36f67cbe311bebd9321fbf58773dace8128fcd7</id>
<content type='text'>
* URL jump labels
* Scrollback position indicator
* Line/box drawings characters

Closes #1430
</content>
</entry>
<entry>
<title>render: change baseline calculation, to center it within the line</title>
<updated>2023-07-21T06:17:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-21T06:17:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b3255465f1d4d5a96fbd7acee846db0e14026507'/>
<id>urn:sha1:b3255465f1d4d5a96fbd7acee846db0e14026507</id>
<content type='text'>
Before this patch, fonts were anchored to the top of the line. With
this patch, it is instead centered.

Closes #1302
</content>
</entry>
<entry>
<title>render: OSD: don’t mark surface as being opaque, when it’s not</title>
<updated>2023-07-19T14:43:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-19T14:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a49281ced3fb27d6fa0f59f7964c5c0cc07b3829'/>
<id>urn:sha1:a49281ced3fb27d6fa0f59f7964c5c0cc07b3829</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: disable transparency when we’re fullscreened</title>
<updated>2023-07-19T14:42:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-19T14:34:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=899b768b744c74e88e54e6d8eb32f53accea79d8'/>
<id>urn:sha1:899b768b744c74e88e54e6d8eb32f53accea79d8</id>
<content type='text'>
The wayland protocol recommends (or mandates?) that compositors render
a black background behind fullscreened transparent windows. I.e. you
never see what’s _actually_ behind the window.

So, if you have a white, but semi-transparent background in foot,
it’ll be rendered in a shade of gray.

Given this, it’s better to simply disable transparency while we’re
fullscreened. That way, we at least get the "correct" background
color.

Closes #1416
</content>
</entry>
<entry>
<title>terminal: break out scaling factor updating, and reduce number of calls to render_resize()</title>
<updated>2023-07-18T03:48:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-17T14:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=21d99f8dced335826964ca96b8ba7ccac059e598'/>
<id>urn:sha1:21d99f8dced335826964ca96b8ba7ccac059e598</id>
<content type='text'>
Break out the logic that updates the terminal’s scaling factor value,
from render_resize(), to a new function, term_update_scale(). This
allows us to update the scaling factor without a full grid resize.

We also change how we pick the scaling factor (when fractional scaling
is not in use). Before, we’d use the highest scaling factor from all
monitors we were mapped on. Now, we use the scaling factor from the
monitor we were *last* mapped on.

Then, add a boolean parameter to term_set_fonts(), and when
false, *don’t* call render_resize_force().

Also change term_font_dpi_changed() to only return true if the font
was changed in any way.

Finally, rewrite update_term_for_output_change() to:

* Call term_update_scale() before doing anything else
* Call render_resize{,_force} *last*, and *only* if either the scale
  or the fonts were updated.

This fixes several things:

* A bug where we failed to update the fonts when fractional scaling
  was in use, and we guessed the initial scale/DPI wrong. The bug
  happened because updated the internal "preferred" scale value, and a
  later call to render_resize() updated the terminal’s scale value,
  but since that code path didn’t call term_font_dpi_changed() (and it
  shouldn’t), the fonts weren’t resized properly.

* It ensures we only resize the grid *once* when the scaling factor,
  or DPI is changed. Before this, we’d resize it twice. And this
  happened when e.g. dragging the window between monitors.
</content>
</entry>
<entry>
<title>render: fix xcursor scaling with fractional-scale-v1</title>
<updated>2023-07-18T03:44:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-17T18:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6de69aa9b726c2e270455ac44a7b8d5177b7332e'/>
<id>urn:sha1:6de69aa9b726c2e270455ac44a7b8d5177b7332e</id>
<content type='text'>
This worked just after the fractional-scaling branch was merged, but
was then broken by the cursor-shape branch, due to a bad rebase of
that branch.
</content>
</entry>
</feed>
