mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 13:55:54 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user