1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/harfbuzz/src/hb-ot-hhea-table.hh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,97 @@ 1.4 +/* 1.5 + * Copyright © 2011,2012 Google, Inc. 1.6 + * 1.7 + * This is part of HarfBuzz, a text shaping library. 1.8 + * 1.9 + * Permission is hereby granted, without written agreement and without 1.10 + * license or royalty fees, to use, copy, modify, and distribute this 1.11 + * software and its documentation for any purpose, provided that the 1.12 + * above copyright notice and the following two paragraphs appear in 1.13 + * all copies of this software. 1.14 + * 1.15 + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 1.16 + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 1.17 + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 1.18 + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 1.19 + * DAMAGE. 1.20 + * 1.21 + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 1.22 + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 1.23 + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 1.24 + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 1.25 + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 1.26 + * 1.27 + * Google Author(s): Behdad Esfahbod 1.28 + */ 1.29 + 1.30 +#ifndef HB_OT_HHEA_TABLE_HH 1.31 +#define HB_OT_HHEA_TABLE_HH 1.32 + 1.33 +#include "hb-open-type-private.hh" 1.34 + 1.35 + 1.36 +namespace OT { 1.37 + 1.38 + 1.39 +/* 1.40 + * hhea -- The Horizontal Header Table 1.41 + */ 1.42 + 1.43 +#define HB_OT_TAG_hhea HB_TAG('h','h','e','a') 1.44 + 1.45 + 1.46 +struct hhea 1.47 +{ 1.48 + static const hb_tag_t tableTag = HB_OT_TAG_hhea; 1.49 + 1.50 + inline bool sanitize (hb_sanitize_context_t *c) { 1.51 + TRACE_SANITIZE (this); 1.52 + return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); 1.53 + } 1.54 + 1.55 + protected: 1.56 + FixedVersion version; /* 0x00010000 for version 1.0. */ 1.57 + FWORD ascender; /* Typographic ascent. <a 1.58 + * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html"> 1.59 + * (Distance from baseline of highest 1.60 + * ascender)</a> */ 1.61 + FWORD descender; /* Typographic descent. <a 1.62 + * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html"> 1.63 + * (Distance from baseline of lowest 1.64 + * descender)</a> */ 1.65 + FWORD lineGap; /* Typographic line gap. Negative 1.66 + * LineGap values are treated as zero 1.67 + * in Windows 3.1, System 6, and 1.68 + * System 7. */ 1.69 + UFWORD advanceWidthMax; /* Maximum advance width value in 1.70 + * 'hmtx' table. */ 1.71 + FWORD minLeftSideBearing; /* Minimum left sidebearing value in 1.72 + * 'hmtx' table. */ 1.73 + FWORD minRightSideBearing; /* Minimum right sidebearing value; 1.74 + * calculated as Min(aw - lsb - 1.75 + * (xMax - xMin)). */ 1.76 + FWORD xMaxExtent; /* Max(lsb + (xMax - xMin)). */ 1.77 + SHORT caretSlopeRise; /* Used to calculate the slope of the 1.78 + * cursor (rise/run); 1 for vertical. */ 1.79 + SHORT caretSlopeRun; /* 0 for vertical. */ 1.80 + SHORT caretOffset; /* The amount by which a slanted 1.81 + * highlight on a glyph needs 1.82 + * to be shifted to produce the 1.83 + * best appearance. Set to 0 for 1.84 + * non--slanted fonts */ 1.85 + SHORT reserved1; /* set to 0 */ 1.86 + SHORT reserved2; /* set to 0 */ 1.87 + SHORT reserved3; /* set to 0 */ 1.88 + SHORT reserved4; /* set to 0 */ 1.89 + SHORT metricDataFormat; /* 0 for current format. */ 1.90 + USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx' 1.91 + * table */ 1.92 + public: 1.93 + DEFINE_SIZE_STATIC (36); 1.94 +}; 1.95 + 1.96 + 1.97 +} /* namespace OT */ 1.98 + 1.99 + 1.100 +#endif /* HB_OT_HHEA_TABLE_HH */