19 lines
676 B
C#
19 lines
676 B
C#
using HellionChat.Themes;
|
|
|
|
namespace HellionChat;
|
|
|
|
// Pure size resolution, split out of FontManager so it is unit-testable without
|
|
// building the font atlas. A typography override wins; null falls back to config.
|
|
internal static class FontSizeResolver
|
|
{
|
|
internal static float ResolveGlobalPt(
|
|
ThemeTypography? typography,
|
|
bool useHellionFont,
|
|
float fontSizeV2,
|
|
float globalSizePt
|
|
) => typography?.OverrideGlobalFontSizePt ?? (useHellionFont ? fontSizeV2 : globalSizePt);
|
|
|
|
internal static float ResolveSymbolsPt(ThemeTypography? typography, float symbolsSizePt) =>
|
|
typography?.OverrideSymbolsFontSizePt ?? symbolsSizePt;
|
|
}
|