Bug 1321022 pt 1 - Add a gfxFontVariation struct to represent a <variation-axis, value> pair. r=dholbert
authorJonathan Kew <jkew@mozilla.com>
Sat, 03 Dec 2016 12:18:25 +0000
changeset 325208 ee75de0e12acc2c7557daa437fdb4d5c53393304
parent 325207 612dfd756ef78a09827ad2287d4635b50368ce81
child 325209 c0d84787e5643ab00cf79018e8f80b759b57a95b
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersdholbert
bugs1321022
milestone53.0a1
Bug 1321022 pt 1 - Add a gfxFontVariation struct to represent a <variation-axis, value> pair. r=dholbert
gfx/thebes/gfxFontVariations.h
gfx/thebes/moz.build
new file mode 100644
--- /dev/null
+++ b/gfx/thebes/gfxFontVariations.h
@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef GFX_FONT_VARIATIONS_H
+#define GFX_FONT_VARIATIONS_H
+
+// An OpenType variation tag and value pair
+struct gfxFontVariation {
+    uint32_t mTag;
+    float mValue;
+};
+
+inline bool
+operator==(const gfxFontVariation& a, const gfxFontVariation& b)
+{
+    return (a.mTag == b.mTag) && (a.mValue == b.mValue);
+}
+
+#endif
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -21,16 +21,17 @@ EXPORTS += [
     'gfxFontConstants.h',
     'gfxFontEntry.h',
     'gfxFontFamilyList.h',
     'gfxFontFeatures.h',
     'gfxFontInfoLoader.h',
     'gfxFontPrefLangList.h',
     'gfxFontTest.h',
     'gfxFontUtils.h',
+    'gfxFontVariations.h',
     'gfxGradientCache.h',
     'gfxImageSurface.h',
     'gfxLineSegment.h',
     'gfxMathTable.h',
     'gfxMatrix.h',
     'gfxPattern.h',
     'gfxPlatform.h',
     'gfxPoint.h',