'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
],
},
}],
#define SkTypeface_mac_DEFINED
#include "SkTypeface.h"
-#include <Carbon/Carbon.h>
+#ifdef SK_BUILD_FOR_MAC
+#import <ApplicationServices/ApplicationServices.h>
+#endif
+#ifdef SK_BUILD_FOR_IOS
+#include <CoreText/CoreText.h>
+#endif
/**
* Like the other Typeface create methods, this returns a new reference to the
* corresponding typeface for the specified CTFontRef. The caller must call
#include "SkTypes.h"
#ifdef SK_BUILD_FOR_MAC
- #include <Carbon/Carbon.h>
-#else
- #include <CoreGraphics/CoreGraphics.h>
+#include <ApplicationServices/ApplicationServices.h>
#endif
class SkBitmap;
#endif
#ifdef SK_BUILD_FOR_MAC
-#include <Carbon/Carbon.h>
+#import <ApplicationServices/ApplicationServices.h>
+#endif
+
+#ifdef SK_BUILD_FOR_IOS
+#include <CoreText/CoreText.h>
+#include <CoreGraphics/CoreGraphics.h>
#endif
namespace skia_advanced_typeface_metrics_utils {
FT_Face face,
int num_glyphs,
bool (*getAdvance)(FT_Face face, int gId, int16_t* data));
-#elif defined(SK_BUILD_FOR_MAC)
+#elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
CTFontRef ctFont,
int num_glyphs,
** limitations under the License.
*/
#include <vector>
-#include <Carbon/Carbon.h>
+#ifdef SK_BUILD_FOR_MAC
+#import <ApplicationServices/ApplicationServices.h>
+#endif
+
+#ifdef SK_BUILD_FOR_IOS
+#include <CoreText/CoreText.h>
+#include <CoreGraphics/CoreGraphics.h>
+#endif
#include "SkFontHost.h"
#include "SkDescriptor.h"
uint32_t fLength;
};
-static uint32 CalcTableCheckSum(uint32 *table, uint32 numberOfBytesInTable) {
- uint32 sum = 0;
- uint32 nLongs = (numberOfBytesInTable + 3) / 4;
+static uint32_t CalcTableCheckSum(uint32_t *table, uint32_t numberOfBytesInTable) {
+ uint32_t sum = 0;
+ uint32_t nLongs = (numberOfBytesInTable + 3) / 4;
while (nLongs-- > 0) {
sum += SkEndian_SwapBE32(*table++);
GetTableData(uniqueID, tableTags[index], 0, tableSize, dataPtr);
entry->fTag = SkEndian_SwapBE32(tableTags[index]);
entry->fCheckSum = SkEndian_SwapBE32(CalcTableCheckSum(
- (uint32*)dataPtr, tableSize));
+ (uint32_t*)dataPtr, tableSize));
entry->fOffset = SkEndian_SwapBE32(dataPtr - dataStart);
entry->fLength = SkEndian_SwapBE32(tableSize);
dataPtr += (tableSize + 3) & ~3;
** limitations under the License.
*/
-#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
#include "SkMovie.h"