[HarfBuzz] does graphite affect the c++ munging? Does -On?

James Cloos cloos at jhcloos.com
Mon Nov 5 10:15:42 PST 2012


[Background for the harfbuzz readers:

hb fails to compile with icu 50_rc and gcc 4.7.2 with an inconsistancy
between what icu provides for LEFontInstance::mapCharsToGlyphs() and
that hb wants.]

>>>>> "PT" == Philipp Thomas <Philipp.Thomas2 at gmx.net> writes:

PT> For me it looks like the header doesn't match the library.

I looked again in case I missed anything last night.

/usr/include/layout/LEFontInstance.h has:

    virtual void mapCharsToGlyphs(const LEUnicode chars[],
                                  le_int32 offset,
                                  le_int32 count,
                                  le_bool reverse,
                                  const LECharMapper *mapper,
                                  le_bool filterZeroWidth,
                                  LEGlyphStorage &glyphStorage) const;

icu(-50_rc)/source/layout/LEFontInstance.cpp has:

 LEFontInstance::mapCharsToGlyphs(const LEUnicode chars[],
                                  le_int32 offset,
                                  le_int32 count,
                                  le_bool reverse,
                                  const LECharMapper *mapper,
                                  le_bool filterZeroWidth,
                                  LEGlyphStorage &glyphStorage) const

/usr/lib/libicule.so provides:

 _ZNK3icu14LEFontInstance16mapCharsToGlyphsEPKDsiiaPKNS_12LECharMapperEaRNS_14LEGlyphStorageE

which c++filt expands to:

 icu::LEFontInstance::mapCharsToGlyphs(char16_t const*,
                                       int,
                                       int,
                                       signed char,
                                       icu::LECharMapper const*,
                                       signed char,
                                       icu::LEGlyphStorage&) const


But hb's libhb_icu_le_la-PortableFontInstance.o wants:

 _ZNK3icu14LEFontInstance16mapCharsToGlyphsEPKtiiaPKNS_12LECharMapperEaRNS_14LEGlyphStorageE

which c++filt expands to:

icu::LEFontInstance::mapCharsToGlyphs(unsigned short const*,
                                      int,
                                      int,
                                      signed char,
                                      icu::LECharMapper const*,
                                      signed char,
                                      icu::LEGlyphStorage&) const

It seems that icu's LEUnicode typedef is converted differently.

And, to make it harder to debug, hb doesn't call mapCharsToGlyphs() at all.

nm(1) finds it in the .o file, but objdump -d does not.

I tried adding -dM -E to the g++ invocation hb uses for that file and found:

 #define U_HAVE_CHAR16_T 0
 #define __CHAR16_TYPE__ short unsigned int

which might have something to do with the different munging.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



More information about the HarfBuzz mailing list