| 1 |
/* |
| 2 |
* Copyright 2006 The Android Open Source Project |
| 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 SkCTFontCreateExactCopy_DEFINED |
| 9 |
#define SkCTFontCreateExactCopy_DEFINED |
| 10 |
|
| 11 |
#include "include/core/SkTypes.h" |
| 12 |
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
| 13 |
|
| 14 |
#ifdef SK_BUILD_FOR_MAC |
| 15 |
#import <ApplicationServices/ApplicationServices.h> |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifdef SK_BUILD_FOR_IOS |
| 19 |
#include <CoreGraphics/CoreGraphics.h> |
| 20 |
#include <CoreText/CoreText.h> |
| 21 |
#endif |
| 22 |
|
| 23 |
#include "src/utils/mac/SkUniqueCFRef.h" |
| 24 |
|
| 25 |
struct OpszVariation; |
| 26 |
|
| 27 |
/* |
| 28 |
* This function attempts to resize a CTFont without inadvertently changing |
| 29 |
* unrelated properties, like the optical size, relative glyph metrics, |
| 30 |
* or the underlying font data used. |
| 31 |
*/ |
| 32 |
SkUniqueCFRef<CTFontRef> SkCTFontCreateExactCopy(CTFontRef baseFont, CGFloat textSize, |
| 33 |
OpszVariation opsz); |
| 34 |
|
| 35 |
#endif // defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
| 36 |
#endif // SkCTFont_DEFINED |