diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-04-07 11:23:14 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-04-07 17:38:07 +0200 |
| commit | 97df8960240afc47c2349d008b0993e7727bbda5 (patch) | |
| tree | 27d0e8bf365339335652e27ac8e6756ef6defaca /lib | |
| parent | c713b96427ce5c4a74b8babe14137451ac3ffe54 (diff) | |
| download | lwn-97df8960240afc47c2349d008b0993e7727bbda5.tar.gz lwn-97df8960240afc47c2349d008b0993e7727bbda5.zip | |
lib/fonts: Provide helpers for calculating glyph pitch and size
Implement pitch and size calculation for a single font glyph in the
new helpers font_glyph_pitch() and font_glyph_size(). Replace the
instances where the calculations are open-coded.
Note that in the case of fbcon console rotation, the parameters for
a glyph's width and height might be reversed. This is intentional.
v2:
- fix typos in commit message
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fonts/fonts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fonts/fonts.c b/lib/fonts/fonts.c index 5938f542906b..f5d5333450a0 100644 --- a/lib/fonts/fonts.c +++ b/lib/fonts/fonts.c @@ -26,7 +26,7 @@ #include "font.h" -#define console_font_pitch(font) DIV_ROUND_UP((font)->width, 8) +#define console_font_pitch(font) font_glyph_pitch((font)->width) /* * Helpers for font_data_t |
