1
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9
10
11#ifndef SkTypeface_mac_DEFINED
12#define SkTypeface_mac_DEFINED
13
14#include "SkTypeface.h"
15#ifdef SK_BUILD_FOR_MAC
16#import <ApplicationServices/ApplicationServices.h>
17#endif
18
19#ifdef SK_BUILD_FOR_IOS
20#include <CoreText/CoreText.h>
21#endif
22/**
23 *  Like the other Typeface create methods, this returns a new reference to the
24 *  corresponding typeface for the specified CTFontRef. The caller must call
25 *  unref() when it is finished.
26 */
27SK_API extern SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef);
28/**
29 *  Returns the platform-specific CTFontRef handle for a
30 *  given SkTypeface. Note that the returned CTFontRef gets
31 *  released when the source SkTypeface is destroyed.
32 *
33 *  This method is deprecated. It may only be used by Blink Mac
34 *  legacy code in special cases related to text-shaping
35 *  with AAT fonts, clipboard handling and font fallback.
36 *  See https://code.google.com/p/skia/issues/detail?id=3408
37 */
38SK_API extern CTFontRef SkTypeface_GetCTFontRef(const SkTypeface* face);
39#endif
40