| 260 | } |
| 261 | |
| 262 | const char* SdCardFontRegistry::defaultWriteRoot() { |
| 263 | // If exactly one of the roots already exists, keep using it. Otherwise |
| 264 | // (neither exists, or both exist) prefer the hidden root for new installs. |
| 265 | bool hiddenExists = Storage.exists(FONTS_DIR_HIDDEN); |
| 266 | bool visibleExists = Storage.exists(FONTS_DIR_VISIBLE); |
| 267 | if (hiddenExists) return FONTS_DIR_HIDDEN; |
| 268 | if (visibleExists) return FONTS_DIR_VISIBLE; |
| 269 | return FONTS_DIR_HIDDEN; |
| 270 | } |
| 271 | |
| 272 | const SdCardFontFamilyInfo* SdCardFontRegistry::findFamily(const std::string& name) const { |
| 273 | for (const auto& f : families_) { |