diff --git a/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart b/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart index 9f477dcb0a..76f3a480d6 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart @@ -1,78 +1,7 @@ import 'package:flowy_infra/size.dart'; import 'package:flutter/material.dart'; -// preserved until deprecation -class Fonts { - static String general = "Poppins"; - - static String monospace = "SF Mono"; - - static String emoji = "Noto Color Emoji"; -} - class TextStyles { - // preserved until deprecation - static TextStyle general({ - double? fontSize, - FontWeight fontWeight = FontWeight.w500, - Color? color, - }) => - TextStyle( - fontFamily: Fonts.general, - fontSize: fontSize ?? FontSizes.s12, - color: color, - fontWeight: fontWeight, - fontFamilyFallback: [Fonts.emoji], - letterSpacing: (fontSize ?? FontSizes.s12) * 0.005, - ); - - static TextStyle monospace({ - String? fontFamily, - double? fontSize, - FontWeight fontWeight = FontWeight.w400, - }) => - TextStyle( - fontFamily: fontFamily ?? Fonts.monospace, - fontSize: fontSize ?? FontSizes.s12, - fontWeight: fontWeight, - fontFamilyFallback: [Fonts.emoji], - ); - - static TextStyle get title => general( - fontSize: FontSizes.s18, - fontWeight: FontWeight.w600, - ); - - static TextStyle get subheading => general( - fontSize: FontSizes.s16, - fontWeight: FontWeight.w600, - ); - - static TextStyle get subtitle => general( - fontSize: FontSizes.s16, - fontWeight: FontWeight.w600, - ); - - static TextStyle get body1 => general( - fontSize: FontSizes.s12, - fontWeight: FontWeight.w500, - ); - - static TextStyle get body2 => general( - fontSize: FontSizes.s12, - fontWeight: FontWeight.w400, - ); - - static TextStyle get callout => general( - fontSize: FontSizes.s11, - fontWeight: FontWeight.w600, - ); - - static TextStyle get caption => general( - fontSize: FontSizes.s11, - fontWeight: FontWeight.w400, - ); - final String font; final Color color;