Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: trunk/src/core/SkFontStream.h

Issue 12485002: start to plumb ttcIndex into fonthost. For now just add to SkFontStream and its callers. (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/core/SkFontStream.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkFontStream_DEFINED 8 #ifndef SkFontStream_DEFINED
9 #define SkFontStream_DEFINED 9 #define SkFontStream_DEFINED
10 10
11 class SkStream; 11 class SkStream;
12 12
13 #include "SkTypeface.h" 13 #include "SkTypeface.h"
14 14
15 class SkFontStream { 15 class SkFontStream {
16 public: 16 public:
17 /** 17 /**
18 * Return the number of shared 'fonts' inside a TTC sfnt, or return 0
19 * if the stream is a normal sfnt (not a TTC).
20 *
18 * Note: the stream is rewound initially, but is returned at an arbitrary 21 * Note: the stream is rewound initially, but is returned at an arbitrary
19 * read offset. 22 * read offset.
20 */ 23 */
21 static int GetTableTags(SkStream*, SkFontTableTag tags[]); 24 static int CountTTCEntries(SkStream*);
22 25
23 /** 26 /**
27 * @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt.
28 *
24 * Note: the stream is rewound initially, but is returned at an arbitrary 29 * Note: the stream is rewound initially, but is returned at an arbitrary
25 * read offset. 30 * read offset.
26 */ 31 */
27 static size_t GetTableData(SkStream*, SkFontTableTag tag, 32 static int GetTableTags(SkStream*, int ttcIndex, SkFontTableTag tags[]);
33
34 /**
35 * @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt.
36 *
37 * Note: the stream is rewound initially, but is returned at an arbitrary
38 * read offset.
39 */
40 static size_t GetTableData(SkStream*, int ttcIndex, SkFontTableTag tag,
28 size_t offset, size_t length, void* data); 41 size_t offset, size_t length, void* data);
29 }; 42 };
30 43
31 #endif 44 #endif
OLDNEW
« no previous file with comments | « no previous file | trunk/src/core/SkFontStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698