1*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/include/graphite/GrCommon.h Thu Jan 22 00:36:40 2009 2*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrCommon.h Sat Aug 22 19:36:32 2009 3*889cced1SEike Rathke@@ -18,6 +18,8 @@ 4*889cced1SEike Rathke #ifndef GRCOMMON_INCLUDED 5*889cced1SEike Rathke #define GRCOMMON_INCLUDED 6*889cced1SEike Rathke 7*889cced1SEike Rathke+#define _SECURE_SCL 0 // to allow GlyphSetIterator to work, which points off the end of a vector 8*889cced1SEike Rathke+#define _HAS_ITERATOR_DEBUGGING 0 9*889cced1SEike Rathke 10*889cced1SEike Rathke // Standard Headers. 11*889cced1SEike Rathke 12*889cced1SEike Rathke@@ -33,6 +35,7 @@ 13*889cced1SEike Rathke #include <vector> 14*889cced1SEike Rathke #include <algorithm> 15*889cced1SEike Rathke #include <string> 16*889cced1SEike Rathke+///#include <stdexcept> -- possibly needed for std::string Xran and Xlen functions?? 17*889cced1SEike Rathke 18*889cced1SEike Rathke // Uncomment this to allow multiple versions of gr to coexist 19*889cced1SEike Rathke // in the same program e.g. pangographite with gtk uses namespace gr 20*889cced1SEike Rathke@@ -41,7 +44,7 @@ 21*889cced1SEike Rathke // Provided the client includes GrClient.h first this #define is 22*889cced1SEike Rathke // picked up by all files. 23*889cced1SEike Rathke 24*889cced1SEike Rathke-//#define gr gr2 25*889cced1SEike Rathke+#define gr gr3ooo 26*889cced1SEike Rathke 27*889cced1SEike Rathke // Project headers 28*889cced1SEike Rathke #include "GrPlatform.h" 29*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h Thu Jan 22 00:36:40 2009 30*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h Sat Aug 22 19:36:32 2009 31*889cced1SEike Rathke@@ -24,11 +24,11 @@ 32*889cced1SEike Rathke 33*889cced1SEike Rathke typedef signed long HRESULT; 34*889cced1SEike Rathke 35*889cced1SEike Rathke-inline const long InterlockedIncrement(long *const intr_lck) { 36*889cced1SEike Rathke+inline long InterlockedIncrement(long *const intr_lck) { 37*889cced1SEike Rathke return ++*intr_lck; 38*889cced1SEike Rathke } 39*889cced1SEike Rathke 40*889cced1SEike Rathke-inline const long InterlockedDecrement(long *const intr_lck) { 41*889cced1SEike Rathke+inline long InterlockedDecrement(long *const intr_lck) { 42*889cced1SEike Rathke return --*intr_lck; 43*889cced1SEike Rathke } 44*889cced1SEike Rathke 45*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/makefile.vc7 Thu Aug 21 16:24:32 2008 46*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/makefile.vc7 Sat Aug 22 19:36:32 2009 47*889cced1SEike Rathke@@ -48,11 +48,7 @@ 48*889cced1SEike Rathke CPP_DEBUG=/D "TRACING" $(CPP_DEBUG) 49*889cced1SEike Rathke !ENDIF 50*889cced1SEike Rathke 51*889cced1SEike Rathke-!IF "$(OS)" == "Windows_NT" 52*889cced1SEike Rathke NULL= 53*889cced1SEike Rathke-!ELSE 54*889cced1SEike Rathke-NULL=nul 55*889cced1SEike Rathke-!ENDIF 56*889cced1SEike Rathke 57*889cced1SEike Rathke clean : 58*889cced1SEike Rathke @- rd /s/q .\release_temp 59*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/makefile.vc8 Sat Aug 22 21:58:25 2009 60*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/makefile.vc8 Sat Aug 22 21:57:42 2009 61*889cced1SEike Rathke@@ -2,11 +2,16 @@ 62*889cced1SEike Rathke TARGET=graphite 63*889cced1SEike Rathke 64*889cced1SEike Rathke CPP=cl.exe 65*889cced1SEike Rathke-CPPFLAGS=/Zc:wchar_t- /nologo /W4 /GR /EHsc /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING" /Fp"$(INTDIR)\graphite.pch" /Fd"$(INTDIR)\\" /FD /c 66*889cced1SEike Rathke+### HDU: disabled building with the normal compile flags 67*889cced1SEike Rathke+###CPPFLAGS= /Zc:wchar_t- /nologo /W4 /GR /EHsc /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING" /Fp"$(INTDIR)\graphite.pch" /Fd"$(INTDIR)\\" /FD /c 68*889cced1SEike Rathke+### HDU: because for full binary compatibility with the rest of OOo all compile flags must match exactly 69*889cced1SEike Rathke+### which is especially true for template-heavy C++ code with non-default config (e.g. _STLP_DEBUG enabled) 70*889cced1SEike Rathke+CPPFLAGS= $(CFLAGS4MSC) /nologo /W4 /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING" /Fp"$(INTDIR)\graphite.pch" /FD /c 71*889cced1SEike Rathke+ 72*889cced1SEike Rathke # /Wp62 73*889cced1SEike Rathke 74*889cced1SEike Rathke LINK=link.exe 75*889cced1SEike Rathke-LINK_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /pdb:"$(OUTDIR)\\graphite.pdb" /machine:I386 /out:"$(OUTDIR)\\$(TARGET).dll" /implib:"$(OUTDIR)\\$(TARGET).lib" 76*889cced1SEike Rathke+LINK_FLAGS=$(ADDLIBS) kernel32.lib user32.lib gdi32.lib winspool.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /pdb:"$(OUTDIR)\\graphite.pdb" /machine:I386 /out:"$(OUTDIR)\\$(TARGET).dll" /implib:"$(OUTDIR)\\$(TARGET).lib" 77*889cced1SEike Rathke 78*889cced1SEike Rathke BSC32=bscmake.exe 79*889cced1SEike Rathke BSC32_FLAGS=/nologo /o"$(OUTDIR)\\$(TARGET).bsc" 80*889cced1SEike Rathke@@ -24,21 +29,21 @@ 81*889cced1SEike Rathke SBREXT = .sbr 82*889cced1SEike Rathke 83*889cced1SEike Rathke !IF "$(CFG)" == "DEBUG" 84*889cced1SEike Rathke-CPP_DEBUG=/D "DEBUG" /Gm /GR /ZI /Od /RTC1 /FR"$(INTDIR)\\" /$(MLIB)d 85*889cced1SEike Rathke+CPP_DEBUG=/D "DEBUG" /Gm /GR /Od /RTC1 /FR"$(INTDIR)\\" 86*889cced1SEike Rathke # CPP_DEBUG=/D "DEBUG" /Gm /GR /ZI /Od /RTC1 /FR"$(INTDIR)\\" /MDd 87*889cced1SEike Rathke 88*889cced1SEike Rathke OUTDIR=.\debug 89*889cced1SEike Rathke INTDIR=.\debug_temp 90*889cced1SEike Rathke-LINK_DEBUG= MSVCRTD.lib /debug /incremental:yes #/pdbtype:sept 91*889cced1SEike Rathke+LINK_DEBUG= /debug 92*889cced1SEike Rathke 93*889cced1SEike Rathke all : lib lib_dll bsc 94*889cced1SEike Rathke 95*889cced1SEike Rathke !ELSE 96*889cced1SEike Rathke-CPP_DEBUG=/D "NDEBUG" /O2 /$(MLIB) 97*889cced1SEike Rathke+CPP_DEBUG=/D "NDEBUG" /O2 98*889cced1SEike Rathke # CPP_DEBUG=/D "NDEBUG" /O2 /MD 99*889cced1SEike Rathke OUTDIR=.\release 100*889cced1SEike Rathke INTDIR=.\release_temp 101*889cced1SEike Rathke-LINK_DEBUG= MSVCRT.lib /incremental:no /NODEFAULTLIB:libc 102*889cced1SEike Rathke+LINK_DEBUG= /incremental:no /NODEFAULTLIB:libc 103*889cced1SEike Rathke 104*889cced1SEike Rathke all : lib lib_dll 105*889cced1SEike Rathke 106*889cced1SEike Rathke@@ -48,11 +53,7 @@ 107*889cced1SEike Rathke CPP_DEBUG=/D "TRACING" $(CPP_DEBUG) 108*889cced1SEike Rathke !ENDIF 109*889cced1SEike Rathke 110*889cced1SEike Rathke-!IF "$(OS)" == "Windows_NT" 111*889cced1SEike Rathke NULL= 112*889cced1SEike Rathke-!ELSE 113*889cced1SEike Rathke-NULL=nul 114*889cced1SEike Rathke-!ENDIF 115*889cced1SEike Rathke 116*889cced1SEike Rathke clean : 117*889cced1SEike Rathke @- rd /s/q .\release_temp 118*889cced1SEike Rathke@@ -779,7 +780,7 @@ 119*889cced1SEike Rathke @- $(CPP) $(CPPFLAGS) $(CPP_DEBUG) /Fo"$(INTDIR)\FileFont$(OBJEXT)" $? 120*889cced1SEike Rathke 121*889cced1SEike Rathke "$(INTDIR)\FileFont_dll$(OBJEXT)" : "src/font/FileFont.cpp" 122*889cced1SEike Rathke- @- $(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $? 123*889cced1SEike Rathke+ $(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $? 124*889cced1SEike Rathke 125*889cced1SEike Rathke !ENDIF 126*889cced1SEike Rathke 127*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/FileFont.cpp Thu Jan 22 00:36:42 2009 128*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/FileFont.cpp Sat Aug 22 19:36:32 2009 129*889cced1SEike Rathke@@ -207,11 +207,11 @@ 130*889cced1SEike Rathke cch16 += cch16Used; 131*889cced1SEike Rathke } 132*889cced1SEike Rathke // } 133*889cced1SEike Rathke-#else 134*889cced1SEike Rathke+#elif 1 135*889cced1SEike Rathke m_stuFaceName.assign(rgchwFace); 136*889cced1SEike Rathke- // VS 2005 needs this: 137*889cced1SEike Rathke- //for (int cch16 = 0; cch16 < cchw; cch16++) 138*889cced1SEike Rathke- // m_stuFaceName.push_back(rgchwFace[cch16]); 139*889cced1SEike Rathke+#else // VS 2005 needs this: 140*889cced1SEike Rathke+ for (int cch16 = 0; cch16 < cchw; cch16++) 141*889cced1SEike Rathke+ m_stuFaceName.push_back(rgchwFace[cch16]); 142*889cced1SEike Rathke #endif 143*889cced1SEike Rathke pTable = readTable(ktiHead, lSize); 144*889cced1SEike Rathke if (!m_fIsValid || !pTable) 145*889cced1SEike Rathke@@ -233,7 +233,7 @@ 146*889cced1SEike Rathke FileFont::readTable(int /*TableId*/ tid, size_t & size) 147*889cced1SEike Rathke { 148*889cced1SEike Rathke const TableId tableId = TableId(tid); 149*889cced1SEike Rathke- bool isValid = true; 150*889cced1SEike Rathke+ bool isTableValid = true; 151*889cced1SEike Rathke size_t lOffset = 0, lSize = 0; 152*889cced1SEike Rathke if (!m_pTableCache) 153*889cced1SEike Rathke { 154*889cced1SEike Rathke@@ -245,9 +245,9 @@ 155*889cced1SEike Rathke size = m_pTableCache->getTableSize(tableId); 156*889cced1SEike Rathke // check whether it is already in the cache 157*889cced1SEike Rathke if (pTable) return pTable; 158*889cced1SEike Rathke- isValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir, 159*889cced1SEike Rathke+ isTableValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir, 160*889cced1SEike Rathke lOffset, lSize); 161*889cced1SEike Rathke- if (!isValid) 162*889cced1SEike Rathke+ if (!isTableValid) 163*889cced1SEike Rathke return NULL; 164*889cced1SEike Rathke fseek(m_pfile, lOffset, SEEK_SET); 165*889cced1SEike Rathke // only allocate if needed 166*889cced1SEike Rathke@@ -255,16 +255,16 @@ 167*889cced1SEike Rathke 168*889cced1SEike Rathke if (!pTable) 169*889cced1SEike Rathke { 170*889cced1SEike Rathke- isValid = false; 171*889cced1SEike Rathke+ isTableValid = false; 172*889cced1SEike Rathke return NULL; 173*889cced1SEike Rathke } 174*889cced1SEike Rathke size_t bytesRead = fread(pTable, 1, lSize, m_pfile); 175*889cced1SEike Rathke- isValid = bytesRead == lSize; 176*889cced1SEike Rathke- if (isValid) 177*889cced1SEike Rathke+ isTableValid = bytesRead == lSize; 178*889cced1SEike Rathke+ if (isTableValid) 179*889cced1SEike Rathke { 180*889cced1SEike Rathke- isValid &= TtfUtil::CheckTable(tableId, pTable, lSize); 181*889cced1SEike Rathke+ isTableValid &= TtfUtil::CheckTable(tableId, pTable, lSize); 182*889cced1SEike Rathke } 183*889cced1SEike Rathke- if (!isValid) 184*889cced1SEike Rathke+ if (!isTableValid) 185*889cced1SEike Rathke { 186*889cced1SEike Rathke return 0; 187*889cced1SEike Rathke } 188*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/Font.cpp Tue May 20 08:04:16 2008 189*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/Font.cpp Sat Aug 22 19:36:33 2009 190*889cced1SEike Rathke@@ -626,7 +626,7 @@ 191*889cced1SEike Rathke Assert(false); 192*889cced1SEike Rathke m_ifeat = m_cfeat; 193*889cced1SEike Rathke } 194*889cced1SEike Rathke- else if (m_ifeat + n < 0) 195*889cced1SEike Rathke+ else if (static_cast<int>(m_ifeat) + n < 0) 196*889cced1SEike Rathke { 197*889cced1SEike Rathke // Can't decrement. 198*889cced1SEike Rathke Assert(false); 199*889cced1SEike Rathke@@ -727,7 +727,7 @@ 200*889cced1SEike Rathke Assert(false); 201*889cced1SEike Rathke m_ifset = m_cfset; 202*889cced1SEike Rathke } 203*889cced1SEike Rathke- if (m_ifset + n < 0) 204*889cced1SEike Rathke+ if (static_cast<int>(m_ifset) + n < 0) 205*889cced1SEike Rathke { 206*889cced1SEike Rathke // Can't decrement. 207*889cced1SEike Rathke Assert(false); 208*889cced1SEike Rathke@@ -820,7 +820,7 @@ 209*889cced1SEike Rathke Assert(false); 210*889cced1SEike Rathke m_ilang = m_clang; 211*889cced1SEike Rathke } 212*889cced1SEike Rathke- else if (m_ilang + n < 0) 213*889cced1SEike Rathke+ else if (static_cast<int>(m_ilang) + n < 0) 214*889cced1SEike Rathke { 215*889cced1SEike Rathke // Can't decrement. 216*889cced1SEike Rathke Assert(false); 217*889cced1SEike Rathke@@ -906,7 +906,7 @@ 218*889cced1SEike Rathke Assert(false); 219*889cced1SEike Rathke m_ilang = m_clang; 220*889cced1SEike Rathke } 221*889cced1SEike Rathke- else if (m_ilang + n < 0) 222*889cced1SEike Rathke+ else if (static_cast<int>(m_ilang) + n < 0) 223*889cced1SEike Rathke { 224*889cced1SEike Rathke // Can't decrement. 225*889cced1SEike Rathke Assert(false); 226*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp Thu Jan 29 10:33:19 2009 227*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp Sat Aug 22 19:36:33 2009 228*889cced1SEike Rathke@@ -492,7 +492,7 @@ 229*889cced1SEike Rathke const Sfnt::FontHeader * pTable = 230*889cced1SEike Rathke reinterpret_cast<const Sfnt::FontHeader *>(pHead); 231*889cced1SEike Rathke 232*889cced1SEike Rathke- return read(((pTable->mac_style) & 0x00000002) != 0); 233*889cced1SEike Rathke+ return ((read(pTable->mac_style) & 0x00000002) != 0); 234*889cced1SEike Rathke } 235*889cced1SEike Rathke 236*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 237*889cced1SEike Rathke@@ -1108,8 +1108,8 @@ 238*889cced1SEike Rathke { // loca entries are two bytes and have been divided by two 239*889cced1SEike Rathke if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed 240*889cced1SEike Rathke { 241*889cced1SEike Rathke- const uint16 * pTable = reinterpret_cast<const uint16 *>(pLoca); 242*889cced1SEike Rathke- return (read(pTable[nGlyphId]) << 1); 243*889cced1SEike Rathke+ const uint16 * pTableLoca = reinterpret_cast<const uint16 *>(pLoca); 244*889cced1SEike Rathke+ return (read(pTableLoca[nGlyphId]) << 1); 245*889cced1SEike Rathke } 246*889cced1SEike Rathke } 247*889cced1SEike Rathke 248*889cced1SEike Rathke@@ -1117,8 +1117,8 @@ 249*889cced1SEike Rathke { // loca entries are four bytes 250*889cced1SEike Rathke if (nGlyphId <= (lLocaSize >> 2) - 1) 251*889cced1SEike Rathke { 252*889cced1SEike Rathke- const uint32 * pTable = reinterpret_cast<const uint32 *>(pLoca); 253*889cced1SEike Rathke- return read(pTable[nGlyphId]); 254*889cced1SEike Rathke+ const uint32 * pTableLoca = reinterpret_cast<const uint32 *>(pLoca); 255*889cced1SEike Rathke+ return read(pTableLoca[nGlyphId]); 256*889cced1SEike Rathke } 257*889cced1SEike Rathke } 258*889cced1SEike Rathke 259*889cced1SEike Rathke@@ -1586,7 +1586,7 @@ 260*889cced1SEike Rathke 261*889cced1SEike Rathke for (size_t i = 0; i < cCompId; i++) 262*889cced1SEike Rathke { 263*889cced1SEike Rathke- void * pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]), 264*889cced1SEike Rathke+ pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]), 265*889cced1SEike Rathke pGlyf, pLoca, lLocaSize, pHead); 266*889cced1SEike Rathke if (pSimpleGlyf == NULL) {return false;} 267*889cced1SEike Rathke 268*889cced1SEike Rathke@@ -1748,7 +1748,7 @@ 269*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 270*889cced1SEike Rathke bool GlyfPoints(gr::gid16 nGlyphId, const void * pGlyf, 271*889cced1SEike Rathke const void * pLoca, size_t lLocaSize, const void * pHead, 272*889cced1SEike Rathke- const int * prgnContourEndPoint, size_t cnEndPoints, 273*889cced1SEike Rathke+ const int * /*prgnContourEndPoint*/, size_t /*cnEndPoints*/, 274*889cced1SEike Rathke int * prgnX, int * prgnY, bool * prgfOnCurve, size_t cnPoints) 275*889cced1SEike Rathke { 276*889cced1SEike Rathke std::fill_n(prgnX, cnPoints, INT_MAX); 277*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp Wed Jan 28 04:01:29 2009 278*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp Sat Aug 22 19:36:33 2009 279*889cced1SEike Rathke@@ -353,7 +353,7 @@ 280*889cced1SEike Rathke @param bOn - true if we are turning on (ignored in this implementation) 281*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 282*889cced1SEike Rathke bool SegmentPainter::drawSelectionRange(int ichwAnchor, int ichwEnd, 283*889cced1SEike Rathke- float ydLineTop, float ydLineBottom, bool bOn) 284*889cced1SEike Rathke+ float ydLineTop, float ydLineBottom, bool /*bOn*/) 285*889cced1SEike Rathke { 286*889cced1SEike Rathke if (g_fDrawing) 287*889cced1SEike Rathke return true; 288*889cced1SEike Rathke@@ -993,7 +993,7 @@ 289*889cced1SEike Rathke an I-beam (std selection) 290*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 291*889cced1SEike Rathke void SegmentPainter::CalcOrDrawInsertionPoint( 292*889cced1SEike Rathke- int ichwIP, bool fAssocPrev, bool bOn, bool fForceSplit, 293*889cced1SEike Rathke+ int ichwIP, bool fAssocPrev, bool /*bOn*/, bool fForceSplit, 294*889cced1SEike Rathke Rect * prdPrimary, Rect * prdSecondary) 295*889cced1SEike Rathke { 296*889cced1SEike Rathke GrResult res = kresOk; 297*889cced1SEike Rathke@@ -1277,7 +1277,7 @@ 298*889cced1SEike Rathke if NULL, do the drawing 299*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 300*889cced1SEike Rathke void SegmentPainter::InvertIBeam(float xs, float ysTop, float ysBottom, 301*889cced1SEike Rathke- bool fAssocPrev, Rect * prdRet) 302*889cced1SEike Rathke+ bool /*fAssocPrev*/, Rect * prdRet) 303*889cced1SEike Rathke { 304*889cced1SEike Rathke float xd = ScaleXToDest(xs); 305*889cced1SEike Rathke float ydTop = ScaleYToDest(ysTop); 306*889cced1SEike Rathke@@ -1675,7 +1675,7 @@ 307*889cced1SEike Rathke } 308*889cced1SEike Rathke 309*889cced1SEike Rathke bool SegmentPainter::AtEdgeOfCluster(GrSlotOutput * psloutBase, int isloutBase, 310*889cced1SEike Rathke- GrSlotOutput * pslout, int islout, bool fBefore) 311*889cced1SEike Rathke+ GrSlotOutput * /*pslout*/, int islout, bool fBefore) 312*889cced1SEike Rathke { 313*889cced1SEike Rathke // Compare pslout to all the members of the cluster. If it is the minimum or maximum, it 314*889cced1SEike Rathke // is at an edge. 315*889cced1SEike Rathke@@ -1778,12 +1778,12 @@ 316*889cced1SEike Rathke } 317*889cced1SEike Rathke for (icomp = 0; icomp < pslout->NumberOfComponents(); icomp++) 318*889cced1SEike Rathke { 319*889cced1SEike Rathke- for (int ichw = pslout->FirstUnderlyingComponent(icomp) ; 320*889cced1SEike Rathke- ichw <= pslout->LastUnderlyingComponent(icomp) ; 321*889cced1SEike Rathke- ichw++) 322*889cced1SEike Rathke+ for (int ichwTemp = pslout->FirstUnderlyingComponent(icomp) ; 323*889cced1SEike Rathke+ ichwTemp <= pslout->LastUnderlyingComponent(icomp) ; 324*889cced1SEike Rathke+ ichwTemp++) 325*889cced1SEike Rathke { 326*889cced1SEike Rathke- if (m_pseg->m_prgiComponent[ichw - m_pseg->m_ichwAssocsMin] == icomp) 327*889cced1SEike Rathke- prgfAllSelected[ichw] = fAll; 328*889cced1SEike Rathke+ if (m_pseg->m_prgiComponent[ichwTemp - m_pseg->m_ichwAssocsMin] == icomp) 329*889cced1SEike Rathke+ prgfAllSelected[ichwTemp] = fAll; 330*889cced1SEike Rathke } 331*889cced1SEike Rathke } 332*889cced1SEike Rathke } 333*889cced1SEike Rathke@@ -2304,7 +2304,11 @@ 334*889cced1SEike Rathke Assert that there are no overlaps among all the rectangles in the array, which should 335*889cced1SEike Rathke be the case if AdjustRectsToNotOverlap is working properly. 336*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 337*889cced1SEike Rathke+#ifdef _DEBUG 338*889cced1SEike Rathke void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & vrect) 339*889cced1SEike Rathke+#else 340*889cced1SEike Rathke+void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & /*vrect*/) 341*889cced1SEike Rathke+#endif 342*889cced1SEike Rathke { 343*889cced1SEike Rathke #ifdef _DEBUG 344*889cced1SEike Rathke for (int irect1 = 0; irect1 < signed(vrect.size() - 1); irect1++) 345*889cced1SEike Rathke@@ -2452,7 +2456,11 @@ 346*889cced1SEike Rathke Assert that there are no overlaps among all the rectangles in the array, which should 347*889cced1SEike Rathke be the case if AdjustRectsToNotOverlap is working properly. 348*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 349*889cced1SEike Rathke+#ifdef _DEBUG 350*889cced1SEike Rathke void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & vls) 351*889cced1SEike Rathke+#else 352*889cced1SEike Rathke+void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & /*vls*/) 353*889cced1SEike Rathke+#endif 354*889cced1SEike Rathke { 355*889cced1SEike Rathke #ifdef _DEBUG 356*889cced1SEike Rathke for (int ils1 = 0; ils1 < (int)vls.size() - 1; ils1++) 357*889cced1SEike Rathke@@ -2884,7 +2892,7 @@ 358*889cced1SEike Rathke { 359*889cced1SEike Rathke if (icompNext != icompCurr) 360*889cced1SEike Rathke { 361*889cced1SEike Rathke- float xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext]; 362*889cced1SEike Rathke+ xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext]; 363*889cced1SEike Rathke if (fMovingRight && xsHorizNext > xsHorizCurr) 364*889cced1SEike Rathke break; 365*889cced1SEike Rathke else if (!fMovingRight && xsHorizNext < xsHorizCurr) 366*889cced1SEike Rathke@@ -2996,7 +3004,7 @@ 367*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 368*889cced1SEike Rathke Make sure the font is set to use the character properties required by this segment. 369*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 370*889cced1SEike Rathke-void SegmentPainter::SetFontProps(unsigned long clrFore, unsigned long clrBack) 371*889cced1SEike Rathke+void SegmentPainter::SetFontProps(unsigned long /*clrFore*/, unsigned long /*clrBack*/) 372*889cced1SEike Rathke { 373*889cced1SEike Rathke return; 374*889cced1SEike Rathke } 375*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/FileInput.cpp Thu Jan 22 00:36:42 2009 376*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/FileInput.cpp Sat Aug 22 19:36:33 2009 377*889cced1SEike Rathke@@ -80,7 +80,7 @@ 378*889cced1SEike Rathke #ifdef GR_FW 379*889cced1SEike Rathke bool GrBufferIStream::Open(std::wstring stuFileName, int kMode) 380*889cced1SEike Rathke #else 381*889cced1SEike Rathke-bool GrBufferIStream::Open(const char * pcFileName, std::ios::openmode kMode) 382*889cced1SEike Rathke+bool GrBufferIStream::Open(const char * /*pcFileName*/, std::ios::openmode /*kMode*/) 383*889cced1SEike Rathke #endif 384*889cced1SEike Rathke { 385*889cced1SEike Rathke Assert(false); // use OpenBuffer 386*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp Thu Jan 22 00:36:42 2009 387*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp Sat Aug 22 19:36:33 2009 388*889cced1SEike Rathke@@ -417,8 +417,11 @@ 389*889cced1SEike Rathke return true; 390*889cced1SEike Rathke */ 391*889cced1SEike Rathke } 392*889cced1SEike Rathke- 393*889cced1SEike Rathke+#ifdef NDEBUG 394*889cced1SEike Rathke+bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType /*utf*/) 395*889cced1SEike Rathke+#else 396*889cced1SEike Rathke bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType utf) 397*889cced1SEike Rathke+#endif 398*889cced1SEike Rathke { 399*889cced1SEike Rathke Assert(ichs >= 0); 400*889cced1SEike Rathke Assert(ichs <= cchs); 401*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrClassTable.h Thu Jan 22 00:36:42 2009 402*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrClassTable.h Sat Aug 22 19:36:33 2009 403*889cced1SEike Rathke@@ -54,7 +54,11 @@ 404*889cced1SEike Rathke /*------------------------------------------------------------------------------------------ 405*889cced1SEike Rathke Copy the raw memory into the instance. 406*889cced1SEike Rathke ------------------------------------------------------------------------------------------*/ 407*889cced1SEike Rathke+#ifdef NDEBUG 408*889cced1SEike Rathke+ void CopyFrom(data16 * pchwStart, int /*cchw*/) 409*889cced1SEike Rathke+#else 410*889cced1SEike Rathke void CopyFrom(data16 * pchwStart, int cchw) 411*889cced1SEike Rathke+#endif 412*889cced1SEike Rathke { 413*889cced1SEike Rathke m_cgixBIG = pchwStart[0]; 414*889cced1SEike Rathke m_digixBIGInit = pchwStart[1]; 415*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp Wed Jan 28 04:01:29 2009 416*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp Sat Aug 22 19:36:33 2009 417*889cced1SEike Rathke@@ -159,12 +159,12 @@ 418*889cced1SEike Rathke GrEngine::~GrEngine() 419*889cced1SEike Rathke { 420*889cced1SEike Rathke DestroyEverything(); 421*889cced1SEike Rathke- #ifdef _MSC_VER 422*889cced1SEike Rathke- if (!_CrtCheckMemory()) 423*889cced1SEike Rathke- { 424*889cced1SEike Rathke- OutputDebugString(L"bad memory"); 425*889cced1SEike Rathke- } 426*889cced1SEike Rathke- #endif 427*889cced1SEike Rathke+// #ifdef _MSC_VER 428*889cced1SEike Rathke+// if (!_CrtCheckMemory()) 429*889cced1SEike Rathke+// { 430*889cced1SEike Rathke+// OutputDebugString(L"bad memory"); 431*889cced1SEike Rathke+// } 432*889cced1SEike Rathke+// #endif 433*889cced1SEike Rathke } 434*889cced1SEike Rathke 435*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 436*889cced1SEike Rathke@@ -173,12 +173,12 @@ 437*889cced1SEike Rathke void GrEngine::DestroyEverything() 438*889cced1SEike Rathke { 439*889cced1SEike Rathke DestroyContents(); 440*889cced1SEike Rathke- #ifdef _MSC_VER 441*889cced1SEike Rathke- if (!_CrtCheckMemory()) 442*889cced1SEike Rathke- { 443*889cced1SEike Rathke- OutputDebugString(L"bad memory"); 444*889cced1SEike Rathke- } 445*889cced1SEike Rathke- #endif 446*889cced1SEike Rathke+// #ifdef _MSC_VER 447*889cced1SEike Rathke+// if (!_CrtCheckMemory()) 448*889cced1SEike Rathke+// { 449*889cced1SEike Rathke+// OutputDebugString(L"bad memory"); 450*889cced1SEike Rathke+// } 451*889cced1SEike Rathke+// #endif 452*889cced1SEike Rathke 453*889cced1SEike Rathke m_strCtrlFileReg.erase(); 454*889cced1SEike Rathke m_strCtrlFileBold.erase(); 455*889cced1SEike Rathke@@ -417,7 +417,11 @@ 456*889cced1SEike Rathke @return The supported script direction(s). If more than one, the application is 457*889cced1SEike Rathke responsible for choosing the most appropriate. 458*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 459*889cced1SEike Rathke+#ifdef NDEBUG 460*889cced1SEike Rathke+GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * /*prgchwErrMsg*/, int /*cchMaxErrMsg*/) 461*889cced1SEike Rathke+#else 462*889cced1SEike Rathke GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * prgchwErrMsg, int cchMaxErrMsg) 463*889cced1SEike Rathke+#endif 464*889cced1SEike Rathke { 465*889cced1SEike Rathke ChkGrOutPtr(pgrfsdc); 466*889cced1SEike Rathke ChkGrArrayArg(prgchwErrMsg, cchMaxErrMsg); 467*889cced1SEike Rathke@@ -789,7 +793,7 @@ 468*889cced1SEike Rathke Record a system error indicating a bad error in rendering using a supposedly valid font. 469*889cced1SEike Rathke OBSOLETE 470*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 471*889cced1SEike Rathke-void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult res) 472*889cced1SEike Rathke+void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult /*res*/) 473*889cced1SEike Rathke { 474*889cced1SEike Rathke if (prgchwErrMsg == NULL || cchMax == 0) 475*889cced1SEike Rathke return; 476*889cced1SEike Rathke@@ -970,7 +974,7 @@ 477*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 478*889cced1SEike Rathke Return whether the text is asking for bold and/or italic text. 479*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 480*889cced1SEike Rathke-void GrEngine::GetStyles(Font * pfont, int ichwMin, bool * pfBold, bool * pfItalic) 481*889cced1SEike Rathke+void GrEngine::GetStyles(Font * pfont, int /*ichwMin*/, bool * pfBold, bool * pfItalic) 482*889cced1SEike Rathke { 483*889cced1SEike Rathke *pfBold = pfont->bold(); 484*889cced1SEike Rathke *pfItalic = pfont->italic(); 485*889cced1SEike Rathke@@ -981,7 +985,11 @@ 486*889cced1SEike Rathke Should only be called when we know we are using a base font, or when we are reading 487*889cced1SEike Rathke the base font to see if it is valid. 488*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 489*889cced1SEike Rathke+#ifdef NDEBUG 490*889cced1SEike Rathke+void GrEngine::SwitchGraphicsFont(bool /*fBase*/) 491*889cced1SEike Rathke+#else 492*889cced1SEike Rathke void GrEngine::SwitchGraphicsFont(bool fBase) 493*889cced1SEike Rathke+#endif 494*889cced1SEike Rathke { 495*889cced1SEike Rathke Assert(!fBase || m_stuBaseFaceName.size() > 0); 496*889cced1SEike Rathke 497*889cced1SEike Rathke@@ -1135,7 +1143,7 @@ 498*889cced1SEike Rathke m_chwJShrink0 = 0xffff; 499*889cced1SEike Rathke m_chwJStep0 = 0xffff; 500*889cced1SEike Rathke m_chwJWeight0 = 0xffff; 501*889cced1SEike Rathke- for (int i = 0; i < m_cJLevels; i++) 502*889cced1SEike Rathke+ for (i = 0; i < m_cJLevels; i++) 503*889cced1SEike Rathke { 504*889cced1SEike Rathke // justification glyph attribute IDs 505*889cced1SEike Rathke bTmp = grstrm.ReadByteFromFont(); 506*889cced1SEike Rathke@@ -1210,10 +1218,12 @@ 507*889cced1SEike Rathke 508*889cced1SEike Rathke // rendering behaviors--ignore for now 509*889cced1SEike Rathke byte cBehaviors = grstrm.ReadByteFromFont(); 510*889cced1SEike Rathke- unsigned int nBehaviors[kMaxRenderingBehavior]; 511*889cced1SEike Rathke+ int nTmp; 512*889cced1SEike Rathke+ //unsigned int nBehaviors[kMaxRenderingBehavior]; -- this big buffer causes a stack overflow in Multiscribe; rework eventually 513*889cced1SEike Rathke for (i = 0; i < cBehaviors; i++) 514*889cced1SEike Rathke { 515*889cced1SEike Rathke- nBehaviors[i] = unsigned(grstrm.ReadIntFromFont()); 516*889cced1SEike Rathke+ //nBehaviors[i] = unsigned(grstrm.ReadIntFromFont()); 517*889cced1SEike Rathke+ nTmp = unsigned(grstrm.ReadIntFromFont()); 518*889cced1SEike Rathke } 519*889cced1SEike Rathke 520*889cced1SEike Rathke // linebreak glyph ID 521*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp Thu Jan 22 00:36:42 2009 522*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp Sat Aug 22 19:36:33 2009 523*889cced1SEike Rathke@@ -46,7 +46,7 @@ 524*889cced1SEike Rathke Fill in the FSM by reading from the font stream. 525*889cced1SEike Rathke Assumes the stream is in the correct position. 526*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 527*889cced1SEike Rathke-bool GrFSM::ReadFromFont(GrIStream & grstrm, int fxdVersion) 528*889cced1SEike Rathke+bool GrFSM::ReadFromFont(GrIStream & grstrm, int /*fxdVersion*/) 529*889cced1SEike Rathke { 530*889cced1SEike Rathke short snTmp; 531*889cced1SEike Rathke 532*889cced1SEike Rathke@@ -138,7 +138,7 @@ 533*889cced1SEike Rathke Fill in the FSM's state table by reading from the font stream. 534*889cced1SEike Rathke Assumes the stream is in the correct position. 535*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 536*889cced1SEike Rathke-bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int fxdVersion) 537*889cced1SEike Rathke+bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int /*fxdVersion*/) 538*889cced1SEike Rathke { 539*889cced1SEike Rathke int cCells = ((m_crow - m_crowFinal) * m_ccol); 540*889cced1SEike Rathke m_prgrowTransitions = new short[cCells]; 541*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp Thu Jan 22 00:36:42 2009 542*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp Sat Aug 22 19:36:33 2009 543*889cced1SEike Rathke@@ -186,7 +186,7 @@ 544*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 545*889cced1SEike Rathke Read the languages from the font. 546*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 547*889cced1SEike Rathke-bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int fxdVersion) 548*889cced1SEike Rathke+bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int /*fxdVersion*/) 549*889cced1SEike Rathke { 550*889cced1SEike Rathke GrIStream & grstrm = *pgrstrm; 551*889cced1SEike Rathke 552*889cced1SEike Rathke@@ -206,13 +206,22 @@ 553*889cced1SEike Rathke 554*889cced1SEike Rathke m_cbOffset0 = (lsbf)(m_prglang[0].cbOffsetBIG); 555*889cced1SEike Rathke 556*889cced1SEike Rathke- Assert((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0); // bogus entry has no settings 557*889cced1SEike Rathke+ if ((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0) // bogus entry has no settings 558*889cced1SEike Rathke+ { 559*889cced1SEike Rathke cb = (lsbf)(m_prglang[m_clang].cbOffsetBIG) - m_cbOffset0; 560*889cced1SEike Rathke- Assert(cb % sizeof(FeatSet) == 0); // # of bytes fits nicely into FeatSet class 561*889cced1SEike Rathke+ if (cb % sizeof(FeatSet) == 0) // # of bytes fits nicely into FeatSet class 562*889cced1SEike Rathke+ { 563*889cced1SEike Rathke int cfset = cb / sizeof(FeatSet); 564*889cced1SEike Rathke m_prgfset = new FeatSet[cfset]; 565*889cced1SEike Rathke m_cfset = cfset; 566*889cced1SEike Rathke grstrm.ReadBlockFromFont(m_prgfset, cb); 567*889cced1SEike Rathke+ } 568*889cced1SEike Rathke+ else return false; 569*889cced1SEike Rathke+ } 570*889cced1SEike Rathke+ else 571*889cced1SEike Rathke+ { 572*889cced1SEike Rathke+ return false; 573*889cced1SEike Rathke+ } 574*889cced1SEike Rathke 575*889cced1SEike Rathke return true; 576*889cced1SEike Rathke } 577*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPass.cpp Wed Jan 28 04:01:29 2009 578*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.cpp Sat Aug 22 19:36:34 2009 579*889cced1SEike Rathke@@ -279,9 +279,10 @@ 580*889cced1SEike Rathke @param twsh - how we are handling trailing white-space 581*889cced1SEike Rathke @param pnRet - return value 582*889cced1SEike Rathke @param pcslotGot - return the number of slots gotten 583*889cced1SEike Rathke- @param pislotFinalBreak - return the index of the final slot, when we are removing 584*889cced1SEike Rathke- the trailing white-space and so the end of the segment 585*889cced1SEike Rathke- will be before the any actual line-break slot 586*889cced1SEike Rathke+ @param pislotFinalBreak - index of the final slot (LB or actual glyph), or -1; 587*889cced1SEike Rathke+ adjusted when we are removing the trailing white-space and 588*889cced1SEike Rathke+ so the end of the segment will be before the any actual 589*889cced1SEike Rathke+ line-break slot 590*889cced1SEike Rathke 591*889cced1SEike Rathke @return kNextPass if we were able to generated the number requested, or processing is 592*889cced1SEike Rathke complete; otherwise return the number of slots needed from the previous pass. 593*889cced1SEike Rathke@@ -465,7 +466,7 @@ 594*889cced1SEike Rathke void GrBidiPass::ExtendOutput(GrTableManager * ptman, 595*889cced1SEike Rathke GrSlotStream* psstrmIn, GrSlotStream* psstrmOut, 596*889cced1SEike Rathke int cslotNeededByNext, TrWsHandling twsh, 597*889cced1SEike Rathke- int * pnRet, int * pcslotGot, int * pislotFinalBreak) 598*889cced1SEike Rathke+ int * pnRet, int * pcslotGot, int * /*pislotFinalBreak*/) 599*889cced1SEike Rathke { 600*889cced1SEike Rathke Assert(psstrmIn->SlotsToReprocess() == 0); 601*889cced1SEike Rathke 602*889cced1SEike Rathke@@ -776,7 +777,7 @@ 603*889cced1SEike Rathke int GrPass::ExtendFinalOutput(GrTableManager * ptman, 604*889cced1SEike Rathke GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput, 605*889cced1SEike Rathke float xsSpaceAllotted, bool fWidthIsCharCount, bool fInfiniteWidth, 606*889cced1SEike Rathke- bool fHaveLineBreak, bool fMustBacktrack, LineBrk lbMax, TrWsHandling twsh, 607*889cced1SEike Rathke+ bool fHaveLineBreak, bool fMustBacktrack, LineBrk /*lbMax*/, TrWsHandling twsh, 608*889cced1SEike Rathke int * pislotLB, float * pxsWidth) 609*889cced1SEike Rathke { 610*889cced1SEike Rathke EngineState * pengst = ptman->State(); 611*889cced1SEike Rathke@@ -897,7 +898,11 @@ 612*889cced1SEike Rathke Remove undesirable trailing white-space. 613*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 614*889cced1SEike Rathke int GrPass::RemoveTrailingWhiteSpace(GrTableManager * ptman, GrSlotStream * psstrmOut, 615*889cced1SEike Rathke+#ifdef NDEBUG 616*889cced1SEike Rathke+ TrWsHandling /*twsh*/, int * pislotFinalBreak) 617*889cced1SEike Rathke+#else 618*889cced1SEike Rathke TrWsHandling twsh, int * pislotFinalBreak) 619*889cced1SEike Rathke+#endif 620*889cced1SEike Rathke { 621*889cced1SEike Rathke EngineState * pengst = ptman->State(); 622*889cced1SEike Rathke 623*889cced1SEike Rathke@@ -944,7 +949,7 @@ 624*889cced1SEike Rathke should never be necessary if they've set up their tables right. 625*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 626*889cced1SEike Rathke void GrPass::CheckInputProgress(GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput, 627*889cced1SEike Rathke- int islotOrigInput) 628*889cced1SEike Rathke+ int /*islotOrigInput*/) 629*889cced1SEike Rathke { 630*889cced1SEike Rathke int islotInput = psstrmInput->ReadPosForNextGet(); 631*889cced1SEike Rathke // Assert(islotInput >= islotOrigInput); -- no longer true now that we can back up 632*889cced1SEike Rathke@@ -1752,7 +1757,7 @@ 633*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 634*889cced1SEike Rathke int GrPass::Unwind(GrTableManager * ptman, 635*889cced1SEike Rathke int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, 636*889cced1SEike Rathke- bool fFirst) 637*889cced1SEike Rathke+ bool /*fFirst*/) 638*889cced1SEike Rathke { 639*889cced1SEike Rathke // Back up the number of slots required for the longest rule context, 640*889cced1SEike Rathke // but if we land in the middle of a chunk, go forward to its boundary. 641*889cced1SEike Rathke@@ -1824,7 +1829,7 @@ 642*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 643*889cced1SEike Rathke int GrBidiPass::Unwind(GrTableManager * ptman, 644*889cced1SEike Rathke int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, 645*889cced1SEike Rathke- bool fFirst) 646*889cced1SEike Rathke+ bool /*fFirst*/) 647*889cced1SEike Rathke { 648*889cced1SEike Rathke int islotIn; 649*889cced1SEike Rathke int islotOut; 650*889cced1SEike Rathke@@ -1901,8 +1906,8 @@ 651*889cced1SEike Rathke OBSOLETE 652*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 653*889cced1SEike Rathke //:Ignore 654*889cced1SEike Rathke-void GrPosPass::Unattach(GrSlotStream * psstrmIn, int islotIn, 655*889cced1SEike Rathke- GrSlotStream * psstrmOut, int islotOut, int islotLB) 656*889cced1SEike Rathke+void GrPosPass::Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/, 657*889cced1SEike Rathke+ GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/) 658*889cced1SEike Rathke { 659*889cced1SEike Rathke // Because this is a positioning pass, there is a one-to-one correspondence between 660*889cced1SEike Rathke // the slots in the input and the slots in the output. Thus we can make simplifying 661*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPass.h Thu Aug 21 16:24:32 2008 662*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.h Sat Aug 22 19:36:34 2009 663*889cced1SEike Rathke@@ -197,7 +197,7 @@ 664*889cced1SEike Rathke bool ReadFromFont(GrIStream & grstrm, int fxdSilfVersion, int fxdRuleVersion, int nOffset); 665*889cced1SEike Rathke void InitializeWithNoRules(); 666*889cced1SEike Rathke 667*889cced1SEike Rathke- virtual void SetTopDirLevel(int n) 668*889cced1SEike Rathke+ virtual void SetTopDirLevel(int /*n*/) 669*889cced1SEike Rathke { // only GrBidiPass does anything interesting 670*889cced1SEike Rathke } 671*889cced1SEike Rathke 672*889cced1SEike Rathke@@ -253,13 +253,13 @@ 673*889cced1SEike Rathke m_pzpst->SetResyncSkip(n); 674*889cced1SEike Rathke } 675*889cced1SEike Rathke 676*889cced1SEike Rathke- virtual void DoCleanUpSegMin(GrTableManager * ptman, 677*889cced1SEike Rathke- GrSlotStream * psstrmIn, int islotInitReadPos, GrSlotStream * psstrmOut) 678*889cced1SEike Rathke+ virtual void DoCleanUpSegMin(GrTableManager * /*ptman*/, 679*889cced1SEike Rathke+ GrSlotStream * /*psstrmIn*/, int /*islotInitReadPos*/, GrSlotStream * /*psstrmOut*/) 680*889cced1SEike Rathke { 681*889cced1SEike Rathke } 682*889cced1SEike Rathke 683*889cced1SEike Rathke- virtual void DoCleanUpSegLim(GrTableManager * ptman, GrSlotStream * psstrmOut, 684*889cced1SEike Rathke- TrWsHandling twsh) 685*889cced1SEike Rathke+ virtual void DoCleanUpSegLim(GrTableManager * /*ptman*/, GrSlotStream * /*psstrmOut*/, 686*889cced1SEike Rathke+ TrWsHandling /*twsh*/) 687*889cced1SEike Rathke { 688*889cced1SEike Rathke } 689*889cced1SEike Rathke 690*889cced1SEike Rathke@@ -383,8 +383,8 @@ 691*889cced1SEike Rathke void MapChunks(GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, 692*889cced1SEike Rathke int islotChunkI, int islotChunkO, int cslotReprocessed); 693*889cced1SEike Rathke 694*889cced1SEike Rathke- virtual void Unattach(GrSlotStream * psstrmIn, int islotIn, // GrPosPass overrides 695*889cced1SEike Rathke- GrSlotStream * psstrmOut, int islotOut, int islotLB) 696*889cced1SEike Rathke+ virtual void Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/, // GrPosPass overrides 697*889cced1SEike Rathke+ GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/) 698*889cced1SEike Rathke { 699*889cced1SEike Rathke } 700*889cced1SEike Rathke 701*889cced1SEike Rathke@@ -500,8 +500,8 @@ 702*889cced1SEike Rathke 703*889cced1SEike Rathke protected: 704*889cced1SEike Rathke // Irrelevant when generating glyphs. 705*889cced1SEike Rathke- virtual void RunRule(GrTableManager *, int ruln, 706*889cced1SEike Rathke- GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput) 707*889cced1SEike Rathke+ virtual void RunRule(GrTableManager *, int /*ruln*/, 708*889cced1SEike Rathke+ GrSlotStream * /*psstrmInput*/, GrSlotStream * /*psstrmOutput*/) 709*889cced1SEike Rathke { 710*889cced1SEike Rathke Assert(false); 711*889cced1SEike Rathke } 712*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp Wed Jan 28 04:01:29 2009 713*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp Sat Aug 22 19:36:34 2009 714*889cced1SEike Rathke@@ -632,8 +632,13 @@ 715*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 716*889cced1SEike Rathke We are finished processing a slot; go on to the next slot, or possibly go backwards. 717*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 718*889cced1SEike Rathke-void GrPass::DoNext(GrTableManager * ptman, 719*889cced1SEike Rathke- int cslot, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 720*889cced1SEike Rathke+#ifdef NDEBUG 721*889cced1SEike Rathke+void GrPass::DoNext(GrTableManager * /*ptman*/, 722*889cced1SEike Rathke+ int /*cslot*/, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/) 723*889cced1SEike Rathke+#else 724*889cced1SEike Rathke+void GrPass::DoNext(GrTableManager * /*ptman*/, 725*889cced1SEike Rathke+ int cslot, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/) 726*889cced1SEike Rathke+#endif 727*889cced1SEike Rathke { 728*889cced1SEike Rathke gAssert(cslot == 1); // for now anyway 729*889cced1SEike Rathke } 730*889cced1SEike Rathke@@ -690,6 +695,7 @@ 731*889cced1SEike Rathke psstrmOut->SetSegMinToWritePos(false); 732*889cced1SEike Rathke if (fSetSegLim) 733*889cced1SEike Rathke psstrmOut->SetSegLimToWritePos(false); 734*889cced1SEike Rathke+ //gid16 chw; chw = pslotNew->GlyphID(); 735*889cced1SEike Rathke psstrmOut->NextPut(pslotNew); 736*889cced1SEike Rathke } 737*889cced1SEike Rathke 738*889cced1SEike Rathke@@ -729,6 +735,7 @@ 739*889cced1SEike Rathke psstrmOut->SetSegMinToWritePos(false); 740*889cced1SEike Rathke if (fSetSegLim) 741*889cced1SEike Rathke psstrmOut->SetSegLimToWritePos(false); 742*889cced1SEike Rathke+ //gid16 chw; chw = pslotNew->GlyphID(); 743*889cced1SEike Rathke psstrmOut->NextPut(pslotNew); 744*889cced1SEike Rathke } 745*889cced1SEike Rathke 746*889cced1SEike Rathke@@ -825,7 +832,7 @@ 747*889cced1SEike Rathke @param psstrmIn / Out - input/output streams 748*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 749*889cced1SEike Rathke void GrPass::DoPutSubs3(GrTableManager * ptman, bool fInserting, 750*889cced1SEike Rathke- int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int cslotSel3, int nSelClass3, 751*889cced1SEike Rathke+ int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int /*cslotSel3*/, int nSelClass3, 752*889cced1SEike Rathke int nReplacementClass, 753*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 754*889cced1SEike Rathke { 755*889cced1SEike Rathke@@ -888,7 +895,7 @@ 756*889cced1SEike Rathke Common part of all the DoPutSubs... methods. 757*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 758*889cced1SEike Rathke void GrPass::DoPutSubsAux(GrTableManager * ptman, bool fInserting, gid16 nGlyphReplacement, 759*889cced1SEike Rathke- GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput, 760*889cced1SEike Rathke+ GrSlotStream * /*psstrmIn*/, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput, 761*889cced1SEike Rathke bool fAtSegMin, bool fAtSegLim) 762*889cced1SEike Rathke { 763*889cced1SEike Rathke EngineState * pengst = ptman->State(); 764*889cced1SEike Rathke@@ -915,6 +922,7 @@ 765*889cced1SEike Rathke psstrmOut->SetSegMinToWritePos(false); 766*889cced1SEike Rathke if (fSetSegLim) 767*889cced1SEike Rathke psstrmOut->SetSegLimToWritePos(false); 768*889cced1SEike Rathke+ //gid16 chw; chw = pslotNew->GlyphID(); 769*889cced1SEike Rathke psstrmOut->NextPut(pslotNew); 770*889cced1SEike Rathke } 771*889cced1SEike Rathke 772*889cced1SEike Rathke@@ -924,7 +932,7 @@ 773*889cced1SEike Rathke and its after-assoc to the slot before it. This makes it basically unselectable. 774*889cced1SEike Rathke OBSOLETE - handled by slot initialization code 775*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 776*889cced1SEike Rathke-void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * psstrmIn) 777*889cced1SEike Rathke+void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * /*psstrmIn*/) 778*889cced1SEike Rathke { 779*889cced1SEike Rathke pslotNew->ClearAssocs(); 780*889cced1SEike Rathke } 781*889cced1SEike Rathke@@ -943,6 +951,7 @@ 782*889cced1SEike Rathke psstrmOut->SetSegLimToWritePos(); 783*889cced1SEike Rathke 784*889cced1SEike Rathke GrSlotState * pslot = psstrmIn->NextGet(); 785*889cced1SEike Rathke+ //gid16 chw; chw = pslotNew->GlyphID(); 786*889cced1SEike Rathke pslot->MarkDeleted(); 787*889cced1SEike Rathke 788*889cced1SEike Rathke if (ptman->LoggingTransduction()) 789*889cced1SEike Rathke@@ -957,7 +966,7 @@ 790*889cced1SEike Rathke @param fInserting - whether current slot was inserted 791*889cced1SEike Rathke @param psstrmIn / Out - input/output streams 792*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 793*889cced1SEike Rathke-void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool fInserting, 794*889cced1SEike Rathke+void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool /*fInserting*/, 795*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 796*889cced1SEike Rathke { 797*889cced1SEike Rathke gAssert((unsigned)cnAssocs == vnAssocs.size()); 798*889cced1SEike Rathke@@ -997,7 +1006,11 @@ 799*889cced1SEike Rathke @param vnStack - stack to read value from 800*889cced1SEike Rathke @param psstrmIn / Out - input/output streams 801*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 802*889cced1SEike Rathke+#ifdef NDEBUG 803*889cced1SEike Rathke+void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool /*fInserting*/, 804*889cced1SEike Rathke+#else 805*889cced1SEike Rathke void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool fInserting, 806*889cced1SEike Rathke+#endif 807*889cced1SEike Rathke SlotAttrName slat, int slati, std::vector<int> & vnStack, 808*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 809*889cced1SEike Rathke { 810*889cced1SEike Rathke@@ -1192,7 +1205,7 @@ 811*889cced1SEike Rathke @param psstrmIn - input stream 812*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 813*889cced1SEike Rathke void GrPass::DoPushSlotAttr(GrTableManager * ptman, 814*889cced1SEike Rathke- int nSlotRef, bool fInserting, 815*889cced1SEike Rathke+ int nSlotRef, bool /*fInserting*/, 816*889cced1SEike Rathke SlotAttrName slat, int slati, std::vector<int> & vnStack, 817*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 818*889cced1SEike Rathke { 819*889cced1SEike Rathke@@ -1236,16 +1249,16 @@ 820*889cced1SEike Rathke 821*889cced1SEike Rathke case kslatAttTo: nVal = pslot->AttachTo(); break; 822*889cced1SEike Rathke case kslatAttLevel: nVal = pslot->AttachLevel(); break; 823*889cced1SEike Rathke- case kslatAttAtX: nVal = pslot->AttachAtX(ptman, psstrmIn); break; 824*889cced1SEike Rathke case kslatAttAtY: nVal = pslot->AttachAtY(); break; 825*889cced1SEike Rathke case kslatAttAtGpt: nVal = pslot->AttachAtGpoint(); break; 826*889cced1SEike Rathke case kslatAttAtXoff: nVal = pslot->AttachAtXOffset(); break; 827*889cced1SEike Rathke case kslatAttAtYoff: nVal = pslot->AttachAtYOffset(); break; 828*889cced1SEike Rathke- case kslatAttWithX: nVal = pslot->AttachWithX(ptman, psstrmIn); break; 829*889cced1SEike Rathke case kslatAttWithY: nVal = pslot->AttachWithY(); break; 830*889cced1SEike Rathke case kslatAttWithGpt: nVal = pslot->AttachWithGpoint(); break; 831*889cced1SEike Rathke case kslatAttWithXoff: nVal = pslot->AttachWithXOffset(); break; 832*889cced1SEike Rathke case kslatAttWithYoff: nVal = pslot->AttachWithYOffset(); break; 833*889cced1SEike Rathke+ case kslatAttAtX: nVal = pslot->AttachAtX(ptman, psstrmIn); break; 834*889cced1SEike Rathke+ case kslatAttWithX: nVal = pslot->AttachWithX(ptman, psstrmIn); break; 835*889cced1SEike Rathke 836*889cced1SEike Rathke case kslatMeasureSol: nVal = pslot->MeasureSol(); break; 837*889cced1SEike Rathke case kslatMeasureEol: nVal = pslot->MeasureEol(); break; 838*889cced1SEike Rathke@@ -1282,7 +1295,7 @@ 839*889cced1SEike Rathke @param vnStack - stack to push onto 840*889cced1SEike Rathke @param psstrmIn - input stream 841*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 842*889cced1SEike Rathke-void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting, 843*889cced1SEike Rathke+void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/, 844*889cced1SEike Rathke int nGlyphAttr, 845*889cced1SEike Rathke std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 846*889cced1SEike Rathke { 847*889cced1SEike Rathke@@ -1307,7 +1320,7 @@ 848*889cced1SEike Rathke @param vnStack - stack to push onto 849*889cced1SEike Rathke @param psstrmIn - input stream 850*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 851*889cced1SEike Rathke-void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting, 852*889cced1SEike Rathke+void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/, 853*889cced1SEike Rathke int nGlyphAttr, std::vector<int> & vnStack, 854*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 855*889cced1SEike Rathke { 856*889cced1SEike Rathke@@ -1337,7 +1350,7 @@ 857*889cced1SEike Rathke @param vnStack - stack to push onto 858*889cced1SEike Rathke @param psstrmIn - input stream 859*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 860*889cced1SEike Rathke-void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting, 861*889cced1SEike Rathke+void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/, 862*889cced1SEike Rathke int nGlyphAttr, int nAttLevel, 863*889cced1SEike Rathke std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 864*889cced1SEike Rathke { 865*889cced1SEike Rathke@@ -1364,7 +1377,7 @@ 866*889cced1SEike Rathke @param psstrmIn - input stream 867*889cced1SEike Rathke @param psstrmOut - output stream 868*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 869*889cced1SEike Rathke-void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting, 870*889cced1SEike Rathke+void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/, 871*889cced1SEike Rathke int nGlyphAttr, int nAttLevel, 872*889cced1SEike Rathke std::vector<int> & vnStack, 873*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 874*889cced1SEike Rathke@@ -1399,7 +1412,7 @@ 875*889cced1SEike Rathke } 876*889cced1SEike Rathke else 877*889cced1SEike Rathke { 878*889cced1SEike Rathke- pslot->CalcCompositeMetrics(ptman, psstrmIn, nAttLevel, true); 879*889cced1SEike Rathke+ pslot->CalcCompositeMetrics(ptman, psstrmIn, NULL, nAttLevel, true); 880*889cced1SEike Rathke 881*889cced1SEike Rathke float xy; 882*889cced1SEike Rathke switch (gmet) 883*889cced1SEike Rathke@@ -1435,7 +1448,11 @@ 884*889cced1SEike Rathke @param psstrmIn - input stream 885*889cced1SEike Rathke @param psstrmOut - output stream 886*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 887*889cced1SEike Rathke-void GrPass::DoPushFeatValue(GrTableManager * ptman, int nSlotRef, bool fInserting, 888*889cced1SEike Rathke+#ifdef NDEBUG 889*889cced1SEike Rathke+void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool /*fInserting*/, 890*889cced1SEike Rathke+#else 891*889cced1SEike Rathke+void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool fInserting, 892*889cced1SEike Rathke+#endif 893*889cced1SEike Rathke int nFeat, std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) 894*889cced1SEike Rathke { 895*889cced1SEike Rathke gAssert(!fInserting); 896*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp Wed Jan 28 04:01:29 2009 897*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp Sat Aug 22 19:36:34 2009 898*889cced1SEike Rathke@@ -261,7 +261,7 @@ 899*889cced1SEike Rathke root or attached leaf slots. 900*889cced1SEike Rathke OBSOLETE 901*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 902*889cced1SEike Rathke-void GrSlotState::FixAttachmentTree(GrSlotState * pslotOld) 903*889cced1SEike Rathke+void GrSlotState::FixAttachmentTree(GrSlotState * /*pslotOld*/) 904*889cced1SEike Rathke { 905*889cced1SEike Rathke #if 0 906*889cced1SEike Rathke pslotOld->m_vpslotAttLeaves.CopyTo(m_vpslotAttLeaves); 907*889cced1SEike Rathke@@ -524,13 +524,13 @@ 908*889cced1SEike Rathke GrSlotState * pslot; 909*889cced1SEike Rathke if (HasComponents()) 910*889cced1SEike Rathke { 911*889cced1SEike Rathke- for (int iComponent = 0; iComponent < m_cnCompPerLig; iComponent++) 912*889cced1SEike Rathke+ for (int iLigComponent = 0; iLigComponent < m_cnCompPerLig; iLigComponent++) 913*889cced1SEike Rathke { 914*889cced1SEike Rathke- pslot = CompRefSlot(iComponent); 915*889cced1SEike Rathke+ pslot = CompRefSlot(iLigComponent); 916*889cced1SEike Rathke if (pslot) 917*889cced1SEike Rathke { 918*889cced1SEike Rathke Assert(PassModified() >= pslot->PassModified()); 919*889cced1SEike Rathke- pslot->AllComponentRefs(vichw, vicomp, iComponent); 920*889cced1SEike Rathke+ pslot->AllComponentRefs(vichw, vicomp, iLigComponent); 921*889cced1SEike Rathke } 922*889cced1SEike Rathke } 923*889cced1SEike Rathke } 924*889cced1SEike Rathke@@ -1024,7 +1024,7 @@ 925*889cced1SEike Rathke NOTE: the caller is responsible to zap the cached positions of following glyphs 926*889cced1SEike Rathke in the stream. 927*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 928*889cced1SEike Rathke-void GrSlotState::AttachToRoot(GrTableManager * ptman, GrSlotStream * psstrm, 929*889cced1SEike Rathke+void GrSlotState::AttachToRoot(GrTableManager * /*ptman*/, GrSlotStream * psstrm, 930*889cced1SEike Rathke GrSlotState * pslotNewRoot) 931*889cced1SEike Rathke { 932*889cced1SEike Rathke GrSlotState * pslotOldRoot = (m_dislotRootFixed == 0) ? 933*889cced1SEike Rathke@@ -1063,7 +1063,7 @@ 934*889cced1SEike Rathke 935*889cced1SEike Rathke float xsWidth, xsVisWidth; 936*889cced1SEike Rathke if (m_xsPositionX == kNegInfFloat || m_ysPositionY == kNegInfFloat) 937*889cced1SEike Rathke- ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, &xsWidth, &xsVisWidth); 938*889cced1SEike Rathke+ ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, true, &xsWidth, &xsVisWidth); 939*889cced1SEike Rathke 940*889cced1SEike Rathke *pmXPos = ptman->LogToEmUnits(m_xsPositionX); 941*889cced1SEike Rathke *pmYPos = ptman->LogToEmUnits(m_ysPositionY); 942*889cced1SEike Rathke@@ -1077,7 +1077,7 @@ 943*889cced1SEike Rathke { 944*889cced1SEike Rathke Assert(m_dislotRootFixed == m_srAttachTo); 945*889cced1SEike Rathke GrSlotState * pslotRoot = AttachRoot(psstrm); 946*889cced1SEike Rathke- CalcRootMetrics(ptman, psstrm, kPosInfinity); 947*889cced1SEike Rathke+ CalcRootMetrics(ptman, psstrm, NULL, kPosInfinity); 948*889cced1SEike Rathke if (pslotRoot) 949*889cced1SEike Rathke pslotRoot->AdjustRootMetrics(ptman, psstrm); 950*889cced1SEike Rathke } 951*889cced1SEike Rathke@@ -1086,13 +1086,15 @@ 952*889cced1SEike Rathke Calculate the composite metrics for this slot. 953*889cced1SEike Rathke 954*889cced1SEike Rathke @param psstrm - stream for which we are calculating it 955*889cced1SEike Rathke+ @param psstrmNext - because when processing in the middle of a pass, we may need to 956*889cced1SEike Rathke+ get the slot from the following (output) stream 957*889cced1SEike Rathke @param nLevel - attachment level we are asking for; kPosInifinity means all levels 958*889cced1SEike Rathke @param fThorough - true: do a thorough recalculation; false: don't recalculate 959*889cced1SEike Rathke metrics for leaves (are they assumed to be accurate???) 960*889cced1SEike Rathke --currently not used 961*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 962*889cced1SEike Rathke void GrSlotState::CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm, 963*889cced1SEike Rathke- int nLevel, bool fThorough) 964*889cced1SEike Rathke+ GrSlotStream * psstrmNext, int nLevel, bool fThorough) 965*889cced1SEike Rathke { 966*889cced1SEike Rathke if (m_nCompositeLevel == nLevel) 967*889cced1SEike Rathke return; 968*889cced1SEike Rathke@@ -1101,19 +1103,38 @@ 969*889cced1SEike Rathke { 970*889cced1SEike Rathke Assert(m_dislotRootFixed == m_srAttachTo); 971*889cced1SEike Rathke GrSlotState * pslotRoot = AttachRoot(psstrm); 972*889cced1SEike Rathke+ // Kludge to handle the fact that we might have gotten the root from the wrong stream. 973*889cced1SEike Rathke+ // Calling MidPassSlotAt finds the right one. 974*889cced1SEike Rathke+ if (psstrmNext && pslotRoot) 975*889cced1SEike Rathke+ { 976*889cced1SEike Rathke+ int islotRoot = pslotRoot->PosPassIndex(); 977*889cced1SEike Rathke+ pslotRoot = psstrm->MidPassSlotAt(islotRoot, psstrmNext); 978*889cced1SEike Rathke+ } 979*889cced1SEike Rathke 980*889cced1SEike Rathke InitMetrics(ptman, pslotRoot); 981*889cced1SEike Rathke 982*889cced1SEike Rathke for (size_t islot = 0; islot < m_vdislotAttLeaves.size(); islot++) 983*889cced1SEike Rathke { 984*889cced1SEike Rathke- GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]); 985*889cced1SEike Rathke+ GrSlotState * pslotLeaf; 986*889cced1SEike Rathke+ if (psstrmNext) 987*889cced1SEike Rathke+ { 988*889cced1SEike Rathke+ // Calculating a position in the middle of processing a pass. 989*889cced1SEike Rathke+ pslotLeaf = psstrm->MidPassSlotAt(PosPassIndex() + m_vdislotAttLeaves[islot], 990*889cced1SEike Rathke+ psstrmNext); 991*889cced1SEike Rathke+ } 992*889cced1SEike Rathke+ else 993*889cced1SEike Rathke+ { 994*889cced1SEike Rathke+ // Calculating the final position. 995*889cced1SEike Rathke+ pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]); 996*889cced1SEike Rathke+ } 997*889cced1SEike Rathke+ 998*889cced1SEike Rathke if (pslotLeaf->AttachLevel() <= nLevel) 999*889cced1SEike Rathke- pslotLeaf->CalcCompositeMetrics(ptman, psstrm, nLevel, fThorough); 1000*889cced1SEike Rathke+ pslotLeaf->CalcCompositeMetrics(ptman, psstrm, psstrmNext, nLevel, fThorough); 1001*889cced1SEike Rathke else 1002*889cced1SEike Rathke // this slot will be ignored in the composite metrics 1003*889cced1SEike Rathke pslotLeaf->ZapRootMetrics(); 1004*889cced1SEike Rathke } 1005*889cced1SEike Rathke- CalcRootMetrics(ptman, psstrm, nLevel); 1006*889cced1SEike Rathke+ CalcRootMetrics(ptman, psstrm, psstrmNext, nLevel); 1007*889cced1SEike Rathke 1008*889cced1SEike Rathke m_nCompositeLevel = nLevel; 1009*889cced1SEike Rathke } 1010*889cced1SEike Rathke@@ -1129,25 +1150,33 @@ 1011*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 1012*889cced1SEike Rathke Calculate the metrics for this node and all its leaf nodes. 1013*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1014*889cced1SEike Rathke-void GrSlotState::CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm, int nLevel) 1015*889cced1SEike Rathke+void GrSlotState::CalcRootMetrics(GrTableManager * /*ptman*/, GrSlotStream * psstrm, 1016*889cced1SEike Rathke+ GrSlotStream * psstrmNext, int nLevel) 1017*889cced1SEike Rathke { 1018*889cced1SEike Rathke for (size_t idislot = 0; idislot < m_vdislotAttLeaves.size(); idislot++) 1019*889cced1SEike Rathke { 1020*889cced1SEike Rathke- GrSlotState * pslot = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]); 1021*889cced1SEike Rathke- if (pslot->AttachLevel() > nLevel) 1022*889cced1SEike Rathke+ GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]); 1023*889cced1SEike Rathke+ // Kludge to handle the fact that we might have gotten the leaf from the wrong stream. 1024*889cced1SEike Rathke+ // Calling MidPassSlotAt finds the right one. 1025*889cced1SEike Rathke+ if (psstrmNext) 1026*889cced1SEike Rathke+ { 1027*889cced1SEike Rathke+ int islot = pslotLeaf->PosPassIndex(); 1028*889cced1SEike Rathke+ pslotLeaf = psstrm->MidPassSlotAt(islot, psstrmNext); 1029*889cced1SEike Rathke+ } 1030*889cced1SEike Rathke+ if (pslotLeaf->AttachLevel() > nLevel) 1031*889cced1SEike Rathke continue; 1032*889cced1SEike Rathke 1033*889cced1SEike Rathke- m_xsClusterXOffset = min(m_xsClusterXOffset, pslot->m_xsClusterXOffset); 1034*889cced1SEike Rathke- if (!pslot->m_fIgnoreAdvance) 1035*889cced1SEike Rathke+ m_xsClusterXOffset = min(m_xsClusterXOffset, pslotLeaf->m_xsClusterXOffset); 1036*889cced1SEike Rathke+ if (!pslotLeaf->m_fIgnoreAdvance) 1037*889cced1SEike Rathke { 1038*889cced1SEike Rathke m_xsClusterAdv = max( 1039*889cced1SEike Rathke m_xsClusterAdv, 1040*889cced1SEike Rathke- pslot->m_xsClusterAdv + m_xsRootShiftX); 1041*889cced1SEike Rathke+ pslotLeaf->m_xsClusterAdv + m_xsRootShiftX); 1042*889cced1SEike Rathke } 1043*889cced1SEike Rathke- m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslot->m_xsClusterBbLeft); 1044*889cced1SEike Rathke- m_xsClusterBbRight = max(m_xsClusterBbRight, pslot->m_xsClusterBbRight); 1045*889cced1SEike Rathke- m_ysClusterBbTop = max(m_ysClusterBbTop, pslot->m_ysClusterBbTop); 1046*889cced1SEike Rathke- m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslot->m_ysClusterBbBottom); 1047*889cced1SEike Rathke+ m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslotLeaf->m_xsClusterBbLeft); 1048*889cced1SEike Rathke+ m_xsClusterBbRight = max(m_xsClusterBbRight, pslotLeaf->m_xsClusterBbRight); 1049*889cced1SEike Rathke+ m_ysClusterBbTop = max(m_ysClusterBbTop, pslotLeaf->m_ysClusterBbTop); 1050*889cced1SEike Rathke+ m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslotLeaf->m_ysClusterBbBottom); 1051*889cced1SEike Rathke } 1052*889cced1SEike Rathke } 1053*889cced1SEike Rathke 1054*889cced1SEike Rathke@@ -1263,7 +1292,7 @@ 1055*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 1056*889cced1SEike Rathke Y-offsets of a single glyph relative to the previous advance position. 1057*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1058*889cced1SEike Rathke-float GrSlotState::GlyphYOffset(GrSlotStream * psstrm) 1059*889cced1SEike Rathke+float GrSlotState::GlyphYOffset(GrSlotStream * /*psstrm*/) 1060*889cced1SEike Rathke { 1061*889cced1SEike Rathke return m_ysOffsetY; 1062*889cced1SEike Rathke } 1063*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.h Wed Jan 28 04:01:29 2009 1064*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h Sat Aug 22 19:36:34 2009 1065*889cced1SEike Rathke@@ -308,7 +308,11 @@ 1066*889cced1SEike Rathke { 1067*889cced1SEike Rathke return m_islotPosPass; 1068*889cced1SEike Rathke } 1069*889cced1SEike Rathke+#ifdef NDEBUG 1070*889cced1SEike Rathke+ void SetPosPassIndex(int islot, bool /*fInputToPosPass1*/) 1071*889cced1SEike Rathke+#else 1072*889cced1SEike Rathke void SetPosPassIndex(int islot, bool fInputToPosPass1) 1073*889cced1SEike Rathke+#endif 1074*889cced1SEike Rathke { 1075*889cced1SEike Rathke // If we're resetting it, it should be to the same value as before: 1076*889cced1SEike Rathke Assert(fInputToPosPass1 || m_islotPosPass == kNotYetSet || m_islotPosPass == islot); 1077*889cced1SEike Rathke@@ -386,12 +390,12 @@ 1078*889cced1SEike Rathke return (IsInitialLineBreak(chwLB) || IsFinalLineBreak(chwLB)); 1079*889cced1SEike Rathke //return (m_chwGlyphID == chwLB); // TODO: remove 1080*889cced1SEike Rathke } 1081*889cced1SEike Rathke- bool IsInitialLineBreak(gid16 chwLB) 1082*889cced1SEike Rathke+ bool IsInitialLineBreak(gid16 /*chwLB*/) 1083*889cced1SEike Rathke { 1084*889cced1SEike Rathke return (m_spsl == kspslLbInitial); 1085*889cced1SEike Rathke //return (IsLineBreak(chwLB) && m_fInitialLB == true); // TODO: remove 1086*889cced1SEike Rathke } 1087*889cced1SEike Rathke- bool IsFinalLineBreak(gid16 chwLB) 1088*889cced1SEike Rathke+ bool IsFinalLineBreak(gid16 /*chwLB*/) 1089*889cced1SEike Rathke { 1090*889cced1SEike Rathke return (m_spsl == kspslLbFinal); 1091*889cced1SEike Rathke //return (IsLineBreak(chwLB) && m_fInitialLB == false); // TODO: remove 1092*889cced1SEike Rathke@@ -475,7 +479,7 @@ 1093*889cced1SEike Rathke return m_mAttachAtX; 1094*889cced1SEike Rathke } 1095*889cced1SEike Rathke 1096*889cced1SEike Rathke- int AttachWithX(GrTableManager * ptman, GrSlotStream * psstrm) 1097*889cced1SEike Rathke+ int AttachWithX(GrTableManager * /*ptman*/, GrSlotStream * /*psstrm*/) 1098*889cced1SEike Rathke { 1099*889cced1SEike Rathke if (m_mAttachAtX == kNotYetSet) 1100*889cced1SEike Rathke { 1101*889cced1SEike Rathke@@ -615,7 +619,7 @@ 1102*889cced1SEike Rathke GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, int islotThis); 1103*889cced1SEike Rathke 1104*889cced1SEike Rathke void CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm, 1105*889cced1SEike Rathke- int nLevel, bool fThorough = false); 1106*889cced1SEike Rathke+ GrSlotStream * psstrmNext, int nLevel, bool fThorough = false); 1107*889cced1SEike Rathke 1108*889cced1SEike Rathke void Position(GrTableManager * ptman, 1109*889cced1SEike Rathke GrSlotStream * psstrmOut, int * pmXPos, int * pmYPos); 1110*889cced1SEike Rathke@@ -646,7 +650,7 @@ 1111*889cced1SEike Rathke { 1112*889cced1SEike Rathke return ClusterBbLeft(psstrm) + xs; 1113*889cced1SEike Rathke } 1114*889cced1SEike Rathke- float ClusterRsb(GrSlotStream * psstrm, float xs) 1115*889cced1SEike Rathke+ float ClusterRsb(GrSlotStream * /*psstrm*/, float xs) 1116*889cced1SEike Rathke { 1117*889cced1SEike Rathke return ClusterAdvWidthFrom(xs) - ClusterBbRightFrom(xs); 1118*889cced1SEike Rathke } 1119*889cced1SEike Rathke@@ -668,19 +672,19 @@ 1120*889cced1SEike Rathke { 1121*889cced1SEike Rathke return ClusterBbRightFrom(Base(psstrm)->ClusterRootOffset()); 1122*889cced1SEike Rathke } 1123*889cced1SEike Rathke- float ClusterBbTop(GrSlotStream * psstrm) 1124*889cced1SEike Rathke+ float ClusterBbTop(GrSlotStream * /*psstrm*/) 1125*889cced1SEike Rathke { 1126*889cced1SEike Rathke return m_ysClusterBbTop; 1127*889cced1SEike Rathke } 1128*889cced1SEike Rathke- float ClusterBbBottom(GrSlotStream * psstrm) 1129*889cced1SEike Rathke+ float ClusterBbBottom(GrSlotStream * /*psstrm*/) 1130*889cced1SEike Rathke { 1131*889cced1SEike Rathke return m_ysClusterBbBottom; 1132*889cced1SEike Rathke } 1133*889cced1SEike Rathke- float ClusterBbWidth(GrSlotStream * psstrm) 1134*889cced1SEike Rathke+ float ClusterBbWidth(GrSlotStream * /*psstrm*/) 1135*889cced1SEike Rathke { 1136*889cced1SEike Rathke return m_xsClusterBbRight - m_xsClusterBbLeft + 1; 1137*889cced1SEike Rathke } 1138*889cced1SEike Rathke- float ClusterBbHeight(GrSlotStream * psstrm) 1139*889cced1SEike Rathke+ float ClusterBbHeight(GrSlotStream * /*psstrm*/) 1140*889cced1SEike Rathke { 1141*889cced1SEike Rathke return m_ysClusterBbTop - m_ysClusterBbBottom + 1; 1142*889cced1SEike Rathke } 1143*889cced1SEike Rathke@@ -990,7 +994,8 @@ 1144*889cced1SEike Rathke void InitMetrics(GrTableManager * ptman, GrSlotState * pslotRoot); 1145*889cced1SEike Rathke void InitLeafMetrics(GrTableManager * ptman, GrSlotState * pslotRoot); 1146*889cced1SEike Rathke void InitRootMetrics(GrTableManager * ptman); 1147*889cced1SEike Rathke- void CalcRootMetrics(GrTableManager * ptman, GrSlotStream *, int nLevel); 1148*889cced1SEike Rathke+ void CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm, 1149*889cced1SEike Rathke+ GrSlotStream * psstrmNext, int nLevel); 1150*889cced1SEike Rathke void AttachToRoot(GrTableManager * ptman, GrSlotStream *, GrSlotState * pslotNewRoot); 1151*889cced1SEike Rathke void AttachLogUnits(GrTableManager * ptman, 1152*889cced1SEike Rathke GrSlotState * pslotRoot, 1153*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp Wed Feb 04 07:53:26 2009 1154*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp Sat Aug 22 19:36:34 2009 1155*889cced1SEike Rathke@@ -189,12 +189,16 @@ 1156*889cced1SEike Rathke stream position when the rule is being run. 1157*889cced1SEike Rathke 1158*889cced1SEike Rathke @param dislot - how far back to peek before the write position 1159*889cced1SEike Rathke- when the rule started; a negative number 1160*889cced1SEike Rathke+ WHEN THE RULE STARTED; a negative number 1161*889cced1SEike Rathke (NOTE: the current write position is irrelevant) 1162*889cced1SEike Rathke @param fNullOkay - true if it's okay to return NULL in the situation where we're asking 1163*889cced1SEike Rathke for something before the beginning of the stream 1164*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1165*889cced1SEike Rathke+#ifdef NDEBUG 1166*889cced1SEike Rathke+GrSlotState * GrSlotStream::PeekBack(int dislot, bool /*fNullOkay*/) 1167*889cced1SEike Rathke+#else 1168*889cced1SEike Rathke GrSlotState * GrSlotStream::PeekBack(int dislot, bool fNullOkay) 1169*889cced1SEike Rathke+#endif 1170*889cced1SEike Rathke { 1171*889cced1SEike Rathke Assert(dislot < 0); 1172*889cced1SEike Rathke if (dislot < m_islotRuleStartWrite * -1) 1173*889cced1SEike Rathke@@ -1104,6 +1108,7 @@ 1174*889cced1SEike Rathke case kdircRLO: 1175*889cced1SEike Rathke case kdircRLE: 1176*889cced1SEike Rathke case kdircPdfR: 1177*889cced1SEike Rathke+ case kdircRlb: 1178*889cced1SEike Rathke return true; 1179*889cced1SEike Rathke 1180*889cced1SEike Rathke case kdircNeutral: 1181*889cced1SEike Rathke@@ -1212,7 +1217,7 @@ 1182*889cced1SEike Rathke return true; 1183*889cced1SEike Rathke 1184*889cced1SEike Rathke float xsWidth, xsVisWidth; 1185*889cced1SEike Rathke- ptman->CalcPositionsUpTo(m_ipass, NULL, &xsWidth, &xsVisWidth); 1186*889cced1SEike Rathke+ ptman->CalcPositionsUpTo(m_ipass, NULL, false, &xsWidth, &xsVisWidth); 1187*889cced1SEike Rathke 1188*889cced1SEike Rathke *pxsWidth = (fIgnoreTrailingWS || twsh == ktwshOnlyWs) ? xsVisWidth : xsWidth; 1189*889cced1SEike Rathke return (*pxsWidth < xsSpaceAllotted); 1190*889cced1SEike Rathke@@ -1322,7 +1327,7 @@ 1191*889cced1SEike Rathke @param islotMin - first slot that is officially part of the segment (after initial LB) 1192*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1193*889cced1SEike Rathke int GrSlotStream::MakeSegmentBreak(GrTableManager * ptman, 1194*889cced1SEike Rathke- int islotPrevBreak, bool fInsertedLB, int islotStartTry, 1195*889cced1SEike Rathke+ int /*islotPrevBreak*/, bool /*fInsertedLB*/, int islotStartTry, 1196*889cced1SEike Rathke LineBrk lb, TrWsHandling twsh, int islotMin, 1197*889cced1SEike Rathke LineBrk * plbNextToTry) 1198*889cced1SEike Rathke { 1199*889cced1SEike Rathke@@ -1576,7 +1581,11 @@ 1200*889cced1SEike Rathke Return the break weight of the given slot, which should be a line-break. 1201*889cced1SEike Rathke OBSOLETE?? 1202*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1203*889cced1SEike Rathke+#ifdef NDEBUG 1204*889cced1SEike Rathke+LineBrk GrSlotStream::BreakWeightAt(gid16 /*chwLB*/, int islot) 1205*889cced1SEike Rathke+#else 1206*889cced1SEike Rathke LineBrk GrSlotStream::BreakWeightAt(gid16 chwLB, int islot) 1207*889cced1SEike Rathke+#endif 1208*889cced1SEike Rathke { 1209*889cced1SEike Rathke GrSlotState * pslot = GetSlotAt(islot); 1210*889cced1SEike Rathke Assert(pslot->IsLineBreak(chwLB)); 1211*889cced1SEike Rathke@@ -1769,7 +1778,7 @@ 1212*889cced1SEike Rathke @param fBackingUp - this chunk results in the stream position moving backwards, 1213*889cced1SEike Rathke so clear anything we're backing over 1214*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1215*889cced1SEike Rathke-void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int islotInputLim, 1216*889cced1SEike Rathke+void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int /*islotInputLim*/, 1217*889cced1SEike Rathke bool fSkipChunkStart, bool fBackingUp) 1218*889cced1SEike Rathke { 1219*889cced1SEike Rathke Assert(AssertValid()); 1220*889cced1SEike Rathke@@ -1828,7 +1837,7 @@ 1221*889cced1SEike Rathke @param fBackingUp - this chunk results in the stream position moving backwards, 1222*889cced1SEike Rathke so clear anything we're backing over 1223*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1224*889cced1SEike Rathke-void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int islotOutputLim, 1225*889cced1SEike Rathke+void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int /*islotOutputLim*/, 1226*889cced1SEike Rathke bool fSkipChunkStart, int cslotReprocess, bool fBackingUp) 1227*889cced1SEike Rathke { 1228*889cced1SEike Rathke Assert(AssertValid()); 1229*889cced1SEike Rathke@@ -1863,7 +1872,11 @@ 1230*889cced1SEike Rathke Ensure that the chunk maps for a pair of streams match properly. The recipient is 1231*889cced1SEike Rathke the input stream. 1232*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1233*889cced1SEike Rathke+#ifdef _DEBUG 1234*889cced1SEike Rathke void GrSlotStream::AssertChunkMapsValid(GrSlotStream * psstrmOut) 1235*889cced1SEike Rathke+#else 1236*889cced1SEike Rathke+void GrSlotStream::AssertChunkMapsValid(GrSlotStream * ) 1237*889cced1SEike Rathke+#endif 1238*889cced1SEike Rathke { 1239*889cced1SEike Rathke #ifdef _DEBUG 1240*889cced1SEike Rathke GrSlotStream * psstrmIn = this; 1241*889cced1SEike Rathke@@ -1915,7 +1924,11 @@ 1242*889cced1SEike Rathke Ensure that corresponding items in the streams of a positioning pass have matching 1243*889cced1SEike Rathke stream indices. The recipient is the output stream. 1244*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1245*889cced1SEike Rathke+#ifdef _DEBUG 1246*889cced1SEike Rathke void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * psstrmIn) 1247*889cced1SEike Rathke+#else 1248*889cced1SEike Rathke+void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * ) 1249*889cced1SEike Rathke+#endif 1250*889cced1SEike Rathke { 1251*889cced1SEike Rathke #ifdef _DEBUG 1252*889cced1SEike Rathke if (!GotIndexOffset()) 1253*889cced1SEike Rathke@@ -1939,7 +1948,11 @@ 1254*889cced1SEike Rathke in the output stream. (Currently the compiler ensures this by making it an error 1255*889cced1SEike Rathke to write rules that don't do this.) 1256*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1257*889cced1SEike Rathke+#ifdef _DEBUG 1258*889cced1SEike Rathke void GrSlotStream::AssertAttachmentsInOutput(int islotMin, int islotLim) 1259*889cced1SEike Rathke+#else 1260*889cced1SEike Rathke+void GrSlotStream::AssertAttachmentsInOutput(int , int ) 1261*889cced1SEike Rathke+#endif 1262*889cced1SEike Rathke { 1263*889cced1SEike Rathke #ifdef _DEBUG 1264*889cced1SEike Rathke for (int islot = islotMin; islot < islotLim; islot++) 1265*889cced1SEike Rathke@@ -2007,7 +2016,11 @@ 1266*889cced1SEike Rathke Record the number of slots in the stream that are previous to the official start of the 1267*889cced1SEike Rathke segment. 1268*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1269*889cced1SEike Rathke+#ifdef _DEBUG 1270*889cced1SEike Rathke void GrSlotStream::CalcIndexOffset(GrTableManager * ptman) 1271*889cced1SEike Rathke+#else 1272*889cced1SEike Rathke+void GrSlotStream::CalcIndexOffset(GrTableManager * ) 1273*889cced1SEike Rathke+#endif 1274*889cced1SEike Rathke { 1275*889cced1SEike Rathke if (GotIndexOffset()) 1276*889cced1SEike Rathke return; // already figured it 1277*889cced1SEike Rathke@@ -2203,6 +2212,21 @@ 1278*889cced1SEike Rathke } 1279*889cced1SEike Rathke 1280*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 1281*889cced1SEike Rathke+ In the middle of running a pass, return the given slot to use in processing. 1282*889cced1SEike Rathke+ Read it from the reprocess buffer if appropriate, or for slots previous to the current 1283*889cced1SEike Rathke+ position, read from the output stream (psstrmNext). 1284*889cced1SEike Rathke+ 1285*889cced1SEike Rathke+ psstrmNext may be NULL when processing is complete, therefore we only have one stream to 1286*889cced1SEike Rathke+ deal with. 1287*889cced1SEike Rathke+----------------------------------------------------------------------------------------------*/ 1288*889cced1SEike Rathke+GrSlotState * GrSlotStream::MidPassSlotAt(int islot, GrSlotStream * psstrmNext) 1289*889cced1SEike Rathke+{ 1290*889cced1SEike Rathke+ int islotInput = islot - ReadPosForNextGet() + 1; // +1 because RuleInputSlot takes 0 to mean the previously read slot 1291*889cced1SEike Rathke+ GrSlotState * pslot = RuleInputSlot(islotInput, psstrmNext); 1292*889cced1SEike Rathke+ return pslot; 1293*889cced1SEike Rathke+} 1294*889cced1SEike Rathke+ 1295*889cced1SEike Rathke+/*---------------------------------------------------------------------------------------------- 1296*889cced1SEike Rathke Return the "current" input item from the rule's perspective, ie, the last slot read. 1297*889cced1SEike Rathke So dislotOffset = 0 means not the slot at the read position but one slot earlier. 1298*889cced1SEike Rathke 1299*889cced1SEike Rathke@@ -2214,7 +2238,6 @@ 1300*889cced1SEike Rathke @param fNullOkay - true if it's okay to return NULL in the situation where we're asking 1301*889cced1SEike Rathke for something before the beginning of the stream 1302*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1303*889cced1SEike Rathke- 1304*889cced1SEike Rathke GrSlotState * GrSlotStream::RuleInputSlot(int dislotOffset, GrSlotStream * psstrmOutput, 1305*889cced1SEike Rathke bool fNullOkay) 1306*889cced1SEike Rathke { 1307*889cced1SEike Rathke@@ -2244,8 +2267,10 @@ 1308*889cced1SEike Rathke 1309*889cced1SEike Rathke if (cslotOffsetBack >= cslotPostReproc + cslotValidReproc) 1310*889cced1SEike Rathke { 1311*889cced1SEike Rathke- // Read from the output stream. 1312*889cced1SEike Rathke- int dislotTmp = dislotOffset - 1 + cslotPostReproc + cslotValidReproc; 1313*889cced1SEike Rathke+ // Read from the output stream. (Remember that PeekBack works relative to 1314*889cced1SEike Rathke+ // the rule-start write position, not the current write position.) 1315*889cced1SEike Rathke+ int dislotTmp = dislotOffset - 1 + cslotPostReproc 1316*889cced1SEike Rathke+ + cslotValidReproc - SlotsToReprocess(); 1317*889cced1SEike Rathke Assert(dislotTmp < 0); 1318*889cced1SEike Rathke return psstrmOutput->PeekBack(dislotTmp); 1319*889cced1SEike Rathke } 1320*889cced1SEike Rathke@@ -2253,7 +2278,7 @@ 1321*889cced1SEike Rathke { 1322*889cced1SEike Rathke if (m_islotReprocPos > -1) 1323*889cced1SEike Rathke { 1324*889cced1SEike Rathke- // Current read pos is inside reprocess buffer. 1325*889cced1SEike Rathke+ // Current read pos could be inside reprocess buffer. 1326*889cced1SEike Rathke Assert(cslotPostReproc == 0); 1327*889cced1SEike Rathke int islotStartReadReprocBuf = m_vpslotReproc.size() - cslotValidReproc; 1328*889cced1SEike Rathke Assert(islotStartReadReprocBuf >= 0); 1329*889cced1SEike Rathke@@ -2342,9 +2367,10 @@ 1330*889cced1SEike Rathke else if (pslotAfter) 1331*889cced1SEike Rathke pslot->Associate(pslotAfter); 1332*889cced1SEike Rathke else 1333*889cced1SEike Rathke+ { 1334*889cced1SEike Rathke // Weird, but can happen with an empty segment. 1335*889cced1SEike Rathke Warn("No assocations"); 1336*889cced1SEike Rathke- 1337*889cced1SEike Rathke+ } 1338*889cced1SEike Rathke // Assert(pslot->m_vpslotAssoc.Size() > 0); 1339*889cced1SEike Rathke pslot->m_fNeutralAssocs = true; 1340*889cced1SEike Rathke } 1341*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h Thu Jan 22 00:36:42 2009 1342*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h Sat Aug 22 19:36:34 2009 1343*889cced1SEike Rathke@@ -107,7 +107,7 @@ 1344*889cced1SEike Rathke ReleaseSlots(0, m_vpslot.size()); 1345*889cced1SEike Rathke } 1346*889cced1SEike Rathke 1347*889cced1SEike Rathke- void ReleaseSlots(int islotMin, int islotLim) 1348*889cced1SEike Rathke+ void ReleaseSlots(int /*islotMin*/, int /*islotLim*/) 1349*889cced1SEike Rathke { 1350*889cced1SEike Rathke // A slot stream is responsible for deleting the slot states that it created, 1351*889cced1SEike Rathke // that is, the ones whose modified tag equals this stream's pass index. 1352*889cced1SEike Rathke@@ -182,6 +182,7 @@ 1353*889cced1SEike Rathke return Peek(islot - ReadPosForNextGet()); 1354*889cced1SEike Rathke } 1355*889cced1SEike Rathke 1356*889cced1SEike Rathke+ // Return the functional read position, taking into account the reprocess buffer. 1357*889cced1SEike Rathke int ReadPosForNextGet() 1358*889cced1SEike Rathke { 1359*889cced1SEike Rathke return ReadPos() - SlotsToReprocess(); 1360*889cced1SEike Rathke@@ -260,12 +261,16 @@ 1361*889cced1SEike Rathke 1362*889cced1SEike Rathke void MarkFullyWritten(); 1363*889cced1SEike Rathke 1364*889cced1SEike Rathke+#ifdef NDEBUG 1365*889cced1SEike Rathke+ void SetSegMin(int islot, bool /*fAdjusting*/ = false) 1366*889cced1SEike Rathke+#else 1367*889cced1SEike Rathke void SetSegMin(int islot, bool fAdjusting = false) 1368*889cced1SEike Rathke+#endif 1369*889cced1SEike Rathke { 1370*889cced1SEike Rathke Assert(fAdjusting || m_islotSegMin == -1 || m_islotSegMin == islot); 1371*889cced1SEike Rathke m_islotSegMin = islot; 1372*889cced1SEike Rathke } 1373*889cced1SEike Rathke- void SetSegMinToWritePos(bool fMod = true) 1374*889cced1SEike Rathke+ void SetSegMinToWritePos(bool /*fMod*/ = true) 1375*889cced1SEike Rathke { 1376*889cced1SEike Rathke if (m_islotSegMin == -1) 1377*889cced1SEike Rathke m_islotSegMin = m_islotWritePos; 1378*889cced1SEike Rathke@@ -456,6 +461,7 @@ 1379*889cced1SEike Rathke } 1380*889cced1SEike Rathke } 1381*889cced1SEike Rathke 1382*889cced1SEike Rathke+ GrSlotState * MidPassSlotAt(int islot, GrSlotStream * psstrmNext = NULL); 1383*889cced1SEike Rathke GrSlotState * RuleInputSlot(int dislot = 0, GrSlotStream * psstrmOut = NULL, 1384*889cced1SEike Rathke bool fNullOkay = false); 1385*889cced1SEike Rathke GrSlotState * RuleOutputSlot(int dislot = 0); 1386*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp Wed Jan 28 04:01:29 2009 1387*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp Sat Aug 22 19:36:34 2009 1388*889cced1SEike Rathke@@ -25,8 +25,8 @@ 1389*889cced1SEike Rathke DEFINE_THIS_FILE 1390*889cced1SEike Rathke #ifndef _WIN32 1391*889cced1SEike Rathke #include <stdlib.h> 1392*889cced1SEike Rathke-#include <math.h> 1393*889cced1SEike Rathke #endif 1394*889cced1SEike Rathke+#include <math.h> 1395*889cced1SEike Rathke 1396*889cced1SEike Rathke //:>******************************************************************************************** 1397*889cced1SEike Rathke //:> Forward declarations 1398*889cced1SEike Rathke@@ -572,7 +572,7 @@ 1399*889cced1SEike Rathke else 1400*889cced1SEike Rathke { 1401*889cced1SEike Rathke Assert(!m_engst.m_fInsertedLB); 1402*889cced1SEike Rathke- Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB); 1403*889cced1SEike Rathke+ //Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB); -- no, ExtendGlyphIDOutput clearly sets islotUnderBreak regardless 1404*889cced1SEike Rathke } 1405*889cced1SEike Rathke int islotTmp = OutputStream(m_cpass - 1)->WritePos(); 1406*889cced1SEike Rathke GrSlotState * pslotTmp; 1407*889cced1SEike Rathke@@ -931,7 +931,7 @@ 1408*889cced1SEike Rathke @param plbFound - kind of line-break created 1409*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1410*889cced1SEike Rathke bool GrTableManager::Backtrack(int * pislotPrevBreak, 1411*889cced1SEike Rathke- LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool fMoreText, 1412*889cced1SEike Rathke+ LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool /*fMoreText*/, 1413*889cced1SEike Rathke int ichwCallerBtLim, bool fEndLine, 1414*889cced1SEike Rathke LineBrk * plbFound) 1415*889cced1SEike Rathke { 1416*889cced1SEike Rathke@@ -1343,7 +1343,7 @@ 1417*889cced1SEike Rathke Calculate the associations, and record the output slots in the segment. 1418*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1419*889cced1SEike Rathke void GrTableManager::RecordAssocsAndOutput(Font * pfont, 1420*889cced1SEike Rathke- Segment * pseg, bool fWidthIsCharCount, 1421*889cced1SEike Rathke+ Segment * pseg, bool /*fWidthIsCharCount*/, 1422*889cced1SEike Rathke TrWsHandling twsh, bool fParaRtl, int nDirDepth) 1423*889cced1SEike Rathke { 1424*889cced1SEike Rathke int cchwUnderlying = pseg->stopCharacter() - pseg->startCharacter(); 1425*889cced1SEike Rathke@@ -1362,7 +1362,7 @@ 1426*889cced1SEike Rathke #endif // OLD_TEST_STUFF 1427*889cced1SEike Rathke 1428*889cced1SEike Rathke // Make sure the final positions are set for every glyph. 1429*889cced1SEike Rathke- CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL), 1430*889cced1SEike Rathke+ CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL), false, 1431*889cced1SEike Rathke &xsTotalWidth, &xsVisWidth); 1432*889cced1SEike Rathke pseg->SetWidths(xsVisWidth, xsTotalWidth); 1433*889cced1SEike Rathke 1434*889cced1SEike Rathke@@ -1377,7 +1377,7 @@ 1435*889cced1SEike Rathke Calculate the underlying-to-surface associations and ligature mappings. 1436*889cced1SEike Rathke Assumes the arrays have been properly initialized. 1437*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1438*889cced1SEike Rathke-void GrTableManager::CalculateAssociations(Segment * pseg, int csloutSurface) 1439*889cced1SEike Rathke+void GrTableManager::CalculateAssociations(Segment * pseg, int /*csloutSurface*/) 1440*889cced1SEike Rathke { 1441*889cced1SEike Rathke GrSlotStream * psstrmFinal = OutputStream(m_cpass-1); 1442*889cced1SEike Rathke 1443*889cced1SEike Rathke@@ -2350,18 +2350,20 @@ 1444*889cced1SEike Rathke final pass, but it could be another if positions are 1445*889cced1SEike Rathke requested by the rules themselves 1446*889cced1SEike Rathke @param pslotLast - last slot that needs to be positioned, or NULL 1447*889cced1SEike Rathke+ @param fMidPass - calculating the position of some slot in the middle of the pass 1448*889cced1SEike Rathke @param pxsWidth - return the total width used so far 1449*889cced1SEike Rathke @param psxVisibleWidth - return the visible width so far 1450*889cced1SEike Rathke 1451*889cced1SEike Rathke MOVE to EngineState 1452*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1453*889cced1SEike Rathke-void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, 1454*889cced1SEike Rathke+void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass, 1455*889cced1SEike Rathke float * pxsWidth, float * pxsVisibleWidth) 1456*889cced1SEike Rathke { 1457*889cced1SEike Rathke Assert(ipass >= m_ipassPos1 - 1); 1458*889cced1SEike Rathke 1459*889cced1SEike Rathke int isstrm = ipass; 1460*889cced1SEike Rathke GrSlotStream * psstrm = OutputStream(isstrm); 1461*889cced1SEike Rathke+ GrSlotStream * psstrmNext = (isstrm >= m_cpass - 1) ? NULL : OutputStream(isstrm + 1); 1462*889cced1SEike Rathke Assert(psstrm->GotIndexOffset()); 1463*889cced1SEike Rathke if (psstrm->WritePos() <= psstrm->IndexOffset()) 1464*889cced1SEike Rathke { 1465*889cced1SEike Rathke@@ -2399,7 +2401,9 @@ 1466*889cced1SEike Rathke // to be later in the stream than the last actual slot passed in. 1467*889cced1SEike Rathke if (!psstrm->HasSlotAtPosPassIndex(pslotLast->AttachRootPosPassIndex())) 1468*889cced1SEike Rathke return; 1469*889cced1SEike Rathke- GrSlotState * pslotLastBase = pslotLast->Base(psstrm); 1470*889cced1SEike Rathke+ GrSlotState * pslotLastBase = (fMidPass && pslotLast->PosPassIndex() < psstrm->WritePos()) 1471*889cced1SEike Rathke+ ? pslotLast->Base(psstrmNext) 1472*889cced1SEike Rathke+ : pslotLast->Base(psstrm); 1473*889cced1SEike Rathke 1474*889cced1SEike Rathke if (ipass == m_cpass - 1 && m_engst.m_islotPosNext > -1) 1475*889cced1SEike Rathke { 1476*889cced1SEike Rathke@@ -2428,6 +2432,7 @@ 1477*889cced1SEike Rathke } 1478*889cced1SEike Rathke 1479*889cced1SEike Rathke std::vector<GrSlotState *> vpslotAttached; 1480*889cced1SEike Rathke+ std::vector<GrSlotStream *> vpsstrmAttached; 1481*889cced1SEike Rathke 1482*889cced1SEike Rathke bool fRtl = RightToLeft(); 1483*889cced1SEike Rathke 1484*889cced1SEike Rathke@@ -2435,13 +2440,24 @@ 1485*889cced1SEike Rathke { 1486*889cced1SEike Rathke Assert(islot < psstrm->SlotsPresent()); 1487*889cced1SEike Rathke 1488*889cced1SEike Rathke- pslot = (isstrm == ipass) ? psstrm->SlotAt(islot) : psstrm->OutputSlotAt(islot); 1489*889cced1SEike Rathke+ GrSlotStream * psstrmThis = psstrm; 1490*889cced1SEike Rathke+ if (fMidPass && islot < psstrm->WritePos()) 1491*889cced1SEike Rathke+ { 1492*889cced1SEike Rathke+ pslot = psstrm->MidPassSlotAt(islot, psstrmNext); 1493*889cced1SEike Rathke+ psstrmThis = psstrmNext; 1494*889cced1SEike Rathke+ } 1495*889cced1SEike Rathke+ else 1496*889cced1SEike Rathke+ { 1497*889cced1SEike Rathke+ //pslot = (isstrm == ipass) ? psstrm->SlotAt(islot) : psstrm->OutputSlotAt(islot); 1498*889cced1SEike Rathke+ pslot = psstrm->SlotAt(islot); 1499*889cced1SEike Rathke+ } 1500*889cced1SEike Rathke 1501*889cced1SEike Rathke if (!pslot->IsBase()) 1502*889cced1SEike Rathke { 1503*889cced1SEike Rathke // This slot is attached to another; it will be positioned strictly 1504*889cced1SEike Rathke // relative to that one. This happens in the loop below. 1505*889cced1SEike Rathke vpslotAttached.push_back(pslot); 1506*889cced1SEike Rathke+ vpsstrmAttached.push_back(psstrmThis); 1507*889cced1SEike Rathke } 1508*889cced1SEike Rathke else 1509*889cced1SEike Rathke { 1510*889cced1SEike Rathke@@ -2455,7 +2471,7 @@ 1511*889cced1SEike Rathke } 1512*889cced1SEike Rathke 1513*889cced1SEike Rathke // Make sure the metrics are the complete ones. 1514*889cced1SEike Rathke- pslot->CalcCompositeMetrics(this, psstrm, kPosInfinity, true); 1515*889cced1SEike Rathke+ pslot->CalcCompositeMetrics(this, psstrm, psstrmNext, kPosInfinity, true); 1516*889cced1SEike Rathke 1517*889cced1SEike Rathke float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio); 1518*889cced1SEike Rathke float ysInc = pslot->GlyphYOffset(psstrm); 1519*889cced1SEike Rathke@@ -2514,8 +2530,9 @@ 1520*889cced1SEike Rathke 1521*889cced1SEike Rathke for (size_t ipslot = 0; ipslot < vpslotAttached.size(); ipslot++) 1522*889cced1SEike Rathke { 1523*889cced1SEike Rathke- GrSlotState * pslot = vpslotAttached[ipslot]; 1524*889cced1SEike Rathke- GrSlotState * pslotBase = pslot->Base(psstrm); 1525*889cced1SEike Rathke+ GrSlotState * pslotAtt = vpslotAttached[ipslot]; 1526*889cced1SEike Rathke+ GrSlotStream * psstrmAtt = vpsstrmAttached[ipslot]; 1527*889cced1SEike Rathke+ GrSlotState * pslotBase = pslotAtt->Base(psstrmAtt); 1528*889cced1SEike Rathke if (pslotBase->XPosition() == kNegInfinity || pslotBase->YPosition() == kNegInfinity) 1529*889cced1SEike Rathke { 1530*889cced1SEike Rathke Assert(false); 1531*889cced1SEike Rathke@@ -2523,10 +2540,10 @@ 1532*889cced1SEike Rathke } 1533*889cced1SEike Rathke float xsCluster = pslotBase->XPosition() - pslotBase->GlyphXOffset(psstrm, fakeItalicRatio); 1534*889cced1SEike Rathke float ysCluster = pslotBase->YPosition() - pslotBase->GlyphYOffset(psstrm); 1535*889cced1SEike Rathke- float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio); 1536*889cced1SEike Rathke- float ysInc = pslot->GlyphYOffset(psstrm); 1537*889cced1SEike Rathke- pslot->SetXPos(xsCluster + xsInc); 1538*889cced1SEike Rathke- pslot->SetYPos(ysCluster + ysInc); 1539*889cced1SEike Rathke+ float xsInc = pslotAtt->GlyphXOffset(psstrm, fakeItalicRatio); 1540*889cced1SEike Rathke+ float ysInc = pslotAtt->GlyphYOffset(psstrm); 1541*889cced1SEike Rathke+ pslotAtt->SetXPos(xsCluster + xsInc); 1542*889cced1SEike Rathke+ pslotAtt->SetYPos(ysCluster + ysInc); 1543*889cced1SEike Rathke 1544*889cced1SEike Rathke // My theory is that we don't need to adjust *pxsWidth here, because the width of 1545*889cced1SEike Rathke // any non-base slots should be factored into the advance width of their cluster 1546*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.h Wed Jan 28 04:01:29 2009 1547*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.h Sat Aug 22 19:36:35 2009 1548*889cced1SEike Rathke@@ -442,7 +442,7 @@ 1549*889cced1SEike Rathke int LogToEmUnits(float xys); 1550*889cced1SEike Rathke bool GPointToXY(gid16 chwGlyphID, int nGPoint, float * xs, float * ys); 1551*889cced1SEike Rathke 1552*889cced1SEike Rathke- void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, 1553*889cced1SEike Rathke+ void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass, 1554*889cced1SEike Rathke float * pxsWidth, float * pxsVisibleWidth); 1555*889cced1SEike Rathke 1556*889cced1SEike Rathke void InitPosCache() 1557*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/Platform.cpp Thu Jan 22 00:36:42 2009 1558*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Platform.cpp Sat Aug 22 19:36:35 2009 1559*889cced1SEike Rathke@@ -103,7 +103,7 @@ 1560*889cced1SEike Rathke { 1561*889cced1SEike Rathke // assumes NULL terminated strings 1562*889cced1SEike Rathke const utf16 *start = s; 1563*889cced1SEike Rathke- for (; *s; ++s); 1564*889cced1SEike Rathke+ for (; *s; ++s) {}; 1565*889cced1SEike Rathke 1566*889cced1SEike Rathke return s - start; 1567*889cced1SEike Rathke } 1568*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/Segment.cpp Thu Aug 21 16:24:32 2008 1569*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp Sat Aug 22 19:36:35 2009 1570*889cced1SEike Rathke@@ -1178,7 +1178,7 @@ 1571*889cced1SEike Rathke part of the segment. 1572*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1573*889cced1SEike Rathke float Segment::getRangeWidth(int ichMin, int ichLim, 1574*889cced1SEike Rathke- bool fStartLine, bool fEndLine, bool fSkipSpace) 1575*889cced1SEike Rathke+ bool /*fStartLine*/, bool /*fEndLine*/, bool fSkipSpace) 1576*889cced1SEike Rathke { 1577*889cced1SEike Rathke if (m_dxsWidth < 0) 1578*889cced1SEike Rathke { 1579*889cced1SEike Rathke@@ -1549,7 +1549,11 @@ 1580*889cced1SEike Rathke void Segment::SetUpOutputArrays(Font * pfont, GrTableManager * ptman, 1581*889cced1SEike Rathke GrSlotStream * psstrmFinal, 1582*889cced1SEike Rathke int cchwInThisSeg, int csloutSurface, gid16 chwLB, 1583*889cced1SEike Rathke+#ifdef NDEBUG 1584*889cced1SEike Rathke+ TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool /*fEmpty*/) 1585*889cced1SEike Rathke+#else 1586*889cced1SEike Rathke TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool fEmpty) 1587*889cced1SEike Rathke+#endif 1588*889cced1SEike Rathke { 1589*889cced1SEike Rathke m_mFontEmUnits = EngineImpl()->GetFontEmUnits(); 1590*889cced1SEike Rathke 1591*889cced1SEike Rathke@@ -1725,7 +1729,7 @@ 1592*889cced1SEike Rathke Set up the data structures that represent the actual rendered glyphs for the new segment. 1593*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1594*889cced1SEike Rathke void Segment::SetUpGlyphInfo(GrTableManager * ptman, GrSlotStream * psstrmFinal, 1595*889cced1SEike Rathke- gid16 chwLB, int nDirDepth, int islotMin, int cslot) 1596*889cced1SEike Rathke+ gid16 chwLB, int /*nDirDepth*/, int islotMin, int cslot) 1597*889cced1SEike Rathke { 1598*889cced1SEike Rathke //int paraDirLevel = (ptman->State()->ParaRightToLeft()) ? 1 : 0; 1599*889cced1SEike Rathke 1600*889cced1SEike Rathke@@ -1751,7 +1755,7 @@ 1601*889cced1SEike Rathke 1602*889cced1SEike Rathke m_isloutGinf0 = -1; 1603*889cced1SEike Rathke int iginf = 0; 1604*889cced1SEike Rathke- for (int islot = islotMin; islot < cslot; islot++) 1605*889cced1SEike Rathke+ for (islot = islotMin; islot < cslot; islot++) 1606*889cced1SEike Rathke { 1607*889cced1SEike Rathke GrSlotState * pslot = psstrmFinal->SlotAt(islot); 1608*889cced1SEike Rathke 1609*889cced1SEike Rathke@@ -2160,7 +2164,7 @@ 1610*889cced1SEike Rathke @param ichwUnder - character index relative to the official beginning of the segment 1611*889cced1SEike Rathke @param islot - processed glyph it maps to 1612*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1613*889cced1SEike Rathke-void Segment::MarkSlotInPrevSeg(int ichwUnder, int islot) 1614*889cced1SEike Rathke+void Segment::MarkSlotInPrevSeg(int ichwUnder, int /*islot*/) 1615*889cced1SEike Rathke { 1616*889cced1SEike Rathke if (ichwUnder >= m_ichwAssocsMin) 1617*889cced1SEike Rathke m_prgisloutBefore[ichwUnder - m_ichwAssocsMin] = kNegInfinity; 1618*889cced1SEike Rathke@@ -2174,7 +2178,7 @@ 1619*889cced1SEike Rathke @param ichwUnder - character index relative to the official beginning of the segment 1620*889cced1SEike Rathke @param islot - processed glyph it maps to 1621*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1622*889cced1SEike Rathke-void Segment::MarkSlotInNextSeg(int ichwUnder, int islot) 1623*889cced1SEike Rathke+void Segment::MarkSlotInNextSeg(int ichwUnder, int /*islot*/) 1624*889cced1SEike Rathke { 1625*889cced1SEike Rathke if (ichwUnder < m_ichwAssocsLim) 1626*889cced1SEike Rathke m_prgisloutAfter[ichwUnder - m_ichwAssocsMin] = kPosInfinity; 1627*889cced1SEike Rathke@@ -2351,7 +2355,7 @@ 1628*889cced1SEike Rathke @param pfAfter - return true if they clicked on trailing side; possibly NULL 1629*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1630*889cced1SEike Rathke int Segment::LogicalSurfaceToUnderlying(int islout, float xsOffset, float ysClick, 1631*889cced1SEike Rathke- float dxsGlyphWidth, float dysGlyphHeight, bool * pfAfter) 1632*889cced1SEike Rathke+ float dxsGlyphWidth, float /*dysGlyphHeight*/, bool * pfAfter) 1633*889cced1SEike Rathke { 1634*889cced1SEike Rathke Assert(islout >= 0); 1635*889cced1SEike Rathke Assert(islout < m_cslout); 1636*889cced1SEike Rathke@@ -2529,31 +2533,31 @@ 1637*889cced1SEike Rathke else if (fBefore) 1638*889cced1SEike Rathke { 1639*889cced1SEike Rathke int isloutRet; 1640*889cced1SEike Rathke- int ichw = ichwSegOffset; 1641*889cced1SEike Rathke+ int ichwTemp = ichwSegOffset; 1642*889cced1SEike Rathke // If no association has been made, loop forward to the next slot 1643*889cced1SEike Rathke // we are before. As a last resort, answer kPosInfinity, meaning we 1644*889cced1SEike Rathke // aren't before anything. 1645*889cced1SEike Rathke do 1646*889cced1SEike Rathke { 1647*889cced1SEike Rathke- isloutRet = m_prgisloutBefore[ichw - m_ichwAssocsMin]; 1648*889cced1SEike Rathke- do { ++ichw; } 1649*889cced1SEike Rathke- while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw)); 1650*889cced1SEike Rathke- } while (isloutRet == kPosInfinity && ichw < m_ichwAssocsLim); 1651*889cced1SEike Rathke+ isloutRet = m_prgisloutBefore[ichwTemp - m_ichwAssocsMin]; 1652*889cced1SEike Rathke+ do { ++ichwTemp; } 1653*889cced1SEike Rathke+ while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp)); 1654*889cced1SEike Rathke+ } while (isloutRet == kPosInfinity && ichwTemp < m_ichwAssocsLim); 1655*889cced1SEike Rathke return isloutRet; 1656*889cced1SEike Rathke } 1657*889cced1SEike Rathke else 1658*889cced1SEike Rathke { 1659*889cced1SEike Rathke int isloutRet; 1660*889cced1SEike Rathke- int ichw = ichwSegOffset; 1661*889cced1SEike Rathke+ int ichwTemp = ichwSegOffset; 1662*889cced1SEike Rathke // If no association has been made, loop backward to the previous slot 1663*889cced1SEike Rathke // we are after. As a last resort, answer kNegInfinity, meaning we 1664*889cced1SEike Rathke // aren't after anything. 1665*889cced1SEike Rathke do 1666*889cced1SEike Rathke { 1667*889cced1SEike Rathke- isloutRet = m_prgisloutAfter[ichw - m_ichwAssocsMin]; 1668*889cced1SEike Rathke- do { --ichw; } 1669*889cced1SEike Rathke- while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw)); 1670*889cced1SEike Rathke- } while (isloutRet == kNegInfinity && ichw >= 0); 1671*889cced1SEike Rathke+ isloutRet = m_prgisloutAfter[ichwTemp - m_ichwAssocsMin]; 1672*889cced1SEike Rathke+ do { --ichwTemp; } 1673*889cced1SEike Rathke+ while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp)); 1674*889cced1SEike Rathke+ } while (isloutRet == kNegInfinity && ichwTemp >= 0); 1675*889cced1SEike Rathke return isloutRet; 1676*889cced1SEike Rathke } 1677*889cced1SEike Rathke Assert(false); // should never reach here 1678*889cced1SEike Rathke@@ -2748,7 +2752,11 @@ 1679*889cced1SEike Rathke that root glyph as one of its roots. 1680*889cced1SEike Rathke OBSOLETE 1681*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1682*889cced1SEike Rathke+#ifdef _DEBUG 1683*889cced1SEike Rathke void Segment::AssertValidClusters(GrSlotStream * psstrm) 1684*889cced1SEike Rathke+#else 1685*889cced1SEike Rathke+void Segment::AssertValidClusters(GrSlotStream * /*psstrm*/) 1686*889cced1SEike Rathke+#endif 1687*889cced1SEike Rathke { 1688*889cced1SEike Rathke #ifdef _DEBUG 1689*889cced1SEike Rathke for (int islot = 0; islot < psstrm->WritePos(); islot++) 1690*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp Wed Jan 28 04:01:29 2009 1691*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp Sat Aug 22 19:36:35 2009 1692*889cced1SEike Rathke@@ -175,7 +175,7 @@ 1693*889cced1SEike Rathke Output a file showing a log of the transduction process and the resulting segment. 1694*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1695*889cced1SEike Rathke void GrTableManager::WriteXductnLog(std::ostream & strmOut, 1696*889cced1SEike Rathke- GrCharStream * pchstrm, Segment * psegRet, 1697*889cced1SEike Rathke+ GrCharStream * pchstrm, Segment * /*psegRet*/, 1698*889cced1SEike Rathke int cbPrevSegDat, byte * pbPrevSegDat) 1699*889cced1SEike Rathke { 1700*889cced1SEike Rathke if (cbPrevSegDat == 0) 1701*889cced1SEike Rathke@@ -416,8 +416,8 @@ 1702*889cced1SEike Rathke the raw (UTF-16 or UTF-8) chars for display. To do this we get the raw characters 1703*889cced1SEike Rathke directly from the text source. 1704*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1705*889cced1SEike Rathke-void GrCharStream::GetLogDataRaw(GrTableManager * ptman, int cchl, int cchrBackup, 1706*889cced1SEike Rathke- int cchrMaxRaw, int * prgchl, 1707*889cced1SEike Rathke+void GrCharStream::GetLogDataRaw(GrTableManager * /*ptman*/, int cchl, int cchrBackup, 1708*889cced1SEike Rathke+ int /*cchrMaxRaw*/, int * prgchl, 1709*889cced1SEike Rathke utf16 * prgchw2, utf16 * prgchw3, utf16 * prgchw4, utf16 * prgchw5, utf16 * prgchw6, 1710*889cced1SEike Rathke int * prgcchr) 1711*889cced1SEike Rathke { 1712*889cced1SEike Rathke@@ -441,7 +441,7 @@ 1713*889cced1SEike Rathke case kutf8: 1714*889cced1SEike Rathke prgchsRunText8 = new utf8[cchrRange]; 1715*889cced1SEike Rathke m_pgts->fetch(ichrMin, cchrRange, prgchsRunText8); 1716*889cced1SEike Rathke- for (int ichr = 0; ichr < cchrRange; ichr++) 1717*889cced1SEike Rathke+ for (ichr = 0; ichr < cchrRange; ichr++) 1718*889cced1SEike Rathke prgchwRunText[ichr] = (utf16)prgchsRunText8[ichr]; // zero-extend into UTF-16 buffer 1719*889cced1SEike Rathke break; 1720*889cced1SEike Rathke case kutf16: 1721*889cced1SEike Rathke@@ -634,7 +634,7 @@ 1722*889cced1SEike Rathke m_pzpst->LogRulesFiredAndFailed(strmOut, psstrmIn); 1723*889cced1SEike Rathke } 1724*889cced1SEike Rathke 1725*889cced1SEike Rathke-void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * psstrmIn) 1726*889cced1SEike Rathke+void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * /*psstrmIn*/) 1727*889cced1SEike Rathke { 1728*889cced1SEike Rathke 1729*889cced1SEike Rathke strmOut << "PASS " << m_ipass << "\n\n" << "Rules matched: "; 1730*889cced1SEike Rathke@@ -1193,7 +1193,7 @@ 1731*889cced1SEike Rathke if (fAnyPseudos) 1732*889cced1SEike Rathke { 1733*889cced1SEike Rathke strmOut << "Actual glyphs: "; 1734*889cced1SEike Rathke- for (int islout = 0; islout < m_cslout; islout++) 1735*889cced1SEike Rathke+ for (islout = 0; islout < m_cslout; islout++) 1736*889cced1SEike Rathke { 1737*889cced1SEike Rathke GrSlotOutput * psloutTmp = m_prgslout + islout; 1738*889cced1SEike Rathke if (psloutTmp->GlyphID() != psloutTmp->ActualGlyphForOutput(ptman)) 1739*889cced1SEike Rathke@@ -1319,7 +1319,7 @@ 1740*889cced1SEike Rathke Write out the header lines for the slot contents. 1741*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1742*889cced1SEike Rathke void GrTableManager::LogSlotHeader(std::ostream & strmOut, int islotLim, 1743*889cced1SEike Rathke- int cspPerSlot, int cspLeading, int islotMin) 1744*889cced1SEike Rathke+ int /*cspPerSlot*/, int cspLeading, int islotMin) 1745*889cced1SEike Rathke { 1746*889cced1SEike Rathke islotLim = min(islotLim, MAX_SLOTS); 1747*889cced1SEike Rathke 1748*889cced1SEike Rathke@@ -1721,7 +1721,7 @@ 1749*889cced1SEike Rathke 1750*889cced1SEike Rathke case kslatAttAtX: // always do these in pairs 1751*889cced1SEike Rathke case kslatAttAtY: 1752*889cced1SEike Rathke- if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : kNotYetSet) || 1753*889cced1SEike Rathke+ if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : static_cast<short>(kNotYetSet)) || 1754*889cced1SEike Rathke m_mAttachAtY != (pslotPrev ? pslotPrev->m_mAttachAtY : 0)) 1755*889cced1SEike Rathke { 1756*889cced1SEike Rathke ptman->LogInTable(strmOut, 1757*889cced1SEike Rathke@@ -1730,7 +1730,7 @@ 1758*889cced1SEike Rathke } 1759*889cced1SEike Rathke break; 1760*889cced1SEike Rathke case kslatAttAtGpt: 1761*889cced1SEike Rathke- if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : kNotYetSet)) 1762*889cced1SEike Rathke+ if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : static_cast<short>(kNotYetSet))) 1763*889cced1SEike Rathke { 1764*889cced1SEike Rathke ptman->LogInTable(strmOut, 1765*889cced1SEike Rathke ((m_nAttachAtGpoint == kGpointZero) ? 0 : m_nAttachAtGpoint)); 1766*889cced1SEike Rathke@@ -1750,7 +1750,7 @@ 1767*889cced1SEike Rathke 1768*889cced1SEike Rathke case kslatAttWithX: // always do these in pairs 1769*889cced1SEike Rathke case kslatAttWithY: 1770*889cced1SEike Rathke- if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : kNotYetSet) || 1771*889cced1SEike Rathke+ if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : static_cast<short>(kNotYetSet)) || 1772*889cced1SEike Rathke m_mAttachWithY != (pslotPrev ? pslotPrev->m_mAttachWithY : 0)) 1773*889cced1SEike Rathke { 1774*889cced1SEike Rathke ptman->LogInTable(strmOut, 1775*889cced1SEike Rathke@@ -1759,7 +1759,7 @@ 1776*889cced1SEike Rathke } 1777*889cced1SEike Rathke break; 1778*889cced1SEike Rathke case kslatAttWithGpt: 1779*889cced1SEike Rathke- if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : kNotYetSet)) 1780*889cced1SEike Rathke+ if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : static_cast<short>(kNotYetSet))) 1781*889cced1SEike Rathke { 1782*889cced1SEike Rathke ptman->LogInTable(strmOut, 1783*889cced1SEike Rathke ((m_nAttachWithGpoint == kGpointZero) ? 0 : m_nAttachWithGpoint)); 1784*889cced1SEike Rathke@@ -1786,14 +1786,14 @@ 1785*889cced1SEike Rathke break; 1786*889cced1SEike Rathke 1787*889cced1SEike Rathke case kslatBreak: 1788*889cced1SEike Rathke- if (m_lb != (pslotPrev ? pslotPrev->m_lb : kNotYetSet8)) 1789*889cced1SEike Rathke+ if (m_lb != (pslotPrev ? pslotPrev->m_lb : static_cast<sdata8>(kNotYetSet8))) 1790*889cced1SEike Rathke { 1791*889cced1SEike Rathke ptman->LogBreakWeightInTable(strmOut, m_lb); 1792*889cced1SEike Rathke return; 1793*889cced1SEike Rathke } 1794*889cced1SEike Rathke break; 1795*889cced1SEike Rathke case kslatDir: 1796*889cced1SEike Rathke- if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : kNotYetSet8)) 1797*889cced1SEike Rathke+ if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : static_cast<sdata8>(kNotYetSet8))) 1798*889cced1SEike Rathke { 1799*889cced1SEike Rathke ptman->LogDirCodeInTable(strmOut, m_dirc); 1800*889cced1SEike Rathke return; 1801*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp Thu Jan 22 00:36:42 2009 1802*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp Sat Aug 22 19:36:35 2009 1803*889cced1SEike Rathke@@ -210,12 +210,12 @@ 1804*889cced1SEike Rathke } 1805*889cced1SEike Rathke 1806*889cced1SEike Rathke 1807*889cced1SEike Rathke-bool GrUtfTextSrc::getRightToLeft(gr::toffset ich) 1808*889cced1SEike Rathke+bool GrUtfTextSrc::getRightToLeft(gr::toffset /*ich*/) 1809*889cced1SEike Rathke { 1810*889cced1SEike Rathke return mRtl; // assumes src only contains one direction 1811*889cced1SEike Rathke } 1812*889cced1SEike Rathke 1813*889cced1SEike Rathke-unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset ich) 1814*889cced1SEike Rathke+unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset /*ich*/) 1815*889cced1SEike Rathke { 1816*889cced1SEike Rathke return (mRtl) ? 1 : 0; // TBD 1817*889cced1SEike Rathke } 1818*889cced1SEike Rathke@@ -254,7 +254,7 @@ 1819*889cced1SEike Rathke return range; 1820*889cced1SEike Rathke } 1821*889cced1SEike Rathke 1822*889cced1SEike Rathke-size_t GrUtfTextSrc::getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset) 1823*889cced1SEike Rathke+size_t GrUtfTextSrc::getFontFeatures(gr::toffset /*ich*/, gr::FeatureSetting * /*prgfset*/) 1824*889cced1SEike Rathke { 1825*889cced1SEike Rathke return 0; 1826*889cced1SEike Rathke } 1827*889cced1SEike Rathke@@ -277,14 +277,14 @@ 1828*889cced1SEike Rathke 1829*889cced1SEike Rathke // these should be called I hope 1830*889cced1SEike Rathke float 1831*889cced1SEike Rathke-GrUtfTextSrc::getFontSize(gr::toffset ich) 1832*889cced1SEike Rathke+GrUtfTextSrc::getFontSize(gr::toffset /*ich*/) 1833*889cced1SEike Rathke { 1834*889cced1SEike Rathke assert(mFont); 1835*889cced1SEike Rathke return mPointSize; 1836*889cced1SEike Rathke } 1837*889cced1SEike Rathke 1838*889cced1SEike Rathke bool 1839*889cced1SEike Rathke-GrUtfTextSrc::getBold(gr::toffset ich) 1840*889cced1SEike Rathke+GrUtfTextSrc::getBold(gr::toffset /*ich*/) 1841*889cced1SEike Rathke { 1842*889cced1SEike Rathke assert(mFont); 1843*889cced1SEike Rathke // NS_ASSERTION(false, "unexpected call to getBold"); 1844*889cced1SEike Rathke@@ -293,7 +293,7 @@ 1845*889cced1SEike Rathke } 1846*889cced1SEike Rathke 1847*889cced1SEike Rathke bool 1848*889cced1SEike Rathke-GrUtfTextSrc::getItalic(gr::toffset ich) 1849*889cced1SEike Rathke+GrUtfTextSrc::getItalic(gr::toffset /*ich*/) 1850*889cced1SEike Rathke { 1851*889cced1SEike Rathke assert(mFont); 1852*889cced1SEike Rathke //NS_ASSERTION(false, "unexpected call to getItalic"); 1853*889cced1SEike Rathke@@ -301,7 +301,7 @@ 1854*889cced1SEike Rathke return mFont->italic(); 1855*889cced1SEike Rathke } 1856*889cced1SEike Rathke 1857*889cced1SEike Rathke-gr::isocode GrUtfTextSrc::getLanguage(gr::toffset ich) 1858*889cced1SEike Rathke+gr::isocode GrUtfTextSrc::getLanguage(gr::toffset /*ich*/) 1859*889cced1SEike Rathke { 1860*889cced1SEike Rathke gr::isocode unknown; 1861*889cced1SEike Rathke std::fill_n(unknown.rgch, 4, '\0'); 1862*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h Thu Jan 22 00:36:42 2009 1863*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h Sat Aug 22 19:36:35 2009 1864*889cced1SEike Rathke@@ -79,7 +79,7 @@ 1865*889cced1SEike Rathke virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf32 * prgchBuffer); 1866*889cced1SEike Rathke virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer); 1867*889cced1SEike Rathke virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf8 * prgchsBuffer); 1868*889cced1SEike Rathke- virtual gr::GrResult getFaceName(int ich, unsigned int cchMax, 1869*889cced1SEike Rathke+ virtual gr::GrResult getFaceName(int /*ich*/, unsigned int /*cchMax*/, 1870*889cced1SEike Rathke gr::utf16 * prgchFaceName, unsigned int * pcchLen) 1871*889cced1SEike Rathke { 1872*889cced1SEike Rathke prgchFaceName[0] = 0; 1873*889cced1SEike Rathke@@ -92,12 +92,12 @@ 1874*889cced1SEike Rathke virtual bool getItalic(gr::toffset ich); 1875*889cced1SEike Rathke virtual bool getRightToLeft(gr::toffset ich); 1876*889cced1SEike Rathke virtual unsigned int getDirectionDepth(gr::toffset ich); 1877*889cced1SEike Rathke- virtual float getVerticalOffset(gr::toffset ich) { return 0;}; 1878*889cced1SEike Rathke+ virtual float getVerticalOffset(gr::toffset /*ich*/) { return 0;}; 1879*889cced1SEike Rathke virtual gr::isocode getLanguage(gr::toffset ich); 1880*889cced1SEike Rathke 1881*889cced1SEike Rathke virtual std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich); 1882*889cced1SEike Rathke virtual size_t getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset); 1883*889cced1SEike Rathke- virtual bool sameSegment(gr::toffset ich1, gr::toffset ich2) { return true; }; 1884*889cced1SEike Rathke+ virtual bool sameSegment(gr::toffset /*ich1*/, gr::toffset /*ich2*/) { return true; }; 1885*889cced1SEike Rathke 1886*889cced1SEike Rathke protected: 1887*889cced1SEike Rathke bool checkBuffer8(); 1888*889cced1SEike Rathke@@ -129,11 +129,11 @@ 1889*889cced1SEike Rathke virtual void getColors(gr::toffset ich, int * pclrFore, int * pclrBack); 1890*889cced1SEike Rathke 1891*889cced1SEike Rathke // Shouldn't be here! 1892*889cced1SEike Rathke- virtual gr::GrResult Fetch(int ichMin, int ichLim, gr::utf16 * prgchBuf) { return gr::kresNotImpl; }; 1893*889cced1SEike Rathke- virtual gr::GrResult get_Length(int * pcch) { return gr::kresNotImpl; }; 1894*889cced1SEike Rathke- virtual gr::GrResult GetFontVariations(int ich, 1895*889cced1SEike Rathke- wchar_t * prgchFontVar, int ichMax, int * pich, 1896*889cced1SEike Rathke- int * pichMin, int * pichLim) { return gr::kresNotImpl; }; 1897*889cced1SEike Rathke+ virtual gr::GrResult Fetch(int /*ichMin*/, int /*ichLim*/, gr::utf16 * /*prgchBuf*/) { return gr::kresNotImpl; }; 1898*889cced1SEike Rathke+ virtual gr::GrResult get_Length(int * /*pcch*/) { return gr::kresNotImpl; }; 1899*889cced1SEike Rathke+ virtual gr::GrResult GetFontVariations(int /*ich*/, 1900*889cced1SEike Rathke+ wchar_t * /*prgchFontVar*/, int /*ichMax*/, int * /*pich*/, 1901*889cced1SEike Rathke+ int * /*pichMin*/, int * /*pichLim*/) { return gr::kresNotImpl; }; 1902*889cced1SEike Rathke 1903*889cced1SEike Rathke }; 1904*889cced1SEike Rathke 1905*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp Thu Jan 22 00:36:42 2009 1906*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp Sat Aug 22 19:36:35 2009 1907*889cced1SEike Rathke@@ -39,14 +39,14 @@ 1908*889cced1SEike Rathke typedef std::pair< gr::GlyphIterator, gr::GlyphIterator > GlyphRange; 1909*889cced1SEike Rathke 1910*889cced1SEike Rathke #ifndef HAVE_STRTOF 1911*889cced1SEike Rathke-float strtof(char * text, char ** ignore) 1912*889cced1SEike Rathke+float strtof(char * text, char ** /*ignore*/) 1913*889cced1SEike Rathke { 1914*889cced1SEike Rathke return static_cast<float>(atof(text)); 1915*889cced1SEike Rathke } 1916*889cced1SEike Rathke #endif 1917*889cced1SEike Rathke 1918*889cced1SEike Rathke #ifndef HAVE_STRTOL 1919*889cced1SEike Rathke-long strtol(char * text, char ** ignore) 1920*889cced1SEike Rathke+long strtol(char * text, char ** /*ignore*/) 1921*889cced1SEike Rathke { 1922*889cced1SEike Rathke return atol(text); 1923*889cced1SEike Rathke } 1924*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp Thu Jan 22 00:36:42 2009 1925*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp Sat Aug 22 19:36:35 2009 1926*889cced1SEike Rathke@@ -327,7 +327,7 @@ 1927*889cced1SEike Rathke &dxStretchAchieved); 1928*889cced1SEike Rathke for (int iiiGlyph = 0; iiiGlyph < cStretchable; iiiGlyph++) 1929*889cced1SEike Rathke { 1930*889cced1SEike Rathke- int iiGlyph = viiGlyphsRem[iiiGlyph]; 1931*889cced1SEike Rathke+ iiGlyph = viiGlyphsRem[iiiGlyph]; 1932*889cced1SEike Rathke vdxStretchLeft[iiGlyph] = vdxStretchRem[iiiGlyph]; 1933*889cced1SEike Rathke vdxWidth[iiGlyph] = vdxWidthRem[iiiGlyph]; 1934*889cced1SEike Rathke } 1935*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp Thu Jan 22 00:36:42 2009 1936*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp Sat Aug 22 19:36:35 2009 1937*889cced1SEike Rathke@@ -675,7 +675,7 @@ 1938*889cced1SEike Rathke OutputErrorAux(ptcase, strErr, i, true, valueFound, valueExpected); 1939*889cced1SEike Rathke } 1940*889cced1SEike Rathke 1941*889cced1SEike Rathke-void OutputErrorAux(TestCase * ptcase, std::string strErr, int i, 1942*889cced1SEike Rathke+void OutputErrorAux(TestCase * /*ptcase*/, std::string strErr, int i, 1943*889cced1SEike Rathke bool showValues, int valueFound, int valueExpected) 1944*889cced1SEike Rathke { 1945*889cced1SEike Rathke // if (g_debugMode) 1946*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp Thu Jan 22 00:36:42 2009 1947*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp Sat Aug 22 19:36:36 2009 1948*889cced1SEike Rathke@@ -70,7 +70,7 @@ 1949*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 1950*889cced1SEike Rathke Return true if the text uses a right-to-left writing system. 1951*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1952*889cced1SEike Rathke-bool SimpleTextSrc::getRightToLeft(toffset ich) 1953*889cced1SEike Rathke+bool SimpleTextSrc::getRightToLeft(toffset /*ich*/) 1954*889cced1SEike Rathke { 1955*889cced1SEike Rathke return false; 1956*889cced1SEike Rathke } 1957*889cced1SEike Rathke@@ -78,7 +78,7 @@ 1958*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 1959*889cced1SEike Rathke Return the depth of embedding of the writing system. 1960*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1961*889cced1SEike Rathke-unsigned int SimpleTextSrc::getDirectionDepth(toffset ich) 1962*889cced1SEike Rathke+unsigned int SimpleTextSrc::getDirectionDepth(toffset /*ich*/) 1963*889cced1SEike Rathke { 1964*889cced1SEike Rathke return 0; 1965*889cced1SEike Rathke } 1966*889cced1SEike Rathke@@ -87,7 +87,7 @@ 1967*889cced1SEike Rathke Return the vertical offset of the text. This simple implementation provides no 1968*889cced1SEike Rathke vertical offset. 1969*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 1970*889cced1SEike Rathke-float SimpleTextSrc::getVerticalOffset(toffset ich) 1971*889cced1SEike Rathke+float SimpleTextSrc::getVerticalOffset(toffset /*ich*/) 1972*889cced1SEike Rathke { 1973*889cced1SEike Rathke return 0; 1974*889cced1SEike Rathke } 1975*889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h Thu Jan 22 00:36:42 2009 1976*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h Sat Aug 22 19:36:36 2009 1977*889cced1SEike Rathke@@ -59,12 +59,12 @@ 1978*889cced1SEike Rathke { 1979*889cced1SEike Rathke return m_cchLength; 1980*889cced1SEike Rathke } 1981*889cced1SEike Rathke- virtual size_t fetch(toffset ichMin, size_t cch, utf32 * prgchBuffer) 1982*889cced1SEike Rathke+ virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf32 * /*prgchBuffer*/) 1983*889cced1SEike Rathke { 1984*889cced1SEike Rathke throw; 1985*889cced1SEike Rathke } 1986*889cced1SEike Rathke virtual size_t fetch(toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer); 1987*889cced1SEike Rathke- virtual size_t fetch(toffset ichMin, size_t cch, utf8 * prgchsBuffer) 1988*889cced1SEike Rathke+ virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf8 * /*prgchsBuffer*/) 1989*889cced1SEike Rathke { 1990*889cced1SEike Rathke throw; 1991*889cced1SEike Rathke }; 1992*889cced1SEike Rathke@@ -73,14 +73,14 @@ 1993*889cced1SEike Rathke virtual unsigned int getDirectionDepth(toffset ich); 1994*889cced1SEike Rathke virtual float getVerticalOffset(toffset ich); 1995*889cced1SEike Rathke 1996*889cced1SEike Rathke- virtual isocode getLanguage(toffset ich) 1997*889cced1SEike Rathke+ virtual isocode getLanguage(toffset /*ich*/) 1998*889cced1SEike Rathke { 1999*889cced1SEike Rathke isocode ret; 2000*889cced1SEike Rathke ret.rgch[0] = 'e'; ret.rgch[1] = 'n'; ret.rgch[2] = 0; ret.rgch[3] = 0; 2001*889cced1SEike Rathke return ret; 2002*889cced1SEike Rathke } 2003*889cced1SEike Rathke 2004*889cced1SEike Rathke- virtual std::pair<toffset, toffset> propertyRange(toffset ich) 2005*889cced1SEike Rathke+ virtual std::pair<toffset, toffset> propertyRange(toffset /*ich*/) 2006*889cced1SEike Rathke { 2007*889cced1SEike Rathke std::pair<toffset, toffset> pairRet; 2008*889cced1SEike Rathke pairRet.first = 0; 2009*889cced1SEike Rathke@@ -88,16 +88,16 @@ 2010*889cced1SEike Rathke return pairRet; 2011*889cced1SEike Rathke } 2012*889cced1SEike Rathke 2013*889cced1SEike Rathke- virtual size_t getFontFeatures(toffset ich, FeatureSetting * prgfset) 2014*889cced1SEike Rathke+ virtual size_t getFontFeatures(toffset /*ich*/, FeatureSetting * /*prgfset*/) 2015*889cced1SEike Rathke { 2016*889cced1SEike Rathke return 0; // no features in this simple implementation 2017*889cced1SEike Rathke } 2018*889cced1SEike Rathke- virtual bool sameSegment(toffset ich1, toffset ich2) 2019*889cced1SEike Rathke+ virtual bool sameSegment(toffset /*ich1*/, toffset /*ich2*/) 2020*889cced1SEike Rathke { 2021*889cced1SEike Rathke return true; 2022*889cced1SEike Rathke } 2023*889cced1SEike Rathke 2024*889cced1SEike Rathke- virtual void getColors(toffset ich, int * pclrFore, int * pclrBack) 2025*889cced1SEike Rathke+ virtual void getColors(toffset /*ich*/, int * pclrFore, int * pclrBack) 2026*889cced1SEike Rathke { 2027*889cced1SEike Rathke *pclrFore = kclrBlack; 2028*889cced1SEike Rathke *pclrBack = kclrTransparent; 2029*889cced1SEike Rathke--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp Thu Jan 29 10:33:19 2009 2030*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp Sat Aug 22 19:36:36 2009 2031*889cced1SEike Rathke@@ -70,6 +72,7 @@ 2032*889cced1SEike Rathke // But don't store m_hfont, because we don't really "own" it; the client is 2033*889cced1SEike Rathke // responsible for releasing it. 2034*889cced1SEike Rathke m_hfont = 0; 2035*889cced1SEike Rathke+ m_pGlyphMetricMap = NULL; 2036*889cced1SEike Rathke memset(&m_fpropSet, 0, sizeof(m_fpropSet)); 2037*889cced1SEike Rathke 2038*889cced1SEike Rathke m_pbCmapTbl = NULL; 2039*889cced1SEike Rathke@@ -196,6 +198,7 @@ 2040*889cced1SEike Rathke m_hdc = 0; 2041*889cced1SEike Rathke m_hfont = 0; 2042*889cced1SEike Rathke m_hfontClient = 0; 2043*889cced1SEike Rathke+ m_pGlyphMetricMap = NULL; 2044*889cced1SEike Rathke memset(&m_fpropSet, 0, sizeof(FontProps)); 2045*889cced1SEike Rathke 2046*889cced1SEike Rathke m_pbCmapTbl = NULL; 2047*889cced1SEike Rathke@@ -408,7 +410,7 @@ 2048*889cced1SEike Rathke if (pPolyCurve->wType == TT_PRIM_QSPLINE && 2049*889cced1SEike Rathke // test if this is the last curve 2050*889cced1SEike Rathke pPolyHdr->cb - (int)((byte *)(&pPolyCurve->apfx[j]) - (byte *)(pPolyHdr)) 2051*889cced1SEike Rathke- == sizeof POINTFX && 2052*889cced1SEike Rathke+ == sizeof (POINTFX) && 2053*889cced1SEike Rathke // and the two points are identical 2054*889cced1SEike Rathke CompareFixed(pPolyCurve->apfx[j].x, pPolyHdr->pfxStart.x) && 2055*889cced1SEike Rathke CompareFixed(pPolyCurve->apfx[j].y, pPolyHdr->pfxStart.y)) 2056*889cced1SEike Rathke@@ -457,6 +459,16 @@ 2057*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 2058*889cced1SEike Rathke void WinFont::getGlyphMetrics(gid16 chw, gr::Rect & boundingBox, gr::Point & advances) 2059*889cced1SEike Rathke { 2060*889cced1SEike Rathke+ if (m_pGlyphMetricMap) 2061*889cced1SEike Rathke+ { 2062*889cced1SEike Rathke+ GlyphMetricMap::iterator i = m_pGlyphMetricMap->find(chw); 2063*889cced1SEike Rathke+ if (i != m_pGlyphMetricMap->end()) 2064*889cced1SEike Rathke+ { 2065*889cced1SEike Rathke+ boundingBox = i->second.first; 2066*889cced1SEike Rathke+ advances = i->second.second; 2067*889cced1SEike Rathke+ return; 2068*889cced1SEike Rathke+ } 2069*889cced1SEike Rathke+ } 2070*889cced1SEike Rathke GLYPHMETRICS gm; 2071*889cced1SEike Rathke const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; 2072*889cced1SEike Rathke if (GDI_ERROR == ::GetGlyphOutline(m_hdc, chw, GGO_GLYPH_INDEX | GGO_METRICS, 2073*889cced1SEike Rathke@@ -474,6 +476,10 @@ 2074*889cced1SEike Rathke boundingBox.bottom = (float)gm.gmptGlyphOrigin.y - gm.gmBlackBoxY; 2075*889cced1SEike Rathke advances.x = gm.gmCellIncX; 2076*889cced1SEike Rathke advances.y = gm.gmCellIncY; 2077*889cced1SEike Rathke+ if (m_pGlyphMetricMap) 2078*889cced1SEike Rathke+ { 2079*889cced1SEike Rathke+ (*m_pGlyphMetricMap)[chw] = std::pair<gr::Rect,gr::Point>(boundingBox, advances); 2080*889cced1SEike Rathke+ } 2081*889cced1SEike Rathke } 2082*889cced1SEike Rathke 2083*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 2084*889cced1SEike Rathke@@ -618,7 +620,10 @@ 2085*889cced1SEike Rathke 2086*889cced1SEike Rathke static int cCreateFontCalls = 0; 2087*889cced1SEike Rathke static int cCreateFontZero = 0; 2088*889cced1SEike Rathke- HFONT hfont = g_fhc.GetFont(lf); 2089*889cced1SEike Rathke+ FontHandleCache::FontCacheValue cache = g_fhc.GetCache(lf); 2090*889cced1SEike Rathke+ HFONT hfont = cache.hfont; 2091*889cced1SEike Rathke+ m_pGlyphMetricMap = cache.pGlyphMetricMap; 2092*889cced1SEike Rathke+ //HFONT hfont = g_fhc.GetFont(lf); 2093*889cced1SEike Rathke //char ch1[200]; 2094*889cced1SEike Rathke //if (hfont == 0) 2095*889cced1SEike Rathke //{ 2096*889cced1SEike Rathke@@ -731,7 +733,7 @@ 2097*889cced1SEike Rathke @param lf LOGFONT value that describes the desired font 2098*889cced1SEike Rathke @return Font handle 2099*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 2100*889cced1SEike Rathke-HFONT WinFont::FontHandleCache::GetFont(LOGFONT & lf) 2101*889cced1SEike Rathke+WinFont::FontHandleCache::FontCacheValue WinFont::FontHandleCache::GetCache(LOGFONT & lf) 2102*889cced1SEike Rathke { 2103*889cced1SEike Rathke FontCacheValue fcv; 2104*889cced1SEike Rathke FontHandleHashMap::iterator itFound = m_hmlffcv.find(lf); 2105*889cced1SEike Rathke@@ -752,11 +754,12 @@ 2106*889cced1SEike Rathke THROW(kresFail); 2107*889cced1SEike Rathke 2108*889cced1SEike Rathke fcv.nRefs = 1; 2109*889cced1SEike Rathke+ fcv.pGlyphMetricMap = new GlyphMetricMap(); 2110*889cced1SEike Rathke 2111*889cced1SEike Rathke m_hmlffcv.insert(std::pair<LOGFONT, FontCacheValue>(lf, fcv)); 2112*889cced1SEike Rathke } 2113*889cced1SEike Rathke 2114*889cced1SEike Rathke- return fcv.hfont; 2115*889cced1SEike Rathke+ return fcv; 2116*889cced1SEike Rathke } 2117*889cced1SEike Rathke 2118*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 2119*889cced1SEike Rathke@@ -767,7 +767,7 @@ 2120*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 2121*889cced1SEike Rathke void WinFont::FontHandleCache::DeleteFont(HFONT hfont) 2122*889cced1SEike Rathke { 2123*889cced1SEike Rathke- if (!hfont || !m_bValid) 2124*889cced1SEike Rathke+ if (!hfont || !m_bValid || m_hmlffcv.size() == 0) 2125*889cced1SEike Rathke return; 2126*889cced1SEike Rathke 2127*889cced1SEike Rathke // find the font in the hash map 2128*889cced1SEike Rathke@@ -782,6 +784,8 @@ 2129*889cced1SEike Rathke { 2130*889cced1SEike Rathke // delete font 2131*889cced1SEike Rathke ::DeleteObject(hfont); 2132*889cced1SEike Rathke+ if (fcv.pGlyphMetricMap) 2133*889cced1SEike Rathke+ delete fcv.pGlyphMetricMap; 2134*889cced1SEike Rathke m_hmlffcv.erase(it); 2135*889cced1SEike Rathke } 2136*889cced1SEike Rathke else 2137*889cced1SEike Rathke@@ -832,7 +832,8 @@ 2138*889cced1SEike Rathke bool WinFont::LogFontHashFuncs::operator() (const WinFont::LogFontWrapper & key1, 2139*889cced1SEike Rathke const WinFont::LogFontWrapper & key2) const 2140*889cced1SEike Rathke { 2141*889cced1SEike Rathke- return (key1 == key2); 2142*889cced1SEike Rathke+ // return true if key1 should be ordered before key2 2143*889cced1SEike Rathke+ return (operator()(key1) < operator()(key2)); 2144*889cced1SEike Rathke } 2145*889cced1SEike Rathke 2146*889cced1SEike Rathke /*-------------------------------------------------------------------------------------- 2147*889cced1SEike Rathke--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.h Thu Jan 29 10:33:19 2009 2148*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.h Sat Aug 22 19:36:36 2009 2149*889cced1SEike Rathke@@ -27,7 +27,13 @@ 2150*889cced1SEike Rathke #include "GrClient.h" 2151*889cced1SEike Rathke #include "Font.h" 2152*889cced1SEike Rathke+#include <map> 2153*889cced1SEike Rathke 2154*889cced1SEike Rathke+#ifdef _STLPORT_VERSION 2155*889cced1SEike Rathke+namespace stdext = _STLP_STD; 2156*889cced1SEike Rathke+#endif 2157*889cced1SEike Rathke+ 2158*889cced1SEike Rathke namespace gr 2159*889cced1SEike Rathke { 2160*889cced1SEike Rathke+typedef std::map<gid16, std::pair<gr::Rect, gr::Point> > GlyphMetricMap; 2161*889cced1SEike Rathke 2162*889cced1SEike Rathke class FontFace; 2163*889cced1SEike Rathke@@ -100,6 +110,7 @@ 2164*889cced1SEike Rathke HFONT m_hfontClient; // need to replace this HFONT into the DC when we are finished 2165*889cced1SEike Rathke // with it 2166*889cced1SEike Rathke 2167*889cced1SEike Rathke+ GlyphMetricMap * m_pGlyphMetricMap; 2168*889cced1SEike Rathke // Debugging: 2169*889cced1SEike Rathke //OLECHAR m_rgchTemp[32]; 2170*889cced1SEike Rathke 2171*889cced1SEike Rathke@@ -185,11 +196,13 @@ 2172*889cced1SEike Rathke class FontHandleCache // hungarian: fhc 2173*889cced1SEike Rathke { 2174*889cced1SEike Rathke public: 2175*889cced1SEike Rathke- struct FontCacheValue 2176*889cced1SEike Rathke+ struct FontCacheValue 2177*889cced1SEike Rathke { 2178*889cced1SEike Rathke int nRefs; // reference count 2179*889cced1SEike Rathke HFONT hfont; // font handle 2180*889cced1SEike Rathke 2181*889cced1SEike Rathke+ GlyphMetricMap * pGlyphMetricMap; // glyph metrics 2182*889cced1SEike Rathke+ 2183*889cced1SEike Rathke bool operator==(const FontCacheValue & val) const 2184*889cced1SEike Rathke { 2185*889cced1SEike Rathke return (hfont == val.hfont); 2186*889cced1SEike Rathke@@ -199,7 +212,8 @@ 2187*889cced1SEike Rathke FontHandleCache() : m_bValid(true) {}; 2188*889cced1SEike Rathke ~FontHandleCache(); 2189*889cced1SEike Rathke 2190*889cced1SEike Rathke- HFONT GetFont(LOGFONT & lf); 2191*889cced1SEike Rathke+ //HFONT GetFont(LOGFONT & lf); 2192*889cced1SEike Rathke+ FontCacheValue GetCache(LOGFONT & lf); 2193*889cced1SEike Rathke void DeleteFont(HFONT hfont); 2194*889cced1SEike Rathke 2195*889cced1SEike Rathke typedef stdext::hash_map<LogFontWrapper, FontCacheValue, LogFontHashFuncs> FontHandleHashMap; 2196*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RtTextSrc.h~ 2009-01-22 05:06:42.000000000 +0630 2197*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RtTextSrc.h 2010-04-30 23:14:49.000000000 +0630 2198*889cced1SEike Rathke@@ -44,18 +44,18 @@ 2199*889cced1SEike Rathke } 2200*889cced1SEike Rathke } 2201*889cced1SEike Rathke 2202*889cced1SEike Rathke- virtual size_t getFontFeatures(toffset ich, FeatureSetting * prgfset) 2203*889cced1SEike Rathke+ virtual size_t getFontFeatures(toffset /*ich*/, FeatureSetting * prgfset) 2204*889cced1SEike Rathke { 2205*889cced1SEike Rathke // Note: size of prgfset buffer = gr::kMaxFeatures = 64 2206*889cced1SEike Rathke std::copy(m_fset, m_fset + MAXFEAT, prgfset); 2207*889cced1SEike Rathke return m_cFeats; 2208*889cced1SEike Rathke } 2209*889cced1SEike Rathke 2210*889cced1SEike Rathke- virtual bool getRightToLeft(toffset ich) 2211*889cced1SEike Rathke+ virtual bool getRightToLeft(toffset /*ich*/) 2212*889cced1SEike Rathke { 2213*889cced1SEike Rathke return m_fRtl; 2214*889cced1SEike Rathke } 2215*889cced1SEike Rathke- virtual unsigned int getDirectionDepth(toffset ich) 2216*889cced1SEike Rathke+ virtual unsigned int getDirectionDepth(toffset /*ich*/) 2217*889cced1SEike Rathke { 2218*889cced1SEike Rathke return ((m_fRtl == 1) ? 1 : 0); 2219*889cced1SEike Rathke } 2220*889cced1SEike Rathke 2221*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp 2010-06-21 12:55:34.000000000 +0630 2222*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp 2010-06-21 13:16:59.000000000 +0630 2223*889cced1SEike Rathke@@ -16,8 +16,9 @@ 2224*889cced1SEike Rathke //:> Include files 2225*889cced1SEike Rathke //:>******************************************************************************************** 2226*889cced1SEike Rathke //#include "main.h" // This is used by clients, so main.h is not available 2227*889cced1SEike Rathke- 2228*889cced1SEike Rathke+#ifdef _MSC_VER 2229*889cced1SEike Rathke #pragma hdrstop 2230*889cced1SEike Rathke+#endif 2231*889cced1SEike Rathke // any other headers (not precompiled) 2232*889cced1SEike Rathke #include "GrClient.h" 2233*889cced1SEike Rathke #include "ITextSource.h" 2234*889cced1SEike Rathke@@ -31,9 +32,6 @@ 2235*889cced1SEike Rathke #include <string> 2236*889cced1SEike Rathke #endif 2237*889cced1SEike Rathke 2238*889cced1SEike Rathke-#undef THIS_FILE 2239*889cced1SEike Rathke-DEFINE_THIS_FILE 2240*889cced1SEike Rathke- 2241*889cced1SEike Rathke //:>******************************************************************************************** 2242*889cced1SEike Rathke //:> Global constants 2243*889cced1SEike Rathke //:>******************************************************************************************** 2244*889cced1SEike Rathke@@ -327,9 +325,9 @@ 2245*889cced1SEike Rathke &dxStretchAchieved); 2246*889cced1SEike Rathke for (int iiiGlyph = 0; iiiGlyph < cStretchable; iiiGlyph++) 2247*889cced1SEike Rathke { 2248*889cced1SEike Rathke- iiGlyph = viiGlyphsRem[iiiGlyph]; 2249*889cced1SEike Rathke- vdxStretchLeft[iiGlyph] = vdxStretchRem[iiiGlyph]; 2250*889cced1SEike Rathke- vdxWidth[iiGlyph] = vdxWidthRem[iiiGlyph]; 2251*889cced1SEike Rathke+ int ivGlyph = viiGlyphsRem[iiiGlyph]; 2252*889cced1SEike Rathke+ vdxStretchLeft[ivGlyph] = vdxStretchRem[iiiGlyph]; 2253*889cced1SEike Rathke+ vdxWidth[ivGlyph] = vdxWidthRem[iiiGlyph]; 2254*889cced1SEike Rathke } 2255*889cced1SEike Rathke } 2256*889cced1SEike Rathke else 2257*889cced1SEike Rathke@@ -366,12 +364,12 @@ 2258*889cced1SEike Rathke { 2259*889cced1SEike Rathke #ifdef WIN32 2260*889cced1SEike Rathke wchar_t rgchw[20]; 2261*889cced1SEike Rathke- std::fill_n(rgchw, 20, 0); 2262*889cced1SEike Rathke+ std::fill_n(rgchw, 20, L'\0'); 2263*889cced1SEike Rathke _itow(dxStretchNeeded - dxStretchAchieved, rgchw, 10); 2264*889cced1SEike Rathke std::wstring strTmp(L"justification failed by "); 2265*889cced1SEike Rathke strTmp += rgchw; 2266*889cced1SEike Rathke strTmp += L" units (width needed = "; 2267*889cced1SEike Rathke- std::fill_n(rgchw, 10, 0); 2268*889cced1SEike Rathke+ std::fill_n(rgchw, 10, L'\0'); 2269*889cced1SEike Rathke _itow(dxDesiredWidth, rgchw, 10); 2270*889cced1SEike Rathke strTmp += rgchw; 2271*889cced1SEike Rathke strTmp += L")\n"; 2272*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.h 2009-01-22 05:06:42.000000000 +0630 2273*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.h 2010-06-21 13:16:49.000000000 +0630 2274*889cced1SEike Rathke@@ -11,7 +11,9 @@ 2275*889cced1SEike Rathke Description: 2276*889cced1SEike Rathke A default justification agent for Graphite. 2277*889cced1SEike Rathke -------------------------------------------------------------------------------*//*:End Ignore*/ 2278*889cced1SEike Rathke+#ifdef _MSC_VER 2279*889cced1SEike Rathke #pragma once 2280*889cced1SEike Rathke+#endif 2281*889cced1SEike Rathke #ifndef GRJUSTIFIER_INCLUDED 2282*889cced1SEike Rathke #define GRJUSTIFIER_INCLUDED 2283*889cced1SEike Rathke 2284*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h 2010-06-21 12:55:34.000000000 +0630 2285*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h 2010-06-21 13:18:12.000000000 +0630 2286*889cced1SEike Rathke@@ -11,7 +11,9 @@ 2287*889cced1SEike Rathke Description: 2288*889cced1SEike Rathke A simple text source that shows how to use this interface within Graphite. 2289*889cced1SEike Rathke -------------------------------------------------------------------------------*//*:End Ignore*/ 2290*889cced1SEike Rathke+#ifdef _MSC_VER 2291*889cced1SEike Rathke #pragma once 2292*889cced1SEike Rathke+#endif 2293*889cced1SEike Rathke #ifndef GRTXTSRC_INCLUDED 2294*889cced1SEike Rathke #define GRTXTSRC_INCLUDED 2295*889cced1SEike Rathke 2296*889cced1SEike Rathke 2297*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp 2010-06-21 12:55:34.000000000 +0630 2298*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp 2010-06-21 13:18:24.000000000 +0630 2299*889cced1SEike Rathke@@ -15,7 +15,9 @@ 2300*889cced1SEike Rathke //:>******************************************************************************************** 2301*889cced1SEike Rathke //:> Include files 2302*889cced1SEike Rathke //:>******************************************************************************************** 2303*889cced1SEike Rathke+#ifdef _MSC_VER 2304*889cced1SEike Rathke #pragma hdrstop 2305*889cced1SEike Rathke+#endif 2306*889cced1SEike Rathke // any other headers (not precompiled) 2307*889cced1SEike Rathke 2308*889cced1SEike Rathke #include "GrClient.h" 2309*889cced1SEike Rathke@@ -23,9 +25,6 @@ 2310*889cced1SEike Rathke #include "ITextSource.h" 2311*889cced1SEike Rathke #include "SimpleTextSrc.h" 2312*889cced1SEike Rathke 2313*889cced1SEike Rathke-#undef THIS_FILE 2314*889cced1SEike Rathke-DEFINE_THIS_FILE 2315*889cced1SEike Rathke- 2316*889cced1SEike Rathke //:>******************************************************************************************** 2317*889cced1SEike Rathke //:> Initialization and destruction 2318*889cced1SEike Rathke //:>******************************************************************************************** 2319*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/MemoryUsage.cpp 2009-01-22 05:06:42.000000000 +0630 2320*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/MemoryUsage.cpp 2010-06-21 13:36:36.000000000 +0630 2321*889cced1SEike Rathke@@ -11,10 +11,10 @@ 2322*889cced1SEike Rathke Description: 2323*889cced1SEike Rathke Calculates memory usage for the engine and segments. 2324*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 2325*889cced1SEike Rathke- 2326*889cced1SEike Rathke+#ifdef _MSC_VER 2327*889cced1SEike Rathke #pragma warning(disable: 4244) // conversion from wchar_t to char 2328*889cced1SEike Rathke #pragma warning(disable: 4702) // unreachable code 2329*889cced1SEike Rathke- 2330*889cced1SEike Rathke+#endif 2331*889cced1SEike Rathke //:>******************************************************************************************** 2332*889cced1SEike Rathke //:> Include files 2333*889cced1SEike Rathke //:>******************************************************************************************** 2334*889cced1SEike Rathke@@ -54,8 +54,6 @@ 2335*889cced1SEike Rathke #ifdef _MSC_VER 2336*889cced1SEike Rathke #pragma hdrstop 2337*889cced1SEike Rathke #endif 2338*889cced1SEike Rathke-#undef THIS_FILE 2339*889cced1SEike Rathke-DEFINE_THIS_FILE 2340*889cced1SEike Rathke 2341*889cced1SEike Rathke //:End Ignore 2342*889cced1SEike Rathke 2343*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h 2010-06-23 19:52:56.429060400 +0700 2344*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h 2010-05-25 11:51:15.195066300 +0700 2345*889cced1SEike Rathke@@ -48,7 +48,7 @@ 2346*889cced1SEike Rathke { 2347*889cced1SEike Rathke } 2348*889cced1SEike Rathke 2349*889cced1SEike Rathke- ~GrSlotAbstract() 2350*889cced1SEike Rathke+ virtual ~GrSlotAbstract() 2351*889cced1SEike Rathke { 2352*889cced1SEike Rathke // the table manager is responsible for destroying the contents of m_prgnVarLenBuf 2353*889cced1SEike Rathke } 2354*889cced1SEike Rathke@@ -231,7 +231,7 @@ 2355*889cced1SEike Rathke ZapCompositeMetrics(); 2356*889cced1SEike Rathke } 2357*889cced1SEike Rathke 2358*889cced1SEike Rathke- ~GrSlotState() 2359*889cced1SEike Rathke+ virtual ~GrSlotState() 2360*889cced1SEike Rathke { 2361*889cced1SEike Rathke } 2362*889cced1SEike Rathke 2363*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp.bak 2010-06-23 19:59:54.611660400 +0700 2364*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp 2010-06-23 21:30:16.335460400 +0700 2365*889cced1SEike Rathke@@ -246,6 +246,8 @@ 2366*889cced1SEike Rathke 2367*889cced1SEike Rathke m_dxsVisibleWidth = -1; 2368*889cced1SEike Rathke m_dxsTotalWidth = -1; 2369*889cced1SEike Rathke+ m_ichwAssocsMin = 0; 2370*889cced1SEike Rathke+ m_ichwAssocsLim = 0; 2371*889cced1SEike Rathke 2372*889cced1SEike Rathke // m_psstrm = NULL; 2373*889cced1SEike Rathke m_prgslout = NULL; 2374*889cced1SEike Rathke@@ -2988,9 +2988,10 @@ 2375*889cced1SEike Rathke return kresOk; 2376*889cced1SEike Rathke } 2377*889cced1SEike Rathke 2378*889cced1SEike Rathke- 2379*889cced1SEike Rathke+#ifdef __GNUC__ 2380*889cced1SEike Rathke // suppress GCC 4.3 warning for optimized min()/max() when called with (ich, ich+1) or similar 2381*889cced1SEike Rathke #pragma GCC diagnostic ignored "-Wstrict-overflow" 2382*889cced1SEike Rathke+#endif 2383*889cced1SEike Rathke 2384*889cced1SEike Rathke /*---------------------------------------------------------------------------------------------- 2385*889cced1SEike Rathke Merge the given characters into the same Uniscribe cluster. This means merging any 2386*889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/wrappers/win32/win32_dll.cpp.bak 2008-05-09 18:10:30.000000000 +0700 2387*889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/win32_dll.cpp 2010-05-10 15:46:54.291818000 +0700 2388*889cced1SEike Rathke@@ -14,7 +14,7 @@ 2389*889cced1SEike Rathke DllMain. This is the main DLL entry point for a non-MFC DLL. For an MFC DLL, DllMain is 2390*889cced1SEike Rathke in DllModul.cpp. Both DllMains call ModuleEntry::DllMain. 2391*889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/ 2392*889cced1SEike Rathke-extern "C" BOOL WINAPI DllMain(HMODULE hmod, DWORD dwReason, PVOID pvReserved) 2393*889cced1SEike Rathke+extern "C" BOOL WINAPI DllMain(HMODULE hmod, DWORD dwReason, PVOID /*pvReserved*/) 2394*889cced1SEike Rathke { 2395*889cced1SEike Rathke bool fRet = true; 2396*889cced1SEike Rathke 2397