Ben Wagner | c912d61 | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | // running create_test_font_color generates ./<cbdt|sbix|cpal>.ttx |
| 9 | // which are read by fonttools ttx to produce native fonts. |
| 10 | |
| 11 | #include "SkCommandLineFlags.h" |
| 12 | #include "SkRefCnt.h" |
| 13 | #include "SkStream.h" |
| 14 | #include "SkTestSVGTypeface.h" |
| 15 | |
| 16 | int main(int argc, char** argv) { |
| 17 | SkCommandLineFlags::Parse(argc, argv); |
| 18 | |
| 19 | sk_sp<SkTestSVGTypeface> typeface = SkTestSVGTypeface::Default(); |
| 20 | |
| 21 | SkFILEWStream cbdt("cbdt.ttx"); |
| 22 | typeface->exportTtxCbdt(&cbdt); |
| 23 | cbdt.flush(); |
| 24 | cbdt.fsync(); |
| 25 | |
| 26 | SkFILEWStream sbix("sbix.ttx"); |
| 27 | typeface->exportTtxSbix(&sbix); |
| 28 | sbix.flush(); |
| 29 | sbix.fsync(); |
| 30 | |
| 31 | SkFILEWStream colr("colr.ttx"); |
| 32 | typeface->exportTtxColr(&colr); |
| 33 | colr.flush(); |
| 34 | colr.fsync(); |
| 35 | |
| 36 | return 0; |
| 37 | } |