VUEngine-Core icon indicating copy to clipboard operation
VUEngine-Core copied to clipboard

Implement variable size printing

Open KR155E opened this issue 2 years ago • 0 comments

Implement support for variable size printing for more beautiful text. And to fit more of it on the screen, as well. This could potentially be done using an object for each character or through direct printing pixels on the printing bgmap.

An approach using OBJs has been implemented in the past but was removed shortly after.

VUEngine Studio's font editor already supports defining variable widths, although the feature is currently commented out.

An updated FontSpec supporting the feature could look like the following. Mind the new "mode", "variable height" and "variable width" values.

`FontROMSpec ExampleFont = { // font charset spec pointer (CharSetSpec*)&ExampleFontCharSet,

// mode (__FONT_BGMAP, __FONT_OBJECT)
__FONT_OBJECT,

// character number at which the font starts, allows you to skip the control characters for example
13,

// number of characters in this font
26,

// number of characters per line in charset
16,

// size of a single character (in chars) ({width, height})
{1, 1},

// variable size height (in pixels)
6,

// variable size width (in pixels)
{6, 6, 6, 6, 6, 6, 7, 5, 6, 6, 5, 6, ...},

// font's name
"Example",

};`

KR155E avatar Oct 10 '22 16:10 KR155E