LCOV - code coverage report
Current view: directory - gfx/ots/src - metrics.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 0 0.0 %
Date: 2012-06-02 Functions: 2 0 0.0 %

       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.
       4                 : 
       5                 : #ifndef OTS_METRICS_H_
       6                 : #define OTS_METRICS_H_
       7                 : 
       8                 : #include <new>
       9                 : #include <utility>  // std::pair
      10                 : #include <vector>
      11                 : 
      12                 : #include "ots.h"
      13                 : 
      14                 : namespace ots {
      15                 : 
      16                 : struct OpenTypeMetricsHeader {
      17                 :   uint32_t version;
      18                 :   int16_t ascent;
      19                 :   int16_t descent;
      20                 :   int16_t linegap;
      21                 :   uint16_t adv_width_max;
      22                 :   int16_t min_sb1;
      23                 :   int16_t min_sb2;
      24                 :   int16_t max_extent;
      25                 :   int16_t caret_slope_rise;
      26                 :   int16_t caret_slope_run;
      27                 :   int16_t caret_offset;
      28                 :   uint16_t num_metrics;
      29                 : };
      30                 : 
      31               0 : struct OpenTypeMetricsTable {
      32                 :   std::vector<std::pair<uint16_t, int16_t> > entries;
      33                 :   std::vector<int16_t> sbs;
      34                 : };
      35                 : 
      36                 : bool ParseMetricsHeader(OpenTypeFile *file, Buffer *table,
      37                 :                         OpenTypeMetricsHeader *header);
      38                 : bool SerialiseMetricsHeader(OTSStream *out,
      39                 :                             const OpenTypeMetricsHeader *header);
      40                 : 
      41                 : bool ParseMetricsTable(Buffer *table,
      42                 :                        const uint16_t num_glyphs,
      43                 :                        const OpenTypeMetricsHeader *header,
      44                 :                        OpenTypeMetricsTable *metrics);
      45                 : bool SerialiseMetricsTable(OTSStream *out,
      46                 :                            const OpenTypeMetricsTable *metrics);
      47                 : 
      48                 : }  // namespace ots
      49                 : 
      50                 : #endif  // OTS_METRICS_H_
      51                 : 

Generated by: LCOV version 1.7