diff --git a/ChangeLog b/ChangeLog index 91c942a..8f7a781 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-27 Fred Kiefer + + * Source/xlib/GSXftFontInfo.m (-coveredCharacterSet): Moved the + swapping into the loop, where the actual data is available. + Patch by Sebastian Reitenbach . + 2008-05-25 Adam Fedor * configure.ac: Fail if libXext or libXt not found when building diff --git a/Source/xlib/GSXftFontInfo.m b/Source/xlib/GSXftFontInfo.m index 2e3a1d0..a0a424b 100644 --- a/Source/xlib/GSXftFontInfo.m +++ b/Source/xlib/GSXftFontInfo.m @@ -325,7 +325,8 @@ Ones(unsigned int n) FcChar32 ucs4; FcChar32 map[FC_CHARSET_MAP_SIZE]; FcChar32 next; - + BOOL swap = NSHostByteOrder() == NS_BigEndian; + if (!d) return nil; @@ -342,15 +343,15 @@ Ones(unsigned int n) // Round up to a suitable plane size max = ((max + 8191) >> 13) << 13; [d setLength: max]; - // Do some byte swapping, if needed. - if (NSHostByteOrder() == NS_BigEndian) - { - map[i] = NSSwapInt(map[i]); - } for (i = 0; i < FC_CHARSET_MAP_SIZE; i++) if (map[i]) { + // Do some byte swapping, if needed. + if (swap) + { + map[i] = NSSwapInt(map[i]); + } count += Ones(map[i]); }