tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

post.h (771B)


      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.
      4 
      5 #ifndef OTS_POST_H_
      6 #define OTS_POST_H_
      7 
      8 #include "ots.h"
      9 
     10 #include <map>
     11 #include <string>
     12 #include <vector>
     13 
     14 namespace ots {
     15 
     16 class OpenTypePOST : public Table {
     17 public:
     18  explicit OpenTypePOST(Font *font, uint32_t tag)
     19      : Table(font, tag, tag) { }
     20 
     21  bool Parse(const uint8_t *data, size_t length);
     22  bool Serialize(OTSStream *out);
     23 
     24 private:
     25  uint32_t version;
     26  uint32_t italic_angle;
     27  int16_t underline;
     28  int16_t underline_thickness;
     29  uint32_t is_fixed_pitch;
     30 
     31  std::vector<uint16_t> glyph_name_index;
     32  std::vector<std::string> names;
     33 };
     34 
     35 }  // namespace ots
     36 
     37 #endif  // OTS_POST_H_