<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.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-09T10:04:55Z</updated>
<entry>
<title>Revert "term: print: line-wrap multi-column characters instead of cutting them in half"</title>
<updated>2020-05-09T10:04:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-09T10:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c090a0664f6c47a178bebfa77ba78bc63c396958'/>
<id>urn:sha1:c090a0664f6c47a178bebfa77ba78bc63c396958</id>
<content type='text'>
This reverts commit 8448296bb3c0fa96f5af5cb7ec563bb0c7e99093.

Applications need to be multi-column character aware anyway, and they
should deal with this.
</content>
</entry>
<entry>
<title>term: print: line-wrap multi-column characters instead of cutting them in half</title>
<updated>2020-05-09T09:57:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-09T09:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8448296bb3c0fa96f5af5cb7ec563bb0c7e99093'/>
<id>urn:sha1:8448296bb3c0fa96f5af5cb7ec563bb0c7e99093</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: don't register ptmx with FDM if we're shutting down</title>
<updated>2020-05-04T18:49:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-04T18:49:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=56d53ec2a1874455bfb26fc1c9dc2b23a30b91aa'/>
<id>urn:sha1:56d53ec2a1874455bfb26fc1c9dc2b23a30b91aa</id>
<content type='text'>
This can happen when there's an error instantiating the
terminal *after* we've spawned the slave process.
</content>
</entry>
<entry>
<title>term: set 'is_shutting_down' before calling term_destroy() on error</title>
<updated>2020-05-04T18:46:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-04T18:46:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9864d91975e42f250a2970298f72ac11709c58ce'/>
<id>urn:sha1:9864d91975e42f250a2970298f72ac11709c58ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: check return value when instantiating thread synchronization primitives</title>
<updated>2020-05-04T18:11:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-04T18:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=921331854a1426c8d836d74f326565dac0985f37'/>
<id>urn:sha1:921331854a1426c8d836d74f326565dac0985f37</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: thrd_success isn't necessarily 0</title>
<updated>2020-05-03T12:17:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T12:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6bac1bd2576d76de32e79387d9dc7cbb7c9c8e9c'/>
<id>urn:sha1:6bac1bd2576d76de32e79387d9dc7cbb7c9c8e9c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>thrd_create(): handle errors correctly</title>
<updated>2020-05-03T10:25:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T10:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7525fa20c219093719eaedf9371ef69201d421ed'/>
<id>urn:sha1:7525fa20c219093719eaedf9371ef69201d421ed</id>
<content type='text'>
* Detect thrd_create() failures in all places where we instantiate
  threads
* Log error correctl; thrd_create() does not return an errno value
</content>
</entry>
<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>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>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>term: print: reset combining characters for this cell</title>
<updated>2020-05-01T09:50:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:50:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=67614df9f90021a091128a37caac16cf130a03a1'/>
<id>urn:sha1:67614df9f90021a091128a37caac16cf130a03a1</id>
<content type='text'>
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.
</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>term: don't enable ptmx FDM callback until Wayland window has been configured</title>
<updated>2020-04-30T15:22:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-30T15:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fc2e385d876f53b260d1f8d80db2517b9f2e6e80'/>
<id>urn:sha1:fc2e385d876f53b260d1f8d80db2517b9f2e6e80</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>term: start slave before loading fonts and starting rendering threads</title>
<updated>2020-04-30T09:39:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-30T09:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae5af7bb06263dff7a436975424087bb4ee12ea4'/>
<id>urn:sha1:ae5af7bb06263dff7a436975424087bb4ee12ea4</id>
<content type='text'>
This allows the client to load in parallel with our font loading,
which should improve startup time.
</content>
</entry>
<entry>
<title>term: font size adjust: re-load fonts in parallel</title>
<updated>2020-04-29T18:09:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-29T18:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=589e984b910fa5cb447995dbac41c4e73e2f9eab'/>
<id>urn:sha1:589e984b910fa5cb447995dbac41c4e73e2f9eab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: destroy: handle rendering threads not being initialized</title>
<updated>2020-04-29T18:08:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-29T18:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1d67f3704517cfceb2a3efb69807a3ed94f49256'/>
<id>urn:sha1:1d67f3704517cfceb2a3efb69807a3ed94f49256</id>
<content type='text'>
We sort of already did this. However, we did not handle the case where
the thread array itself hadn't yet been allocated.
</content>
</entry>
<entry>
<title>term: initialize rendering worker threads after instantiating fonts</title>
<updated>2020-04-29T18:07:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-29T18:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=84e945a851e0fdd1fe5ae7be9904cd1e3d39a0aa'/>
<id>urn:sha1:84e945a851e0fdd1fe5ae7be9904cd1e3d39a0aa</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>term: load primary fonts in parallel</title>
<updated>2020-04-28T20:07:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-28T20:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3adcbf7d4ded61c6fbcbaddf4975e26d8058bebc'/>
<id>urn:sha1:3adcbf7d4ded61c6fbcbaddf4975e26d8058bebc</id>
<content type='text'>
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.
</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>
</feed>
