feat(TextComponent): enhance text styling with dynamic font weights and improved layout
Some checks failed
Frontend CI / build-and-push-web (push) Successful in 3m7s
Frontend CI / ota-android (push) Successful in 13m37s
Frontend CI / build-android-apk (push) Failing after 54m7s

- Updated Text component to support dynamic font weights, allowing for more flexible text styling.
- Refactored variant styles to utilize new font weight constants for better consistency across text variants.
- Introduced letter spacing adjustments for improved readability and visual appeal.
- Added font family configuration for iOS and Android to optimize typography across platforms.
This commit is contained in:
lafay
2026-03-26 03:58:09 +08:00
parent 6d1514b2d1
commit b6583e07c8
2 changed files with 54 additions and 12 deletions

View File

@@ -2,6 +2,39 @@
* 与明暗无关的设计 token
*/
// 字体配置 - 使用系统字体栈,优化字重
export const fontFamily = {
// iOS 系统字体
ios: {
regular: 'System',
medium: 'System',
semibold: 'System',
bold: 'System',
},
// Android 系统字体
android: {
regular: 'Roboto',
medium: 'Roboto',
semibold: 'Roboto',
bold: 'Roboto',
},
// 通用字体栈
system: {
regular: 'System',
medium: 'System',
semibold: 'System',
bold: 'System',
},
};
// 字体字重 - 使用数值更精确控制
export const fontWeights = {
regular: '400' as const,
medium: '500' as const,
semibold: '600' as const,
bold: '700' as const,
};
export const fontSizes = {
xs: 10,
sm: 12,