Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: include/ports/SkTypeface_mac.h

Issue 1163573007: Provide tag-along for SkCreateTypefaceFromCTFont. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add reference to bug. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10
11 #ifndef SkTypeface_mac_DEFINED 8 #ifndef SkTypeface_mac_DEFINED
12 #define SkTypeface_mac_DEFINED 9 #define SkTypeface_mac_DEFINED
13 10
14 #include "SkTypeface.h" 11 #include "SkTypeface.h"
15 #ifdef SK_BUILD_FOR_MAC
16 #import <ApplicationServices/ApplicationServices.h>
17 #endif
18 12
19 #ifdef SK_BUILD_FOR_IOS 13 #include <CoreFoundation/CoreFoundation.h>
20 #include <CoreText/CoreText.h> 14 #include <CoreText/CoreText.h>
21 #endif 15
22 /** 16 /**
23 * Like the other Typeface create methods, this returns a new reference to the 17 * Like the other Typeface create methods, this returns a new reference to the
24 * corresponding typeface for the specified CTFontRef. The caller must call 18 * corresponding typeface for the specified CTFontRef. The caller must call
25 * unref() when it is finished. 19 * unref() when it is finished.
20 *
21 * The CFTypeRef parameter, if provided, will be kept referenced for the
22 * lifetime of the SkTypeface. This was introduced as a means to work around
23 * https://crbug.com/413332 .
26 */ 24 */
27 SK_API extern SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef); 25 SK_API extern SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef, CFTypeRef = NULL );
26
28 /** 27 /**
29 * Returns the platform-specific CTFontRef handle for a 28 * Returns the platform-specific CTFontRef handle for a
30 * given SkTypeface. Note that the returned CTFontRef gets 29 * given SkTypeface. Note that the returned CTFontRef gets
31 * released when the source SkTypeface is destroyed. 30 * released when the source SkTypeface is destroyed.
32 * 31 *
33 * This method is deprecated. It may only be used by Blink Mac 32 * This method is deprecated. It may only be used by Blink Mac
34 * legacy code in special cases related to text-shaping 33 * legacy code in special cases related to text-shaping
35 * with AAT fonts, clipboard handling and font fallback. 34 * with AAT fonts, clipboard handling and font fallback.
36 * See https://code.google.com/p/skia/issues/detail?id=3408 35 * See https://code.google.com/p/skia/issues/detail?id=3408
37 */ 36 */
38 SK_API extern CTFontRef SkTypeface_GetCTFontRef(const SkTypeface* face); 37 SK_API extern CTFontRef SkTypeface_GetCTFontRef(const SkTypeface* face);
38
39 #endif 39 #endif
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698