fix(article): fix Opus article body font size too small (#1897)

New Opus format uses font_level string instead of numeric font_size,
causing font size to fall back to Flutter theme default (14px) instead
of the expected 16px. Added Word.effectiveFontSize: small→13px,
others→16px (consistent with legacy HTML article format).
This commit is contained in:
Starfallen
2026-04-23 21:17:43 +08:00
committed by GitHub
parent 79c9849c80
commit 354282930c
2 changed files with 8 additions and 1 deletions

View File

@@ -134,6 +134,13 @@ class Word {
);
fontLevel = json['font_level'];
}
// font_level 映射处理:
// "small" → 13px
// "regular" → 16px与旧版 HTML 专栏基准一致)
// 其余/null → 同 regular
double get effectiveFontSize =>
fontSize ?? (fontLevel == 'small' ? 13.0 : 16.0);
}
class Style {