tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

gfxFontVariations.h (1209B)


      1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef GFX_FONT_VARIATIONS_H
      8 #define GFX_FONT_VARIATIONS_H
      9 
     10 #include "mozilla/gfx/FontVariation.h"
     11 #include "nsString.h"
     12 #include "nsTArray.h"
     13 
     14 typedef mozilla::gfx::FontVariation gfxFontVariation;
     15 
     16 // Structure that describes a single axis of variation in an
     17 // OpenType Variation or Multiple-Master font.
     18 struct gfxFontVariationAxis {
     19  uint32_t mTag;
     20  nsCString mName;  // may be empty
     21  float mMinValue;
     22  float mMaxValue;
     23  float mDefaultValue;
     24 };
     25 
     26 // A single <axis, value> pair that may be applied to a variation font.
     27 struct gfxFontVariationValue {
     28  uint32_t mAxis;
     29  float mValue;
     30 };
     31 
     32 // Structure that describes a named instance of a variation font:
     33 // a name like "Light Condensed" or "Black Ultra Extended" etc.,
     34 // and a list of the corresponding <variation-axis, value> pairs
     35 // to be used.
     36 struct gfxFontVariationInstance {
     37  nsCString mName;
     38  CopyableTArray<gfxFontVariationValue> mValues;
     39 };
     40 
     41 #endif