provide new line-distance property for built-in fonts

This commit is contained in:
Lephe 2024-09-15 18:44:44 +02:00
parent aba6c280b6
commit ccdd4c227c
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 9 additions and 3 deletions

View file

@ -289,10 +289,14 @@ typedef struct
/* Number of total glyphs */ /* Number of total glyphs */
uint32_t glyph_count; uint32_t glyph_count;
/* Character spacing (usually 1) */ /* Character spacing (usually 1) */
uint8_t char_spacing; uint8_t char_spacing;
/* Distance between the y positions for two consecutive lines. This is
an informative metric for text wrapping tools, not used by dtext()
and other standard functions that always write a single line. */
uint8_t line_distance;
uint :24; uint :16;
struct { struct {
/* Unicode point of first character in block */ /* Unicode point of first character in block */

View file

@ -5,6 +5,7 @@ font5x7.png:
grid.size: 5x7 grid.size: 5x7
grid.padding: 1 grid.padding: 1
grid.border: 0 grid.border: 0
line-distance: 8
font8x9.png: font8x9.png:
name: gint_font8x9 name: gint_font8x9
@ -15,3 +16,4 @@ font8x9.png:
grid.border: 0 grid.border: 0
proportional: true proportional: true
height: 9 height: 9
line-distance: 14