Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkOTTable_EBLC.h
Go to the documentation of this file.
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#ifndef SkOTTable_EBLC_DEFINED
9#define SkOTTable_EBLC_DEFINED
10
11#include "src/base/SkEndian.h"
14
15#pragma pack(push, 1)
16
18 static const SK_OT_CHAR TAG0 = 'E';
19 static const SK_OT_CHAR TAG1 = 'B';
20 static const SK_OT_CHAR TAG2 = 'L';
21 static const SK_OT_CHAR TAG3 = 'C';
23
26
28
43
45 SK_OT_ULONG indexSubTableArrayOffset; //offset to indexSubtableArray from beginning of EBLC.
46 SK_OT_ULONG indexTablesSize; //number of bytes in corresponding index subtables and array
47 SK_OT_ULONG numberOfIndexSubTables; //an index subtable for each range or format change
48 SK_OT_ULONG colorRef; //not used; set to 0.
49 SbitLineMetrics hori; //line metrics for text rendered horizontally
50 SbitLineMetrics vert; //line metrics for text rendered vertically
51 SK_OT_USHORT startGlyphIndex; //lowest glyph index for this size
52 SK_OT_USHORT endGlyphIndex; //highest glyph index for this size
53 SK_OT_BYTE ppemX; //horizontal pixels per Em
54 SK_OT_BYTE ppemY; //vertical pixels per Em
55 struct BitDepth {
57 BW = 1,
58 Gray4 = 2,
59 Gray16 = 4,
61 };
63 } bitDepth; //the Microsoft rasterizer v.1.7 or greater supports
64 union Flags {
65 struct Field {
66 //0-7
68 Horizontal, // Horizontal small glyph metrics
69 Vertical, // Vertical small glyph metrics
70 Reserved02,
71 Reserved03,
72 Reserved04,
73 Reserved05,
74 Reserved06,
75 Reserved07)
77 struct Raw {
78 static const SK_OT_CHAR Horizontal = 1u << 0;
79 static const SK_OT_CHAR Vertical = 1u << 1;
81 } raw;
83 }; //bitmapSizeTable[numSizes];
84
86 SK_OT_USHORT firstGlyphIndex; //first glyph code of this range
87 SK_OT_USHORT lastGlyphIndex; //last glyph code of this range (inclusive)
88 SK_OT_ULONG additionalOffsetToIndexSubtable; //add to BitmapSizeTable::indexSubTableArrayOffset to get offset from beginning of 'EBLC'
89 }; //indexSubTableArray[BitmapSizeTable::numberOfIndexSubTables];
90
92 SK_OT_USHORT indexFormat; //format of this indexSubTable
93 SK_OT_USHORT imageFormat; //format of 'EBDT' image data
94 SK_OT_ULONG imageDataOffset; //offset to image data in 'EBDT' table
95 };
96
97 // Variable metrics glyphs with 4 byte offsets
100 //SK_OT_ULONG offsetArray[lastGlyphIndex - firstGlyphIndex + 1 + 1]; //last element points to one past end of last glyph
101 //glyphData = offsetArray[glyphIndex - firstGlyphIndex] + imageDataOffset
102 };
103
104 // All Glyphs have identical metrics
107 SK_OT_ULONG imageSize; // all glyphs are of the same size
108 SkOTTableEmbeddedBitmapData::BigGlyphMetrics bigMetrics; // all glyphs have the same metrics; glyph data may be compressed, byte-aligned, or bit-aligned
109 };
110
111 // Variable metrics glyphs with 2 byte offsets
114 //SK_OT_USHORT offsetArray[lastGlyphIndex - firstGlyphIndex + 1 + 1]; //last element points to one past end of last glyph, may have extra element to force even number of elements
115 //glyphData = offsetArray[glyphIndex - firstGlyphIndex] + imageDataOffset
116 };
117
118 // Variable metrics glyphs with sparse glyph codes
124 SK_OT_USHORT offset; //location in EBDT
125 }; //glyphArray[numGlyphs+1]
126 };
127
128 // Constant metrics glyphs with sparse glyph codes
131 SK_OT_ULONG imageSize; //all glyphs have the same data size
134 //SK_OT_USHORT glyphCodeArray[numGlyphs] //must have even number of entries (set pad to 0)
135 };
136
145
146};
147
148#pragma pack(pop)
149
150#endif
#define SkTEndian_SwapBE32(n)
Definition SkEndian.h:143
uint8_t SK_OT_BYTE
uint16_t SK_OT_USHORT
uint32_t SK_OT_ULONG
int8_t SK_OT_CHAR
int32_t SK_OT_Fixed
#define SK_OT_BYTE_BITFIELD
union SkOTTableEmbeddedBitmapLocation::BitmapSizeTable::Flags flags
struct SkOTTableEmbeddedBitmapLocation::BitmapSizeTable::BitDepth bitDepth
SkOTTableEmbeddedBitmapData::BigGlyphMetrics bigMetrics
SkOTTableEmbeddedBitmapData::BigGlyphMetrics bigMetrics
static const SK_OT_Fixed version_initial
static const SK_OT_CHAR TAG2
static const SK_OT_CHAR TAG0
static const SK_OT_ULONG TAG
static const SK_OT_CHAR TAG1
static const SK_OT_CHAR TAG3
struct SkOTTableEmbeddedBitmapLocation::BitmapSizeTable::Flags::Field field
struct SkOTTableEmbeddedBitmapLocation::BitmapSizeTable::Flags::Raw raw