Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement variable size printing #3

Open
KR155E opened this issue Oct 10, 2022 · 0 comments
Open

Implement variable size printing #3

KR155E opened this issue Oct 10, 2022 · 0 comments

Comments

@KR155E
Copy link
Member

KR155E commented Oct 10, 2022

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

};`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant