<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/font.c, branch 0.9.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=0.9.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=0.9.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2019-09-29T11:03:48Z</updated>
<entry>
<title>font: calculate underline/strikeout metrics in font, not main</title>
<updated>2019-09-29T11:03:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-09-29T11:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5a0bb292eec67cff0924379f50291333e1a03516'/>
<id>urn:sha1:5a0bb292eec67cff0924379f50291333e1a03516</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: tentative support for BGR, V-RGB and V-BGR</title>
<updated>2019-08-19T15:45:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-19T15:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9029478e8c73915f6abb2eabe3f06411aa2537c8'/>
<id>urn:sha1:9029478e8c73915f6abb2eabe3f06411aa2537c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: break out stride calculation to new function</title>
<updated>2019-08-18T15:59:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-18T15:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=33b5210a6a69c04c8de7589ac8c0b86c38ce75c3'/>
<id>urn:sha1:33b5210a6a69c04c8de7589ac8c0b86c38ce75c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: implement subpixel antialiasing</title>
<updated>2019-08-18T15:40:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-18T15:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0060e33912338bcfe0c7180bb322dd6b962a87df'/>
<id>urn:sha1:0060e33912338bcfe0c7180bb322dd6b962a87df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove all references to cairo; we now use pixman only</title>
<updated>2019-08-16T20:11:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-16T20:11:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f45e5c6aef2a1d44286982e47f6b559c9f2cc4a0'/>
<id>urn:sha1:f45e5c6aef2a1d44286982e47f6b559c9f2cc4a0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: render background and glyphs using pixman</title>
<updated>2019-08-16T18:40:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-16T18:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bed7b34c2857ebac8028e8b7a00b0bef0d831df0'/>
<id>urn:sha1:bed7b34c2857ebac8028e8b7a00b0bef0d831df0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: fix broken debug log</title>
<updated>2019-08-16T16:00:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-16T16:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=30d5847d062d21a063e69d9ccb7edc8b6cec198d'/>
<id>urn:sha1:30d5847d062d21a063e69d9ccb7edc8b6cec198d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: don't bother creating a cairo surface for zero-width glyphs</title>
<updated>2019-08-13T18:44:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-13T18:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9e7106018e9c6552a24d4e236a5e0e74c54c95bb'/>
<id>urn:sha1:9e7106018e9c6552a24d4e236a5e0e74c54c95bb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: handle invalid glyphs correctly</title>
<updated>2019-08-13T18:41:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-13T18:41:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8035bbfbdbd7412799ec06f6bb2fe1f74d450d30'/>
<id>urn:sha1:8035bbfbdbd7412799ec06f6bb2fe1f74d450d30</id>
<content type='text'>
*All* glyphs are cached.

But we never set the 'wc' member of failed glyphs, causing a later
cache lookup of the same glyph miss in the cache, and thus re-generate
yet another glyph (that is inserted into the cache). I.e. if the
same (invalid) glyph is rendered over and over again, we'll end up
growing the cache indefinitely.

Fix by setting the 'wc' member of invalid glyphs. This causes a cache
lookup to hit. But, we must also check the glyphs validity, and return
NULL if the glyph isn't valid.

Finally, when destroying a font, skip invalid glyphs, since they have
no resources that needs to be freed.
</content>
</entry>
<entry>
<title>font: cleanup</title>
<updated>2019-08-10T19:10:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-10T19:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=00b6948d9fc53100527a829b6466551cde9718a8'/>
<id>urn:sha1:00b6948d9fc53100527a829b6466551cde9718a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: initial support for fontconfig font fallback</title>
<updated>2019-08-10T18:34:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-10T18:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=92319d1570e712e3df23f9f623f17dc6e19b0c2a'/>
<id>urn:sha1:92319d1570e712e3df23f9f623f17dc6e19b0c2a</id>
<content type='text'>
When we've exhausted our own fallback list, try the font list provided
by fontconfig.

This means, the user's fallback fonts have priority, but in case all
of them fail, we hopefully get lucky with fontconfig...
</content>
</entry>
<entry>
<title>font: improve logging</title>
<updated>2019-08-08T15:57:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-08T15:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=83a10402af38e74ac53a6cc5d362de9daecd5a2e'/>
<id>urn:sha1:83a10402af38e74ac53a6cc5d362de9daecd5a2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cell: pack more efficiently and store glyph as a wchar</title>
<updated>2019-08-02T16:19:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-02T16:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4d7993b36fa3f97e26c527c37b36eb9321b79791'/>
<id>urn:sha1:4d7993b36fa3f97e26c527c37b36eb9321b79791</id>
<content type='text'>
The 'attributes' struct is now 8 bytes and naturally packed (used to
be 9 bytes, artificially packed).

'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes,
artificially packed).

Furthermore, the glyph is stored as a wchar instead of a char*. This
makes it easier (faster) to do glyph lookup when rendering.
</content>
</entry>
<entry>
<title>font: initial support for double-width *and* color emoji glyphs</title>
<updated>2019-07-31T16:03:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-31T16:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=858a0d9906a66f2eb9c2ffaf6d71e1153dad33f7'/>
<id>urn:sha1:858a0d9906a66f2eb9c2ffaf6d71e1153dad33f7</id>
<content type='text'>
Fonts are now loaded with FT_LOAD_COLOR and we recognize and support
the FT_PIXEL_MODE_BGRA pixel mode.

This is mapped to a CAIRO_FORMAT_ARGB32 surface, that is blitted
as-is (instead of used as a mask like we do for gray and mono glyphs).

Furthermore, since many emojis are double-width, we add initial
support for double-width glyphs.

These are assumed to always be utf8. When PRINT:ing an utf8 character,
we check its width, and add empty "spacer" cells after the cell with
the multi-column glyph.

When rendering, we render the columns in each row backwards. This
ensures the spacer cells get cleared *before* we render the glyph (so
that we don't end up erasing part of the glyph).

Finally, emoji fonts are usually bitmap fonts with *large*
glyphs. These aren't automatically scaled down. I.e. even if we
request a glyph of 13 pixels, we might end up getting a 100px glyph.

To handle this, fontconfig must be configured to scale bitmap
fonts. When it is, we can look at the 'scalable' and 'pixelsizefixup'
properties, and use these to scale the rendered glyph.
</content>
</entry>
<entry>
<title>font: add support for fallback fonts</title>
<updated>2019-07-30T16:04:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-30T16:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=73b4d5d05ab3d3059017a0d3e2a5c798a241da87'/>
<id>urn:sha1:73b4d5d05ab3d3059017a0d3e2a5c798a241da87</id>
<content type='text'>
A top-level font now has a list of fallback fonts. When a glyph cannot
be found, we try each fallback font in turn, until we either find one
that has the glyph, or until we've exhausted the list.

To make this actually work in practise (read: to make performance
acceptable), the cache is re-worked and is now populated on demand.

It also supports non-ASCII characters, by using the 4-byte unicode
character as index instead.

Since having an array that can be indexed by a 4-byte value isn't
really viable, we now have a simple hash table instead of an array.
</content>
</entry>
<entry>
<title>font: set FT load and render flags from FontConfig properties</title>
<updated>2019-07-29T18:10:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-29T18:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4302d3eb680e1bd88724b8d67a6659f44bcdf789'/>
<id>urn:sha1:4302d3eb680e1bd88724b8d67a6659f44bcdf789</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: populate glyph cache (ASCII characters only) when instantiating font</title>
<updated>2019-07-28T19:03:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-28T19:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fe882bddbab2b3c75220976ba01cc998773fdfa5'/>
<id>urn:sha1:fe882bddbab2b3c75220976ba01cc998773fdfa5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: add font_glyph_for_utf8()</title>
<updated>2019-07-28T18:37:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-28T18:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9e57ba21086abb15772ae7efda06e584d618cd19'/>
<id>urn:sha1:9e57ba21086abb15772ae7efda06e584d618cd19</id>
<content type='text'>
This function fills in a struct glyph with glyph bitmap data for the
provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo
surface).
</content>
</entry>
<entry>
<title>cairo-ft: remove all usages of cairo-ft</title>
<updated>2019-07-28T10:45:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-28T10:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=175dc9cf9483e389c2440a68b9472b1befc4d459'/>
<id>urn:sha1:175dc9cf9483e389c2440a68b9472b1befc4d459</id>
<content type='text'>
</content>
</entry>
<entry>
<title>font: load FreeType face, and set it's pixel sizes</title>
<updated>2019-07-28T10:09:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-28T10:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cb02c9cf416815c5d55254d3c81647b28ca0aa47'/>
<id>urn:sha1:cb02c9cf416815c5d55254d3c81647b28ca0aa47</id>
<content type='text'>
</content>
</entry>
</feed>
