<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch 1.3.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.3.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.3.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-05-03T09:03:22Z</updated>
<entry>
<title>unicode-combining: store seen combining chains "globally" in the term struct</title>
<updated>2020-05-03T09:03:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T09:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=62e07743194c8051334ed9b23be90ce31ab80773'/>
<id>urn:sha1:62e07743194c8051334ed9b23be90ce31ab80773</id>
<content type='text'>
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 &gt;= COMB_CHARS_LO).

Then we render the grapheme pretty much like before.
</content>
</entry>
<entry>
<title>render: don't re-instantiate the foreground pixman source</title>
<updated>2020-05-02T20:14:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-02T20:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef637fb5e8922531d9f0e6c03dbd1bd117289dc2'/>
<id>urn:sha1:ef637fb5e8922531d9f0e6c03dbd1bd117289dc2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combine: remove utf8proc dependency</title>
<updated>2020-05-02T15:29:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-02T15:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d945b68b734427a03d114716ff8aeac7998a7c57'/>
<id>urn:sha1:d945b68b734427a03d114716ff8aeac7998a7c57</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>render: de-indent #if statement</title>
<updated>2020-05-01T19:51:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T19:51:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3b29aa95c90660ea97860ca340cb8815b88d6fce'/>
<id>urn:sha1:3b29aa95c90660ea97860ca340cb8815b88d6fce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combining: completely remove unicode combining characters when feature is disabled</title>
<updated>2020-05-01T10:05:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T10:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3474624c2c17058f0fd9f3f1821971e7213d285b'/>
<id>urn:sha1:3474624c2c17058f0fd9f3f1821971e7213d285b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: render combining characters</title>
<updated>2020-05-01T09:56:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=76567e9ef0945c5ce86bb55097e6112a9b866948'/>
<id>urn:sha1:76567e9ef0945c5ce86bb55097e6112a9b866948</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>util.h: new header file defining commonly used macros</title>
<updated>2020-05-01T09:46:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=69c3e744983e37662fa7b4f61482fb1d142e257c'/>
<id>urn:sha1:69c3e744983e37662fa7b4f61482fb1d142e257c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csd: buttons: use default color table as default colors</title>
<updated>2020-04-29T18:06:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-29T18:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=74d30dc41052ff3243feb68a9acbbbc627e6b401'/>
<id>urn:sha1:74d30dc41052ff3243feb68a9acbbbc627e6b401</id>
<content type='text'>
If the user hasn't configured any CSD button colors, use the color
scheme's default colors for blue/green/red.
</content>
</entry>
<entry>
<title>damage: remove 'scroll' sub struct</title>
<updated>2020-04-26T10:47:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-26T10:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e9ed3025a8f891effdb03dc82dfd8dfc068b11e9'/>
<id>urn:sha1:e9ed3025a8f891effdb03dc82dfd8dfc068b11e9</id>
<content type='text'>
There is no other types of damage but scroll damage.
</content>
</entry>
<entry>
<title>render: make 'glyph' assignment more readable</title>
<updated>2020-04-26T10:39:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-26T10:39:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ce280537ded217a702346df641ac09eeade0f153'/>
<id>urn:sha1:ce280537ded217a702346df641ac09eeade0f153</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fcft: fcft_glyph_for_wc() has been renamed to fcft_glyph_rasterize()</title>
<updated>2020-04-24T08:53:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-24T08:53:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f736d467d9714cd2d53019164d091fa3229f64ed'/>
<id>urn:sha1:f736d467d9714cd2d53019164d091fa3229f64ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fcft: adjust to fcft-2.0 API changes</title>
<updated>2020-04-21T17:29:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-21T17:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7194f65ae9a49e0725310f8529de8ef61ac4a46b'/>
<id>urn:sha1:7194f65ae9a49e0725310f8529de8ef61ac4a46b</id>
<content type='text'>
* font_*() -&gt; fcft_*()
* struct font -&gt; struct fcft_font
* struct glyph -&gt; struct fcft_glyph
* enum subpixel_order -&gt; enum fcft_subpixel
</content>
</entry>
<entry>
<title>render: use output's subpixel mode when rasterizing glyphs</title>
<updated>2020-04-20T16:38:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-20T16:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6f83ef81e54b2695692c76a0a06c94c53cb7e315'/>
<id>urn:sha1:6f83ef81e54b2695692c76a0a06c94c53cb7e315</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: search: improve handling of very long search strings</title>
<updated>2020-04-19T12:50:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-19T12:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b7593897b747bb9e37651fa147f705de5cd68a94'/>
<id>urn:sha1:b7593897b747bb9e37651fa147f705de5cd68a94</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: implement CSI Ps ; Ps ; Ps t reporting escape sequences</title>
<updated>2020-04-18T09:51:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-17T21:03:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fa8b0cbd80c5473e648c5fa1a71b0f74537d1af3'/>
<id>urn:sha1:fa8b0cbd80c5473e648c5fa1a71b0f74537d1af3</id>
<content type='text'>
A lot of the escape sequences on the "CSI Ps ; Ps ; Ps t" form are
expected to return a reply. Thus, not having these implemented means
we will hang if the client sends these escapes.

Not all of these escapes can be meaningfully implemented on Wayland,
and thus this implementation is best effort.

We now support the following escapes:

* 11t   - report if window is iconified (always replies "no")
* 13t   - report window position (always replies 0,0)
* 13;2t - report text area position (replies with margins, since we
          cannot get the window's position)
* 14t   - report text area size, in pixels
* 14;2t - report window size, in pixels
* 15t   - report screen size, in pixels
* 16t   - report cell size, in pixels
* 18t   - report text area size, in cells
* 19t   - report screen size, in cells
</content>
</entry>
<entry>
<title>render: resize: no need to truncate selection anymore - it's being translated</title>
<updated>2020-04-17T20:30:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-17T20:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=761bf426dcca2b8dfc2bb0e8a12590f463c7d0dc'/>
<id>urn:sha1:761bf426dcca2b8dfc2bb0e8a12590f463c7d0dc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: resize: need to translate selection coordinates</title>
<updated>2020-04-17T20:20:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-17T20:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7eb990c8b15ca765dce1762ff6fd359a8c5e66b1'/>
<id>urn:sha1:7eb990c8b15ca765dce1762ff6fd359a8c5e66b1</id>
<content type='text'>
While it *looked* like the selection was working before, it really
wasn't.

When rendering, we're looking at the cells' attributes to determine
whether they have been selected or not.

When copying text however, we use the terminal's 'selection' state,
which consists of 'start' and 'end' coordinates.

These need to be translated when reflowing text.
</content>
</entry>
<entry>
<title>render: resize: no need to clear the selection - just truncate if necessary</title>
<updated>2020-04-17T19:11:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-17T19:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5509fe514afa64c972758ace3b81b462aba9694f'/>
<id>urn:sha1:5509fe514afa64c972758ace3b81b462aba9694f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: caller may now pass a list of coordinates that should be translated</title>
<updated>2020-04-17T19:04:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-17T19:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef52ed8a109af7512bd9e9ed62d74e36ae2deb41'/>
<id>urn:sha1:ef52ed8a109af7512bd9e9ed62d74e36ae2deb41</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: grid_reflow() now translates cursor coordinates</title>
<updated>2020-04-16T17:38:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-16T17:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5546b40369b7bc20201a8f3a327be0ff84af7f5a'/>
<id>urn:sha1:5546b40369b7bc20201a8f3a327be0ff84af7f5a</id>
<content type='text'>
</content>
</entry>
</feed>
