chore: Move opendyslexic from flash to SD (#2231)

This commit is contained in:
Uri Tauber
2026-06-01 13:49:57 -04:00
committed by GitHub
parent 50e4d550fb
commit b12839d1d4
53 changed files with 38 additions and 49204 deletions
+11 -23
View File
@@ -194,7 +194,17 @@ bool CrossPointSettings::loadFromBinaryFile() {
if (++settingsRead >= fileSettingsCount) break;
readAndValidate(inputFile, sideButtonLayout, SIDE_BUTTON_LAYOUT_COUNT);
if (++settingsRead >= fileSettingsCount) break;
readAndValidate(inputFile, fontFamily, FONT_FAMILY_COUNT);
{
uint8_t legacyFontFamily;
serialization::readPod(inputFile, legacyFontFamily);
if (legacyFontFamily < BUILTIN_FONT_COUNT) {
fontFamily = legacyFontFamily;
} else if (legacyFontFamily == LEGACY_OPENDYSLEXIC) {
fontFamily = NOTOSERIF;
strncpy(sdFontFamilyName, "OpenDyslexic", sizeof(sdFontFamilyName) - 1);
sdFontFamilyName[sizeof(sdFontFamilyName) - 1] = '\0';
}
}
if (++settingsRead >= fileSettingsCount) break;
readAndValidate(inputFile, fontSize, FONT_SIZE_COUNT);
if (++settingsRead >= fileSettingsCount) break;
@@ -308,16 +318,6 @@ float CrossPointSettings::getReaderLineCompression() const {
case WIDE:
return 1.0f;
}
case OPENDYSLEXIC:
switch (lineSpacing) {
case TIGHT:
return 0.90f;
case NORMAL:
default:
return 0.95f;
case WIDE:
return 1.0f;
}
}
}
@@ -378,17 +378,5 @@ int CrossPointSettings::getReaderFontId() const {
case EXTRA_LARGE:
return NOTOSANS_18_FONT_ID;
}
case OPENDYSLEXIC:
switch (fontSize) {
case SMALL:
return OPENDYSLEXIC_8_FONT_ID;
case MEDIUM:
default:
return OPENDYSLEXIC_10_FONT_ID;
case LARGE:
return OPENDYSLEXIC_12_FONT_ID;
case EXTRA_LARGE:
return OPENDYSLEXIC_14_FONT_ID;
}
}
}