gfx/harfbuzz/src/hb-ot-hhea-table.hh

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /*
michael@0 2 * Copyright © 2011,2012 Google, Inc.
michael@0 3 *
michael@0 4 * This is part of HarfBuzz, a text shaping library.
michael@0 5 *
michael@0 6 * Permission is hereby granted, without written agreement and without
michael@0 7 * license or royalty fees, to use, copy, modify, and distribute this
michael@0 8 * software and its documentation for any purpose, provided that the
michael@0 9 * above copyright notice and the following two paragraphs appear in
michael@0 10 * all copies of this software.
michael@0 11 *
michael@0 12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
michael@0 13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
michael@0 14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
michael@0 15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
michael@0 16 * DAMAGE.
michael@0 17 *
michael@0 18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
michael@0 19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
michael@0 20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
michael@0 21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
michael@0 22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
michael@0 23 *
michael@0 24 * Google Author(s): Behdad Esfahbod
michael@0 25 */
michael@0 26
michael@0 27 #ifndef HB_OT_HHEA_TABLE_HH
michael@0 28 #define HB_OT_HHEA_TABLE_HH
michael@0 29
michael@0 30 #include "hb-open-type-private.hh"
michael@0 31
michael@0 32
michael@0 33 namespace OT {
michael@0 34
michael@0 35
michael@0 36 /*
michael@0 37 * hhea -- The Horizontal Header Table
michael@0 38 */
michael@0 39
michael@0 40 #define HB_OT_TAG_hhea HB_TAG('h','h','e','a')
michael@0 41
michael@0 42
michael@0 43 struct hhea
michael@0 44 {
michael@0 45 static const hb_tag_t tableTag = HB_OT_TAG_hhea;
michael@0 46
michael@0 47 inline bool sanitize (hb_sanitize_context_t *c) {
michael@0 48 TRACE_SANITIZE (this);
michael@0 49 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
michael@0 50 }
michael@0 51
michael@0 52 protected:
michael@0 53 FixedVersion version; /* 0x00010000 for version 1.0. */
michael@0 54 FWORD ascender; /* Typographic ascent. <a
michael@0 55 * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
michael@0 56 * (Distance from baseline of highest
michael@0 57 * ascender)</a> */
michael@0 58 FWORD descender; /* Typographic descent. <a
michael@0 59 * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
michael@0 60 * (Distance from baseline of lowest
michael@0 61 * descender)</a> */
michael@0 62 FWORD lineGap; /* Typographic line gap. Negative
michael@0 63 * LineGap values are treated as zero
michael@0 64 * in Windows 3.1, System 6, and
michael@0 65 * System 7. */
michael@0 66 UFWORD advanceWidthMax; /* Maximum advance width value in
michael@0 67 * 'hmtx' table. */
michael@0 68 FWORD minLeftSideBearing; /* Minimum left sidebearing value in
michael@0 69 * 'hmtx' table. */
michael@0 70 FWORD minRightSideBearing; /* Minimum right sidebearing value;
michael@0 71 * calculated as Min(aw - lsb -
michael@0 72 * (xMax - xMin)). */
michael@0 73 FWORD xMaxExtent; /* Max(lsb + (xMax - xMin)). */
michael@0 74 SHORT caretSlopeRise; /* Used to calculate the slope of the
michael@0 75 * cursor (rise/run); 1 for vertical. */
michael@0 76 SHORT caretSlopeRun; /* 0 for vertical. */
michael@0 77 SHORT caretOffset; /* The amount by which a slanted
michael@0 78 * highlight on a glyph needs
michael@0 79 * to be shifted to produce the
michael@0 80 * best appearance. Set to 0 for
michael@0 81 * non--slanted fonts */
michael@0 82 SHORT reserved1; /* set to 0 */
michael@0 83 SHORT reserved2; /* set to 0 */
michael@0 84 SHORT reserved3; /* set to 0 */
michael@0 85 SHORT reserved4; /* set to 0 */
michael@0 86 SHORT metricDataFormat; /* 0 for current format. */
michael@0 87 USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx'
michael@0 88 * table */
michael@0 89 public:
michael@0 90 DEFINE_SIZE_STATIC (36);
michael@0 91 };
michael@0 92
michael@0 93
michael@0 94 } /* namespace OT */
michael@0 95
michael@0 96
michael@0 97 #endif /* HB_OT_HHEA_TABLE_HH */

mercurial