settings_ui: Add UI and buffer font weight controls (#15104)

This PR adds settings controls for the UI and buffer font weight
settings.

It also does some work around grouping the settings into related
sections.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-24 14:09:13 -04:00 committed by GitHub
parent 7fb906d774
commit 274e56b086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 557 additions and 272 deletions

View file

@ -595,6 +595,19 @@ impl FontWeight {
pub const EXTRA_BOLD: FontWeight = FontWeight(800.0);
/// Black weight (900), the thickest value.
pub const BLACK: FontWeight = FontWeight(900.0);
/// All of the font weights, in order from thinnest to thickest.
pub const ALL: [FontWeight; 9] = [
Self::THIN,
Self::EXTRA_LIGHT,
Self::LIGHT,
Self::NORMAL,
Self::MEDIUM,
Self::SEMIBOLD,
Self::BOLD,
Self::EXTRA_BOLD,
Self::BLACK,
];
}
/// Allows italic or oblique faces to be selected.