98 lines
2.1 KiB
Dart
98 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'yanting_tokens.dart';
|
|
|
|
abstract final class YantingText {
|
|
static const fontFamily = 'DM Sans';
|
|
static const fontFallback = [
|
|
'PingFang SC',
|
|
'Microsoft YaHei',
|
|
'Helvetica Neue',
|
|
'Arial',
|
|
'sans-serif',
|
|
];
|
|
|
|
static const appTitle = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 34,
|
|
height: 1.15,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w800,
|
|
);
|
|
|
|
static const sectionTitle = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 22,
|
|
height: 1.2,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w700,
|
|
);
|
|
|
|
static const cardTitle = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 19,
|
|
height: 1.4,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w600,
|
|
);
|
|
|
|
static const listTitle = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 16.5,
|
|
height: 1.45,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w600,
|
|
);
|
|
|
|
static const body = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 15,
|
|
height: 1.6,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w400,
|
|
);
|
|
|
|
static const sub = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 15,
|
|
height: 1.45,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w400,
|
|
);
|
|
|
|
static const meta = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 13,
|
|
height: 1.5,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w400,
|
|
fontFeatures: YantingTypographyFeatures.tabularNums,
|
|
);
|
|
|
|
static const chip = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 15,
|
|
height: 1.2,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w500,
|
|
);
|
|
|
|
static const badge = TextStyle(
|
|
fontFamily: fontFamily,
|
|
fontFamilyFallback: fontFallback,
|
|
fontSize: 12,
|
|
height: 1.5,
|
|
letterSpacing: 0,
|
|
fontWeight: FontWeight.w500,
|
|
fontFeatures: YantingTypographyFeatures.tabularNums,
|
|
);
|
|
}
|