[harfbuzz.cc] Fix OffsetTable name clash with Mac headers
There's no easy way to undo a "using namespace" in our sources, so by the time we get to include hb-coretext.cc from harfbuzz.cc, we already have "using namespace OT" active, which clashes with Mac headers. Error was: $ gcc -O3 -Wall -arch i386 -DHAVE_CORETEXT=1 -c harfbuzz.cc -o harfbuzz.o -std=c++11 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/TextUtils.h:288:3: error: reference to 'OffsetTable' is ambiguous OffsetTable offsets, ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/IntlResources.h:115:41: note: candidate found by name lookup is 'OffsetTable' typedef OffPair OffsetTable[3]; ^ ./hb-open-file.hh:81:16: note: candidate found by name lookup is 'OT::OffsetTable' typedef struct OffsetTable ^ 1 error generated.
This commit is contained in:
parent
6a9f576fd4
commit
505b3fc6cf
|
@ -48,7 +48,7 @@ namespace OT {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct OpenTypeFontFile;
|
struct OpenTypeFontFile;
|
||||||
struct OffsetTable;
|
struct OpenTypeOffsetTable;
|
||||||
struct TTCHeader;
|
struct TTCHeader;
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ typedef struct TableRecord
|
||||||
DEFINE_SIZE_STATIC (16);
|
DEFINE_SIZE_STATIC (16);
|
||||||
} OpenTypeTable;
|
} OpenTypeTable;
|
||||||
|
|
||||||
typedef struct OffsetTable
|
typedef struct OpenTypeOffsetTable
|
||||||
{
|
{
|
||||||
friend struct OpenTypeFontFile;
|
friend struct OpenTypeFontFile;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ struct TTCHeaderVersion1
|
||||||
Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
|
Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
|
||||||
FixedVersion<>version; /* Version of the TTC Header (1.0),
|
FixedVersion<>version; /* Version of the TTC Header (1.0),
|
||||||
* 0x00010000u */
|
* 0x00010000u */
|
||||||
LArrayOf<LOffsetTo<OffsetTable>>
|
LArrayOf<LOffsetTo<OpenTypeOffsetTable>>
|
||||||
table; /* Array of offsets to the OffsetTable for each font
|
table; /* Array of offsets to the OffsetTable for each font
|
||||||
* from the beginning of the file */
|
* from the beginning of the file */
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace OT {
|
||||||
|
|
||||||
struct head
|
struct head
|
||||||
{
|
{
|
||||||
friend struct OffsetTable;
|
friend struct OpenTypeOffsetTable;
|
||||||
|
|
||||||
static constexpr hb_tag_t tableTag = HB_OT_TAG_head;
|
static constexpr hb_tag_t tableTag = HB_OT_TAG_head;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue