[svg] Parse text attributes
Convert font-family, font-size, font-style and font-weight to
presentation attributes, and add parsing utils.
Bug: skia:10840
Change-Id: I1acdb59bc95fe46e67ed0f499dd0732420016663
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328436
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
diff --git a/modules/svg/src/SkSVGAttribute.cpp b/modules/svg/src/SkSVGAttribute.cpp
index 5bdb65b..0ccea49 100644
--- a/modules/svg/src/SkSVGAttribute.cpp
+++ b/modules/svg/src/SkSVGAttribute.cpp
@@ -28,5 +28,10 @@
result.fColor.set(SkSVGColorType(SK_ColorBLACK));
+ result.fFontFamily.init("Sans");
+ result.fFontStyle.init(SkSVGFontStyle::Type::kNormal);
+ result.fFontSize.init(SkSVGLength(24));
+ result.fFontWeight.init(SkSVGFontWeight(SkSVGFontWeight::Type::kNormal));
+
return result;
}