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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/harfbuzz/src/hb-ot-maxp-table.hh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,69 @@
     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_MAXP_TABLE_HH
    1.31 +#define HB_OT_MAXP_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 + * maxp -- The Maximum Profile Table
    1.41 + */
    1.42 +
    1.43 +#define HB_OT_TAG_maxp HB_TAG('m','a','x','p')
    1.44 +
    1.45 +struct maxp
    1.46 +{
    1.47 +  static const hb_tag_t tableTag	= HB_OT_TAG_maxp;
    1.48 +
    1.49 +  inline unsigned int get_num_glyphs (void) const {
    1.50 +    return numGlyphs;
    1.51 +  }
    1.52 +
    1.53 +  inline bool sanitize (hb_sanitize_context_t *c) {
    1.54 +    TRACE_SANITIZE (this);
    1.55 +    return TRACE_RETURN (c->check_struct (this) &&
    1.56 +			 likely (version.major == 1 || (version.major == 0 && version.minor == 0x5000)));
    1.57 +  }
    1.58 +
    1.59 +  /* We only implement version 0.5 as none of the extra fields in version 1.0 are useful. */
    1.60 +  protected:
    1.61 +  FixedVersion	version;		/* Version of the maxp table (0.5 or 1.0),
    1.62 +					 * 0x00005000 or 0x00010000. */
    1.63 +  USHORT	numGlyphs;		/* The number of glyphs in the font. */
    1.64 +  public:
    1.65 +  DEFINE_SIZE_STATIC (6);
    1.66 +};
    1.67 +
    1.68 +
    1.69 +} /* namespace OT */
    1.70 +
    1.71 +
    1.72 +#endif /* HB_OT_MAXP_TABLE_HH */

mercurial