fontmgr_default_linux.cc 623 B

123456789101112131415161718
  1. // Copyright 2016 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. #include "skia/ext/fontmgr_default.h"
  5. #include "third_party/skia/include/core/SkFontMgr.h"
  6. #include "third_party/skia/include/ports/SkFontConfigInterface.h"
  7. #include "third_party/skia/include/ports/SkFontMgr_FontConfigInterface.h"
  8. namespace skia {
  9. SK_API sk_sp<SkFontMgr> CreateDefaultSkFontMgr() {
  10. sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
  11. return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr;
  12. }
  13. } // namespace skia