Flutter Engine
The Flutter Engine
third_party
skia
src
core
SkFontStream.h
Go to the documentation of this file.
1
/*
2
* Copyright 2013 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
#ifndef SkFontStream_DEFINED
9
#define SkFontStream_DEFINED
10
11
#include "
include/core/SkTypeface.h
"
12
13
#include <cstddef>
14
15
class
SkStream
;
16
17
class
SkFontStream
{
18
public
:
19
/**
20
* Return the number of shared directories inside a TTC sfnt, or return 1
21
* if the stream is a normal sfnt (ttf). If there is an error or
22
* no directory is found, return 0.
23
*
24
* Note: the stream is rewound initially, but is returned at an arbitrary
25
* read offset.
26
*/
27
static
int
CountTTCEntries
(
SkStream
*);
28
29
/**
30
* @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt.
31
*
32
* Note: the stream is rewound initially, but is returned at an arbitrary
33
* read offset.
34
*/
35
static
int
GetTableTags
(
SkStream
*,
int
ttcIndex,
SkFontTableTag
tags[]);
36
37
/**
38
* @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt.
39
*
40
* Note: the stream is rewound initially, but is returned at an arbitrary
41
* read offset.
42
*/
43
static
size_t
GetTableData
(
SkStream
*,
int
ttcIndex,
SkFontTableTag
tag,
44
size_t
offset
,
size_t
length
,
void
*
data
);
45
46
static
size_t
GetTableSize
(
SkStream
*
stream
,
int
ttcIndex,
SkFontTableTag
tag) {
47
return
GetTableData
(
stream
, ttcIndex, tag, 0, ~0
U
,
nullptr
);
48
}
49
};
50
51
#endif
SkTypeface.h
SkFontTableTag
uint32_t SkFontTableTag
Definition:
SkTypeface.h:41
SkFontStream
Definition:
SkFontStream.h:17
SkFontStream::GetTableData
static size_t GetTableData(SkStream *, int ttcIndex, SkFontTableTag tag, size_t offset, size_t length, void *data)
Definition:
SkFontStream.cpp:175
SkFontStream::GetTableTags
static int GetTableTags(SkStream *, int ttcIndex, SkFontTableTag tags[])
Definition:
SkFontStream.cpp:160
SkFontStream::GetTableSize
static size_t GetTableSize(SkStream *stream, int ttcIndex, SkFontTableTag tag)
Definition:
SkFontStream.h:46
SkFontStream::CountTTCEntries
static int CountTTCEntries(SkStream *)
Definition:
SkFontStream.cpp:143
SkStream
Definition:
SkStream.h:29
length
size_t length
Definition:
key_event_handler.cc:41
dart::compiler::U
@ U
Definition:
assembler_arm.h:71
dart_profiler_symbols.stream
stream
Definition:
dart_profiler_symbols.py:81
offset
SeparatedVector2 offset
Definition:
stroke_path_geometry.cc:311
data
std::shared_ptr< const fml::Mapping > data
Definition:
texture_gles.cc:63
Generated on Sun Jun 23 2024 21:56:12 for Flutter Engine by
1.9.4