1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/ots/src/vdmx.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +// Copyright (c) 2009 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef OTS_VDMX_H_ 1.9 +#define OTS_VDMX_H_ 1.10 + 1.11 +#include <vector> 1.12 + 1.13 +#include "ots.h" 1.14 + 1.15 +namespace ots { 1.16 + 1.17 +struct OpenTypeVDMXRatioRecord { 1.18 + uint8_t charset; 1.19 + uint8_t x_ratio; 1.20 + uint8_t y_start_ratio; 1.21 + uint8_t y_end_ratio; 1.22 +}; 1.23 + 1.24 +struct OpenTypeVDMXVTable { 1.25 + uint16_t y_pel_height; 1.26 + int16_t y_max; 1.27 + int16_t y_min; 1.28 +}; 1.29 + 1.30 +struct OpenTypeVDMXGroup { 1.31 + uint16_t recs; 1.32 + uint8_t startsz; 1.33 + uint8_t endsz; 1.34 + std::vector<OpenTypeVDMXVTable> entries; 1.35 +}; 1.36 + 1.37 +struct OpenTypeVDMX { 1.38 + uint16_t version; 1.39 + uint16_t num_recs; 1.40 + uint16_t num_ratios; 1.41 + std::vector<OpenTypeVDMXRatioRecord> rat_ranges; 1.42 + std::vector<uint16_t> offsets; 1.43 + std::vector<OpenTypeVDMXGroup> groups; 1.44 +}; 1.45 + 1.46 +} // namespace ots 1.47 + 1.48 +#endif // OTS_VDMX_H_