Commit graph

5 commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen 2eec67acbb remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
2015-02-23 23:53:42 +01:00
David Herrmann 61d0326a5b terminal/unifont: add built-in fallback glyph
In case we cannot render a glyph, we want a fallback we can display
instead. If we rely on the font itself to provide the fallback character,
we have nothing to display if that character is not available. Therefore,
add a static fallback that we can use at any time.
2014-10-03 15:57:00 +02:00
David Herrmann fa96534573 terminal: add unifont_get_width/height()
Allow unifont users to retrieve the width and height of unifont glyphs. In
version 1 this is hard-coded as 8/16, but may be changed in the future.
2014-10-02 08:40:43 +02:00
David Herrmann c2977e5cb8 terminal: move unifont-internal.h to unifont.h
All the definitions are for outside users, so drop the -internal suffix.
Internal definitions are in unifont-def.h and unifont.c, no need to share
those.
2014-10-02 08:40:43 +02:00
David Herrmann 86db5dfb6d terminal: add unifont font-handling
The unifont layer of libsystemd-terminal provides a fallback font for
situations where no system-fonts are available, or if you don't want to
deal with traditional font-formats for some reasons.

The unifont API mmaps a pre-compiled bitmap font that was generated out of
GNU-Unifont font-data. This guarantees, that all users of the font will
share the pages in memory. Furthermore, the layout of the binary file
allows accessing glyph data in O(1) without pre-rendering glyphs etc. That
is, the OS can skip loading pages for glyphs that we never access.

Note that this is currently a test-run and we want to include the binary
file in the GNU-Unifont package. However, until it was considered stable
and accepted by the maintainers, we will ship it as part of systemd. So
far it's only enabled with the experimental --enable-terminal, anyway.
2014-07-18 17:45:33 +02:00