The short version of the 'loca' table stores offsets divided by 2.
authorbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Dec 2012 22:45:10 +0000 (22:45 +0000)
committerbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Dec 2012 22:45:10 +0000 (22:45 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@6657 2bbb7eff-a529-9590-31e7-b0007b416f81

src/sfnt/SkOTTable_glyf.h

index a52fd06fe6319c49312a22453e354c7510083a70..30c99f62fad12241fb89851d9bc56b5673fddacc 100644 (file)
@@ -40,7 +40,7 @@ struct SkOTTableGlyph {
         void advance(uint16_t num) {
             fLocaPtr.shortOffset += num << fLocaFormat;
             fCurrentGlyphOffset = fLocaFormat ? SkEndian_SwapBE32(*fLocaPtr.longOffset)
-                                              : SkEndian_SwapBE16(*fLocaPtr.shortOffset);
+                                              : SkEndian_SwapBE16(*fLocaPtr.shortOffset) << 1;
         }
         const SkOTTableGlyphData* next() {
             uint32_t previousGlyphOffset = fCurrentGlyphOffset;