Factor out construction of font-related JSON schemas (#15341)

This PR factors out the construction of the font-related JSON schemas,
as they were used in multiple places.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-27 12:28:50 -04:00 committed by GitHub
parent 1ffb34c5fc
commit b8982ad385
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 44 additions and 72 deletions

View file

@ -17,6 +17,8 @@ use std::{
};
use util::{merge_non_null_json_value_into, RangeExt, ResultExt as _};
use crate::SettingsJsonSchemaParams;
/// A value that can be defined as a user setting.
///
/// Settings can be loaded from a combination of multiple JSON files.
@ -146,12 +148,6 @@ pub struct SettingsLocation<'a> {
pub path: &'a Path,
}
pub struct SettingsJsonSchemaParams<'a> {
pub staff_mode: bool,
pub language_names: &'a [String],
pub font_names: &'a [String],
}
/// A set of strongly-typed setting values defined via multiple JSON files.
pub struct SettingsStore {
setting_values: HashMap<TypeId, Box<dyn AnySettingValue>>,