diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-03-09 15:14:50 +0100 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-03-09 15:47:20 +0100 |
| commit | e2e000a0b22036a72474088d3399097ff47ace02 (patch) | |
| tree | a6aba65c71c1591c07c1173afe8523204301a039 /lib/fonts | |
| parent | 04bd5abc8cbebc1bd7e02471a8e3af51b8aad029 (diff) | |
lib/fonts: Read font size with font_data_size()
Add font_data_size() and update consoles to use it.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'lib/fonts')
| -rw-r--r-- | lib/fonts/fonts.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/fonts/fonts.c b/lib/fonts/fonts.c index a7f118b30171..8c9a6762061c 100644 --- a/lib/fonts/fonts.c +++ b/lib/fonts/fonts.c @@ -20,6 +20,27 @@ #endif #include <linux/font.h> +/* + * Helpers for font_data_t + */ + +/** + * font_data_size - Return size of the font data in bytes + * @fd: Font data + * + * Returns: + * The number of bytes in the given font data. + */ +unsigned int font_data_size(font_data_t *fd) +{ + return FNTSIZE(fd); +} +EXPORT_SYMBOL_GPL(font_data_size); + +/* + * Font lookup + */ + static const struct font_desc *fonts[] = { #ifdef CONFIG_FONT_8x8 &font_vga_8x8, |
