SkFontMgr_FontConfigInterface_factory.cpp 496 B

123456789101112131415161718
  1. /*
  2. * Copyright 2008 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include "include/core/SkFontMgr.h"
  8. #include "include/ports/SkFontConfigInterface.h"
  9. #include "include/ports/SkFontMgr_FontConfigInterface.h"
  10. sk_sp<SkFontMgr> SkFontMgr::Factory() {
  11. sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
  12. if (!fci) {
  13. return nullptr;
  14. }
  15. return SkFontMgr_New_FCI(std::move(fci));
  16. }