rendfont.cpp,rendlay.cpp: add font support to <text> components
#14533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.





For discussion: improves the layout
<text>component to allow specifying the font and style to use, with fairly minimal changes to the layout rendering system.This adds a "font" attribute to the
<text>layout component, defaulting to"default"if nothing is specified.It also changes the
render_fontconstructor to accept not just a single "filename" but a comma-separated list of "filenames". These actually don't seem to be file names at all, but font specifications that may be symbolic (like the default"Liberation Sans|Regular"infont_osd.cpp), which includes a|separator between font family and style; so adding another separator between different font specifications seems a not unreasonable thing, but is of course open to be changed.This is in turn used in the layouts for the Ensoniq VFX family of keyboards, including the
sd132, to use the correct Bold, Italic and Regular styles of a suitable Helvetica-compatible sans-serif font, falling back to "default" of nothing else is found. This includes a first choice of an explicitly nonexistent font to demonstrate that the list of fonts is in fact traversed.The labels along the thick coloured line - including 'Performance', 'Sequencer' and 'Programming' - are all in Bold; the labels above the buttons - 'Volume', 'Pan', 'Timbre', etc - are all Italic; and the extra little labels between white lines, 'Tracks' and 'Edit', are in Regular style (neither Bold nor Italic).