]> git.dujemihanovic.xyz Git - u-boot.git/commit
console: Correct truetype spacing error
authorSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2023 16:22:36 +0000 (10:22 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 14 Jul 2023 16:54:51 +0000 (12:54 -0400)
commita8f80409b06a39605aadaaf64bdbf71b31d463ca
tree90dcc296aa1837b769024fd73a175119ea7c10c9
parent14a86a510792cb8a69ded6ea3b6c34a150bae3ab
console: Correct truetype spacing error

The putc_xy() method is supposed to return the amount of space used. The
existing implementation erroneously adds the previous sub-pixel position
to the returned value. This spaces out the characters very slightly more
than it should. It is seldom noticeable but it does make accurate
measurement of the text impossible.

Fix this minor but long-standing bug.

Fixes: a29b012037c ("video: Add a console driver that uses TrueType fonts")
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/console_truetype.c
test/dm/video.c