1 // Copyright (c) 2009-2017 The OTS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
17 class OpenTypeGLYF
: public Table
{
19 explicit OpenTypeGLYF(Font
*font
, uint32_t tag
)
20 : Table(font
, tag
, tag
), maxp(NULL
) { }
22 bool Parse(const uint8_t *data
, size_t length
);
23 bool Serialize(OTSStream
*out
);
31 struct ComponentPointCount
{
32 ComponentPointCount() : accumulated_component_points(0) {};
33 uint32_t accumulated_component_points
;
34 std::vector
<GidAtLevel
> gid_stack
;
37 bool ParseFlagsForSimpleGlyph(Buffer
&glyph
,
40 uint32_t *coordinates_length
);
41 bool ParseSimpleGlyph(Buffer
&glyph
, int16_t num_contours
);
42 bool ParseCompositeGlyph(
44 ComponentPointCount
* component_point_count
);
47 bool TraverseComponentsCountingPoints(
49 uint16_t base_glyph_id
,
51 ComponentPointCount
* component_point_count
);
53 Buffer
GetGlyphBufferSection(
56 const std::vector
<uint32_t>& loca_offsets
,
61 std::vector
<std::pair
<const uint8_t*, size_t> > iov
;