The existing 8x16 font is adequate for most purposes. It is small and fast. However for boot screens where information must be presented to the user, the console font is not ideal. Common requirements are larger and better-looking fonts. In many systems U-Boot is 'behind the scenes' and does not display user-facing data. For those situations where this is not the case, we need to present firmware screens with visually attractive menus.
This series adds a console driver which uses TrueType fonts built into U-Boot. It can render them at any size. This can be used in scripts to place text as needed on the display. This driver is not really designed to operate with the command line. Much of U-Boot expects a fixed-width font. But to keep things working correctly, rudimentary support for the console is provided. The main missing feature is support for command-line editing. The TrueType implementation is STB, a fairly light-weight TrueType-rendering implementation from http://nothings.org/. This integrates fairly easily with U-Boot. The driver is tested on sandbox and a few ARM hardware devices. It should be possible to use it on any hardware. The main new dependency is floating point which is available on many modern systems. Care is taken to ensure this dependency is isolated to this one driver. Simon Glass (19): video: Add stb TrueType font renderer Makefile: Add rules to build in .ttf files video kconfig console_normal video: Use fractional units for X coordinates video: Handle the 'bell' character video: Provide a left margin for the text console video: Provide a signal when a new console line is started video: Provide a backspace method video: Add a console driver that uses TrueType fonts video: Add the Nimbus sans font video: Add the AnkaCoder mono-spaced font video: Add the Rufscript handwriting font video: Add the Cantoraone decorative font License: Add the Open Font License video: Allow selection of the driver and font size video: sandbox: Allow selection of font size and console name video: sandbox: Enable truetype fonts for sandbox video: test: Add console tests for truetype video: Correct 'tor' typo in comment Licenses/OFL.txt | 97 + Licenses/README | 1 + configs/sandbox_defconfig | 4 +- drivers/video/Kconfig | 36 +- drivers/video/Makefile | 6 +- drivers/video/console_normal.c | 24 +- drivers/video/console_rotate.c | 66 +- drivers/video/console_truetype.c | 550 +++++ drivers/video/fonts/Kconfig | 51 + drivers/video/fonts/Makefile | 11 + drivers/video/fonts/ankacoder_c75_r.ttf | Bin 0 -> 65596 bytes drivers/video/fonts/cantoraone_regular.ttf | Bin 0 -> 163116 bytes drivers/video/fonts/nimbus_sans_l_regular.ttf | Bin 0 -> 61660 bytes drivers/video/fonts/rufscript010.ttf | Bin 0 -> 23080 bytes drivers/video/sandbox_sdl.c | 2 + drivers/video/stb_truetype.h | 3240 +++++++++++++++++++++++++ drivers/video/vidconsole-uclass.c | 84 +- drivers/video/video-uclass.c | 29 +- include/dm/test.h | 2 + include/video.h | 7 +- include/video_console.h | 70 +- scripts/Makefile.lib | 21 + test/dm/video.c | 90 +- 23 files changed, 4326 insertions(+), 65 deletions(-) create mode 100644 Licenses/OFL.txt create mode 100644 drivers/video/console_truetype.c create mode 100644 drivers/video/fonts/Kconfig create mode 100644 drivers/video/fonts/Makefile create mode 100644 drivers/video/fonts/ankacoder_c75_r.ttf create mode 100644 drivers/video/fonts/cantoraone_regular.ttf create mode 100644 drivers/video/fonts/nimbus_sans_l_regular.ttf create mode 100644 drivers/video/fonts/rufscript010.ttf create mode 100644 drivers/video/stb_truetype.h -- 2.6.0.rc2.230.g3dd15c0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot