1 // Copyright (c) 2011 The Chromium 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.
16 struct OpenTypeMetricsHeader
{
21 uint16_t adv_width_max
;
25 int16_t caret_slope_rise
;
26 int16_t caret_slope_run
;
31 struct OpenTypeMetricsTable
{
32 std::vector
<std::pair
<uint16_t, int16_t> > entries
;
33 std::vector
<int16_t> sbs
;
36 bool ParseMetricsHeader(Font
*font
, Buffer
*table
,
37 OpenTypeMetricsHeader
*header
);
38 bool SerialiseMetricsHeader(const ots::Font
*font
,
40 const OpenTypeMetricsHeader
*header
);
42 bool ParseMetricsTable(const ots::Font
*font
,
44 const uint16_t num_glyphs
,
45 const OpenTypeMetricsHeader
*header
,
46 OpenTypeMetricsTable
*metrics
);
47 bool SerialiseMetricsTable(const ots::Font
*font
,
49 const OpenTypeMetricsTable
*metrics
);
53 #endif // OTS_METRICS_H_