Skip to content

Implement variable size printing #3

@KR155E

Description

@KR155E

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",

};`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions