| Index: experimental/webtry/webtry.go
|
| diff --git a/experimental/webtry/webtry.go b/experimental/webtry/webtry.go
|
| index 36c7afe5db6d428582d2a1fb4b45645940d0ac88..947eca7aa0d5d9ba7e544fa8aa3d6d6184841e17 100644
|
| --- a/experimental/webtry/webtry.go
|
| +++ b/experimental/webtry/webtry.go
|
| @@ -372,11 +372,12 @@ func expandCode(code string, source int) (string, error) {
|
| // TODO(humper): Make this more robust, supporting things like setTypeface
|
|
|
| inputCodeLines := strings.Split(code, "\n")
|
| - outputCodeLines := []string{}
|
| + outputCodeLines := []string{"DECLARE_bool(portableFonts);"}
|
| for _, line := range inputCodeLines {
|
| outputCodeLines = append(outputCodeLines, line)
|
| - if strings.HasPrefix(strings.TrimSpace(line), "SkPaint ") {
|
| - outputCodeLines = append(outputCodeLines, "sk_tool_utils::set_portable_typeface(&p);")
|
| + if strings.HasPrefix(strings.TrimSpace(line), "SkPaint p") {
|
| + outputCodeLines = append(outputCodeLines, "FLAGS_portableFonts = true;")
|
| + outputCodeLines = append(outputCodeLines, "sk_tool_utils::set_portable_typeface(&p, \"Helvetica\", SkTypeface::kNormal);")
|
| }
|
| }
|
|
|
|
|