Index: sky/sdk/lib/painting/text_style.dart |
diff --git a/sky/sdk/lib/painting/text_style.dart b/sky/sdk/lib/painting/text_style.dart |
index 19d3c547e0447c9560d92de91ce36220cb91490f..cf8a7422e936b1ef02746941c1e302a9001d4b56 100644 |
--- a/sky/sdk/lib/painting/text_style.dart |
+++ b/sky/sdk/lib/painting/text_style.dart |
@@ -74,6 +74,7 @@ class TextStyle { |
TextStyle copyWith({ |
Color color, |
+ String fontFamily, |
double fontSize, |
FontWeight fontWeight, |
TextAlign textAlign, |
@@ -97,6 +98,19 @@ class TextStyle { |
return 'rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha / 255.0})'; |
} |
+ TextStyle merge(TextStyle other) { |
+ return copyWith( |
+ color: other.color, |
+ fontFamily: other.fontFamily, |
+ fontSize: other.fontSize, |
+ fontWeight: other.fontWeight, |
+ textAlign: other.textAlign, |
+ decoration: other.decoration, |
+ decorationColor: other.decorationColor, |
+ decorationStyle: other.decorationStyle |
+ ); |
+ } |
+ |
static String _fontFamilyToCSSString(String fontFamily) { |
// TODO(hansmuller): escape the fontFamily string. |
return fontFamily; |