chromium/third_party/ots/src/src/cff.cc

// Copyright (c) 2012-2017 The OTS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cff.h"

#include <cstring>
#include <utility>
#include <vector>

#include "maxp.h"
#include "cff_charstring.h"
#include "variations.h"

// CFF - PostScript font program (Compact Font Format) table
// http://www.microsoft.com/typography/otspec/cff.htm
// http://www.microsoft.com/typography/otspec/cffspec.htm

#define TABLE_NAME

namespace {

enum DICT_OPERAND_TYPE {};

enum DICT_DATA_TYPE {};

enum FONT_FORMAT {};

// see Appendix. A
const size_t kNStdString =;

Operand;

bool ReadOffset(ots::Buffer &table, uint8_t off_size, uint32_t *offset) {}

bool ParseIndex(ots::Buffer &table, ots::CFFIndex &index, bool cff2 = false) {}

bool ParseNameData(
    ots::Buffer *table, const ots::CFFIndex &index, std::string* out_name) {}

bool CheckOffset(const Operand& operand, size_t table_length) {}

bool CheckSid(const Operand& operand, size_t sid_max) {}

bool ParseDictDataBcd(ots::Buffer &table, std::vector<Operand> &operands) {}

bool ParseDictDataEscapedOperator(ots::Buffer &table,
                                  std::vector<Operand> &operands) {}

bool ParseDictDataNumber(ots::Buffer &table, uint8_t b0,
                         std::vector<Operand> &operands) {}

bool ParseDictDataReadNext(ots::Buffer &table,
                           std::vector<Operand> &operands) {}

bool OperandsOverflow(std::vector<Operand>& operands, bool cff2) {}

bool ParseDictDataReadOperands(ots::Buffer& dict,
                               std::vector<Operand>& operands,
                               bool cff2) {}

bool ValidCFF2DictOp(uint32_t op, DICT_DATA_TYPE type) {}

bool ParsePrivateDictData(
    ots::Buffer &table, size_t offset, size_t dict_length,
    DICT_DATA_TYPE type, ots::OpenTypeCFF *out_cff) {}

bool ParseVariationStore(ots::OpenTypeCFF& out_cff, ots::Buffer& table) {}

bool ParseDictData(ots::Buffer& table, ots::Buffer& dict,
                   uint16_t glyphs, size_t sid_max, DICT_DATA_TYPE type,
                   ots::OpenTypeCFF *out_cff);

bool ParseDictData(ots::Buffer& table, const ots::CFFIndex &index,
                   uint16_t glyphs, size_t sid_max, DICT_DATA_TYPE type,
                   ots::OpenTypeCFF *out_cff) {}

bool ParseDictData(ots::Buffer& table, ots::Buffer& dict,
                   uint16_t glyphs, size_t sid_max, DICT_DATA_TYPE type,
                   ots::OpenTypeCFF *out_cff) {}

}  // namespace

namespace ots {

bool OpenTypeCFF::ValidateFDSelect(uint16_t num_glyphs) {}

bool OpenTypeCFF::Parse(const uint8_t *data, size_t length) {}

bool OpenTypeCFF::Serialize(OTSStream *out) {}

OpenTypeCFF::~OpenTypeCFF() {}

bool OpenTypeCFF2::Parse(const uint8_t *data, size_t length) {}

bool OpenTypeCFF2::Serialize(OTSStream *out) {}

}  // namespace ots

#undef TABLE_NAME