]> git.wh0rd.org - fontconfig.git/commitdiff
Fontset pattern references are relative to fontset, not array.
authorKeith Packard <keithp@neko.keithp.com>
Fri, 1 Sep 2006 09:22:59 +0000 (02:22 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Fri, 1 Sep 2006 09:22:59 +0000 (02:22 -0700)
Within a fontset, the patterns are stored as pointers in an array.
When stored as offsets, the offsets are relative to the fontset object
itself, not the base of the array of pointers.

src/fcint.h

index 42aa0eb20e6251bf01883de459978e12644359cb..78d17e788924d76405e2e85756c6b4d95d03423d 100644 (file)
@@ -201,7 +201,7 @@ struct _FcPattern {
 #define FcFontSetFonts(fs)     FcPointerMember(fs,fonts,FcPattern *)
 
 #define FcFontSetFont(fs,i)    (FcIsEncodedOffset((fs)->fonts) ? \
-                                FcEncodedOffsetToPtr(FcFontSetFonts(fs), \
+                                FcEncodedOffsetToPtr(fs, \
                                                      FcFontSetFonts(fs)[i], \
                                                      FcPattern) : \
                                 fs->fonts[i])