MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / getReaderFontId

Method getReaderFontId

src/CrossPointSettings.cpp:347–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347int CrossPointSettings::getReaderFontId() const {
348 // Check SD card font first
349 if (sdFontFamilyName[0] != '\0' && sdFontIdResolver) {
350 int id = sdFontIdResolver(sdFontResolverCtx, sdFontFamilyName, fontSize);
351 if (id != 0) return id;
352 // Fall through to built-in if SD font not found
353 }
354
355 switch (fontFamily) {
356 case NOTOSERIF:
357 default:
358 switch (fontSize) {
359 case SMALL:
360 return NOTOSERIF_12_FONT_ID;
361 case MEDIUM:
362 default:
363 return NOTOSERIF_14_FONT_ID;
364 case LARGE:
365 return NOTOSERIF_16_FONT_ID;
366 case EXTRA_LARGE:
367 return NOTOSERIF_18_FONT_ID;
368 }
369 case NOTOSANS:
370 switch (fontSize) {
371 case SMALL:
372 return NOTOSANS_12_FONT_ID;
373 case MEDIUM:
374 default:
375 return NOTOSANS_14_FONT_ID;
376 case LARGE:
377 return NOTOSANS_16_FONT_ID;
378 case EXTRA_LARGE:
379 return NOTOSANS_18_FONT_ID;
380 }
381 }
382}

Callers 5

initializeReaderMethod · 0.80
renderMethod · 0.80
renderContentsMethod · 0.80
renderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected