fontmgr_default.h 788 B

1234567891011121314151617181920212223242526
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef SKIA_EXT_FONTMGR_DEFAULT_H_
  5. #define SKIA_EXT_FONTMGR_DEFAULT_H_
  6. #include "third_party/skia/include/core/SkTypes.h"
  7. class SkFontMgr;
  8. template <typename T>
  9. class sk_sp;
  10. namespace skia {
  11. // Allows to override the default SkFontMgr instance (returned from
  12. // SkFontMgr::RefDefault()). Must be called before RefDefault() is called for
  13. // the first time in the process.
  14. SK_API void OverrideDefaultSkFontMgr(sk_sp<SkFontMgr> fontmgr);
  15. // Create default SkFontMgr implementation for the current platform.
  16. SK_API sk_sp<SkFontMgr> CreateDefaultSkFontMgr();
  17. } // namespace skia
  18. #endif // SKIA_EXT_FONTMGR_DEFAULT_H_