Flutter Engine
The Flutter Engine
SkTypeface_mac.h
Go to the documentation of this file.
1/*
2 * Copyright 2011 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
8#ifndef SkTypeface_mac_DEFINED
9#define SkTypeface_mac_DEFINED
10
12
13#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
14
15#include <CoreFoundation/CoreFoundation.h>
16
17#ifdef SK_BUILD_FOR_MAC
18#import <ApplicationServices/ApplicationServices.h>
19#endif
20
21#ifdef SK_BUILD_FOR_IOS
22#include <CoreText/CoreText.h>
23#endif
24
25/**
26 * Like the other Typeface make methods, this returns a new reference to the
27 * corresponding typeface for the specified CTFontRef.
28 */
29SK_API extern sk_sp<SkTypeface> SkMakeTypefaceFromCTFont(CTFontRef);
30
31/**
32 * Returns the platform-specific CTFontRef handle for a
33 * given SkTypeface. Note that the returned CTFontRef gets
34 * released when the source SkTypeface is destroyed.
35 *
36 * This method is deprecated. It may only be used by Blink Mac
37 * legacy code in special cases related to text-shaping
38 * with AAT fonts, clipboard handling and font fallback.
39 * See https://code.google.com/p/skia/issues/detail?id=3408
40 */
41SK_API extern CTFontRef SkTypeface_GetCTFontRef(const SkTypeface* face);
42
43#endif // defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
44#endif // SkTypeface_mac_DEFINED
#define SK_API
Definition: SkAPI.h:35