tor-browser

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

DWriteSettings.h (1077B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      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
      5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef MOZILLA_GFX_2D_DWRITESETTINGS_H_
      8 #define MOZILLA_GFX_2D_DWRITESETTINGS_H_
      9 
     10 #include <dwrite.h>
     11 
     12 #include "mozilla/AlreadyAddRefed.h"
     13 #include "Types.h"
     14 
     15 namespace mozilla {
     16 namespace gfx {
     17 
     18 class DWriteSettings final {
     19 public:
     20  static void Initialize();
     21 
     22  static DWriteSettings& Get(bool aGDISettings);
     23 
     24  Float ClearTypeLevel();
     25  Float EnhancedContrast();
     26  Float Gamma();
     27  DWRITE_PIXEL_GEOMETRY PixelGeometry();
     28  DWRITE_RENDERING_MODE RenderingMode();
     29  DWRITE_MEASURING_MODE MeasuringMode();
     30  already_AddRefed<IDWriteRenderingParams> RenderingParams();
     31 
     32 private:
     33  explicit DWriteSettings(bool aUseGDISettings);
     34 
     35  const bool mUseGDISettings;
     36 };
     37 
     38 }  // namespace gfx
     39 }  // namespace mozilla
     40 
     41 #endif  // MOZILLA_GFX_2D_DWRITESETTINGS_H_