blob: c3f2e08f3ff9fe52248b7220f4101662b1da20de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 ./<cbdt|sbix|cpal>.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<SkTestSVGTypeface> 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;
}
|