fb: cfb: Fix print of ASCII chars from 128 to 255
Change the "c" variable type from char to uint8_t in get_glyph_ptr() and
draw_char_vtmono() to fix issues with the range check of the "c" value.
The easiest way to print localized text with Zephyr is
to ask GCC for compile-time conversion:
INCLUDE(${ZEPHYR_BASE}/cmake/cfb.cmake NO_POLICY_SCOPE)
GENERATE_CFB_FONT_FOR_TARGET(app
"${CMAKE_CURRENT_SOURCE_DIR}/fonts/koi8-u.png"
"${ZEPHYR_BINARY_DIR}/include/generated/cfb_font_dice.h"
8 16 --first 0 --last 255)
TARGET_COMPILE_OPTIONS(app PRIVATE
-finput-charset=UTF-8
-fexec-charset=KOI8-U)
Signed-off-by:
Oleh Kravchenko <oleg@kaa.org.ua>
Loading
Please sign in to comment