diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 45343d6ec..1d8378aae 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -218,6 +218,12 @@ struct writeBuf int offset; }; +#ifdef __ppc__ +#define TAG_CFF 0x43464620 +#else +#define TAG_CFF 0x20464643 +#endif + bool ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton) { @@ -233,7 +239,7 @@ ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton) bool CFF = false; for (CFIndex i = 0; i(table.Elements())); TableRecord *records = new TableRecord[count]; for (uint32_t i=3; i<(sizer/4); i+=4) { // Skip header -#ifndef __ppc__ -#error need little-endian version -#endif uint32_t tag = wtable[i]; - if (tag == 0x43464620) // 'CFF ' + if (tag == TAG_CFF) CFF = true; // We know the length from the directory, so we can simply import // the data. We assume the table exists, and OMG if it doesn't.