From c912d6133c66df7cde3d64adc76941856a12da64 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Thu, 15 Feb 2018 10:20:04 -0500 Subject: Add color fonts. BUG=skia:7624 Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb Reviewed-on: https://skia-review.googlesource.com/109521 Commit-Queue: Ben Wagner Reviewed-by: Mike Klein Reviewed-by: Herb Derby --- tools/fonts/create_test_font_color.cpp | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tools/fonts/create_test_font_color.cpp (limited to 'tools/fonts/create_test_font_color.cpp') diff --git a/tools/fonts/create_test_font_color.cpp b/tools/fonts/create_test_font_color.cpp new file mode 100644 index 0000000000..c3f2e08f3f --- /dev/null +++ b/tools/fonts/create_test_font_color.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2014 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +// running create_test_font_color generates ./.ttx +// which are read by fonttools ttx to produce native fonts. + +#include "SkCommandLineFlags.h" +#include "SkRefCnt.h" +#include "SkStream.h" +#include "SkTestSVGTypeface.h" + +int main(int argc, char** argv) { + SkCommandLineFlags::Parse(argc, argv); + + sk_sp typeface = SkTestSVGTypeface::Default(); + + SkFILEWStream cbdt("cbdt.ttx"); + typeface->exportTtxCbdt(&cbdt); + cbdt.flush(); + cbdt.fsync(); + + SkFILEWStream sbix("sbix.ttx"); + typeface->exportTtxSbix(&sbix); + sbix.flush(); + sbix.fsync(); + + SkFILEWStream colr("colr.ttx"); + typeface->exportTtxColr(&colr); + colr.flush(); + colr.fsync(); + + return 0; +} -- cgit v1.2.3