]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
lib/fonts: Provide helpers for calculating glyph pitch and size
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 7 Apr 2026 09:23:14 +0000 (11:23 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 7 Apr 2026 15:38:07 +0000 (17:38 +0200)
commit97df8960240afc47c2349d008b0993e7727bbda5
tree27d0e8bf365339335652e27ac8e6756ef6defaca
parentc713b96427ce5c4a74b8babe14137451ac3ffe54
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>
drivers/tty/vt/vt.c
drivers/video/fbdev/core/fbcon_ccw.c
drivers/video/fbdev/core/fbcon_cw.c
drivers/video/fbdev/core/fbcon_rotate.c
drivers/video/fbdev/core/fbcon_ud.c
include/linux/font.h
lib/fonts/fonts.c