You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(20) |
Feb
(14) |
Mar
(17) |
Apr
(60) |
May
(15) |
Jun
(51) |
Jul
(88) |
Aug
(21) |
Sep
(24) |
Oct
(1) |
Nov
(33) |
Dec
(16) |
2004 |
Jan
(27) |
Feb
(5) |
Mar
(6) |
Apr
(50) |
May
(6) |
Jun
(12) |
Jul
(14) |
Aug
(12) |
Sep
(21) |
Oct
(46) |
Nov
(1) |
Dec
(4) |
2005 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(8) |
Jun
(23) |
Jul
|
Aug
(23) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
From: <sil...@li...> - 2004-10-07 07:58:27
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8655 Modified Files: Makefile.am Log Message: install GrStructs.h Index: Makefile.am =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 16 Sep 2004 12:17:57 -0000 1.8 +++ Makefile.am 7 Oct 2004 07:57:11 -0000 1.9 @@ -11,6 +11,7 @@ pkginclude_HEADERS += $(top_srcdir)/include/GrResult.h pkginclude_HEADERS += $(top_srcdir)/include/GrSegment.h pkginclude_HEADERS += $(top_srcdir)/include/GrSegmentPlatform.h +pkginclude_HEADERS += $(top_srcdir)/include/GrStructs.h #pkginclude_HEADERS += $(top_srcdir)/include/IGrGraphicsDrawing.h #pkginclude_HEADERS += $(top_srcdir)/include/IGrGraphicsFont.h pkginclude_HEADERS += $(top_srcdir)/include/IGrGraphics.h |
From: <sil...@li...> - 2004-10-06 18:29:13
|
Update of /cvsroot/silgraphite/silgraphite/contrib/applib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/applib Modified Files: GrGraphics.cpp GrGraphics.h GrTextSrc.cpp GrTextSrc.h Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: GrGraphics.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/applib/GrGraphics.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GrGraphics.cpp 2 Sep 2004 20:29:02 -0000 1.2 +++ GrGraphics.cpp 6 Oct 2004 18:28:29 -0000 1.3 @@ -53,7 +53,7 @@ { m_hdc = 0; m_hfont = 0; - memset (&m_chrp, '\0', sizeof(LgCharRenderProps)); + memset (&m_chrp, '\0', sizeof(GrCharProps)); // Vertical and horizontal resolution. Zero indicates not yet initialized. m_yInch = 0; @@ -124,9 +124,9 @@ super/subscript are ignored, as is baseline adjust; client is presumed to have handled them. Sets colors and HFONT. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::SetupGraphics(LgCharRenderProps * pchrp) +GrResult GrGraphics::SetupGraphics(GrCharProps * pchrp) { - memcpy(&m_chrp, pchrp, sizeof(LgCharRenderProps)); + memcpy(&m_chrp, pchrp, sizeof(GrCharProps)); // set the font LOGFONT lf; @@ -200,17 +200,17 @@ Draw a list of glyphs that are all positioned vertically the same relative to the baseline, given their offsets from each other. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::DrawTextExt(int x, int y, int cch, const OLECHAR * prgchw, +GrResult GrGraphics::DrawTextExt(int x, int y, int cgid, const OLECHAR * prggid, UINT uOptions, const RECT * pRect, int * prgdx) { if (prgdx == NULL) { - if (cch > 1) + if (cgid > 1) return kresInvalidArg; } // must explicitly call W API so get wide version on Win 9x - if (!ExtTextOutW(m_hdc, x, y, uOptions, pRect, prgchw, cch, prgdx)) + if (!ExtTextOutW(m_hdc, x, y, uOptions, pRect, prggid, cgid, prgdx)) return kresUnexpected; return kresOk; @@ -230,15 +230,15 @@ } /*---------------------------------------------------------------------------------------------- - Get glyph metrics for a glyph in the currently selected font. chw must be a glyph id. + Get glyph metrics for a glyph in the currently selected font. gid id a glyph id. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::GetGlyphMetrics(int chw, +GrResult GrGraphics::GetGlyphMetrics(int gid, int * pxBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY) { GLYPHMETRICS gm; const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; - if (GDI_ERROR == ::GetGlyphOutline(m_hdc, chw, GGO_GLYPH_INDEX | GGO_METRICS, + if (GDI_ERROR == ::GetGlyphOutline(m_hdc, gid, GGO_GLYPH_INDEX | GGO_METRICS, &gm, 0, NULL, &mat2)) { return kresUnexpected; @@ -278,19 +278,19 @@ /*---------------------------------------------------------------------------------------------- Get coordinates for a point in a glyph. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet) +GrResult GrGraphics::XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet) { GLYPHMETRICS gm; const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; WORD flag = GGO_GLYPH_INDEX | GGO_NATIVE; - UINT cbBuf = GetGlyphOutline(m_hdc, chw, flag, &gm, 0, NULL, &mat2); + UINT cbBuf = GetGlyphOutline(m_hdc, gid, flag, &gm, 0, NULL, &mat2); if (cbBuf <= 0) return kresUnexpected; byte * pGlyphData = new byte[cbBuf]; if (!pGlyphData) return kresOutOfMemory; - if (GDI_ERROR == GetGlyphOutline(m_hdc, chw, flag, &gm, cbBuf, pGlyphData,&mat2)) + if (GDI_ERROR == GetGlyphOutline(m_hdc, gid, flag, &gm, cbBuf, pGlyphData,&mat2)) return kresUnexpected; TTPOLYGONHEADER * pPolyHdr; @@ -411,9 +411,9 @@ Fill in the argument with information about the properties that are selected into the device context. Assumes SetupGraphics has been called. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::get_FontCharProperties(LgCharRenderProps * pchrp) +GrResult GrGraphics::get_FontCharProperties(GrCharProps * pchrp) { - memcpy(pchrp, &m_chrp, sizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, sizeof(GrCharProps)); return kresOk; } Index: GrGraphics.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/applib/GrGraphics.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GrGraphics.h 2 Sep 2004 20:29:02 -0000 1.2 +++ GrGraphics.h 6 Oct 2004 18:28:29 -0000 1.3 @@ -25,11 +25,11 @@ // use pixels for coordinates instead of twips as IGrGraphics wrongly indicates virtual GrResult InvertRect(int xLeft, int yTop, int xRight, int yBottom); - virtual GrResult DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, + virtual GrResult DrawTextExt(int x, int y, int gid, const OLECHAR __RPC_FAR * prggid, UINT uOptions, const RECT * pRect, int * prgdx); virtual GrResult GetFontEmSquare(int * pxyFontEmSquare); // fix psBoundingWidth inherited from IGrGraphics - virtual GrResult GetGlyphMetrics(int chw, + virtual GrResult GetGlyphMetrics(int gid, int * pxBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY); virtual GrResult GetFontData(int nTableId, int * pcbTableSz, byte * prgb, int cbMax); @@ -37,9 +37,9 @@ virtual GrResult get_FontAscent(int* pdy); virtual GrResult get_FontDescent(int* pdy); virtual GrResult get_YUnitsPerInch(int * pyInch); - //will NOT change font face name regardless of LgCharRenderProps.szFaceName - virtual GrResult SetupGraphics(LgCharRenderProps * pchrp); - virtual GrResult get_FontCharProperties(LgCharRenderProps * pchrp); + //will NOT change font face name regardless of GrCharProps.szFaceName + virtual GrResult SetupGraphics(GrCharProps * pchrp); + virtual GrResult get_FontCharProperties(GrCharProps * pchrp); //not inherited from IGrGraphics but needed to set up GrGraphics virtual GrResult Initialize(HDC hdc); //load dc into obj @@ -49,7 +49,7 @@ // Member variables HDC m_hdc; HFONT m_hfont; // current font selected into DC, if any - LgCharRenderProps m_chrp; + GrCharProps m_chrp; char m_szFaceName[32]; // Vertical resolution. Zero indicates not yet initialized. Index: GrTextSrc.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/applib/GrTextSrc.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GrTextSrc.cpp 2 Sep 2004 20:29:02 -0000 1.2 +++ GrTextSrc.cpp 6 Oct 2004 18:28:29 -0000 1.3 @@ -15,7 +15,7 @@ #include "GrClient.h" #include "GrTextSrc.h" -GrTextSrc::GrTextSrc(OLECHAR * pszText, LgCharRenderProps & chrp, +GrTextSrc::GrTextSrc(OLECHAR * pszText, GrCharProps & chrp, OLECHAR * prgchFontVar, int ichFontVar) { m_cchLength = (int)wcslen(pszText); @@ -23,7 +23,7 @@ memcpy(m_prgchText, pszText, isizeof(OLECHAR) * m_cchLength); m_prgchText[m_cchLength] = L'\0'; // zero-terminate - memcpy(&m_chrp, &chrp, isizeof(LgCharRenderProps)); + memcpy(&m_chrp, &chrp, isizeof(GrCharProps)); memset(m_rgchFontVar, 0, isizeof(m_rgchFontVar)); memcpy(m_rgchFontVar, prgchFontVar, min((unsigned int)(ichFontVar * isizeof(OLECHAR)), sizeof(m_rgchFontVar))); @@ -49,10 +49,10 @@ return kresOk; } -GrResult GrTextSrc::GetCharProps(int ich, LgCharRenderProps * pchrp, +GrResult GrTextSrc::GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim) { - memcpy(pchrp, &m_chrp, isizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, isizeof(GrCharProps)); *pichMin = 0; *pichLim = m_cchLength; return kresOk; Index: GrTextSrc.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/applib/GrTextSrc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GrTextSrc.h 2 Sep 2004 20:29:02 -0000 1.2 +++ GrTextSrc.h 6 Oct 2004 18:28:29 -0000 1.3 @@ -20,18 +20,18 @@ class GrTextSrc : public IGrTextSource { public: - GrTextSrc(OLECHAR * pszText, LgCharRenderProps & chrp, - OLECHAR * prgchFontVar, int ichFontVar); + GrTextSrc(utf16 * pszText, GrCharProps & chrp, + utf16 * prgchFontVar, int ichFontVar); ~GrTextSrc(); virtual GrResult Fetch(int ichMin, int ichLim, OLECHAR * prgchBuf); virtual GrResult get_Length(int * pcch); - virtual GrResult GetCharProps(int ich, LgCharRenderProps * pchrp, + virtual GrResult GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim); virtual GrResult GetParaProps(int ich, LgParaRenderProps * pchrp, int * pichMin, int * pichLim); virtual GrResult GetFontVariations(int ich, - OLECHAR * prgchFontVar, int ichMax, int * pich, + utf16 * prgchFontVar, int ichMax, int * pich, int * pichMin, int * pichLim); virtual void TextSrcObject(IGrTextSource ** ppgts); virtual void DeleteTextSrcPtr(); @@ -44,10 +44,10 @@ } protected: - OLECHAR * m_prgchText; + utf16 * m_prgchText; int m_cchLength; OLECHAR m_rgchFontVar[64]; - LgCharRenderProps m_chrp; + GrCharProps m_chrp; }; #endif |
From: <sil...@li...> - 2004-10-06 18:29:13
|
Update of /cvsroot/silgraphite/silgraphite/contrib/RegressionTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/RegressionTest Modified Files: RegressionTest.cpp main.h Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: RegressionTest.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/RegressionTest/RegressionTest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RegressionTest.cpp 20 Aug 2004 18:40:52 -0000 1.2 +++ RegressionTest.cpp 6 Oct 2004 18:28:29 -0000 1.3 @@ -139,7 +139,7 @@ // Set up the graphics object. int errorCount = 0; GrGraphics grfx; - LgCharRenderProps chrp; + GrCharProps chrp; if (!SetupGraphics(ptcase, &grfx, &chrp)) { errorCount++; @@ -428,7 +428,7 @@ /*---------------------------------------------------------------------------------------------- Set up a GrGraphics object for the test case. ----------------------------------------------------------------------------------------------*/ -bool SetupGraphics(TestCase * ptcase, GrGraphics * pgrfx, LgCharRenderProps * pchrp) +bool SetupGraphics(TestCase * ptcase, GrGraphics * pgrfx, GrCharProps * pchrp) { HFONT hFont; LOGFONT lf; @@ -445,7 +445,7 @@ } pgrfx->SetFont(hFont); - memset(pchrp, '\0', sizeof(LgCharRenderProps)); + memset(pchrp, '\0', sizeof(GrCharProps)); pchrp->dympHeight = (int)ptcase->FontSize() * 1000; pchrp->clrBack = RGB(255, 255, 255); //white pchrp->clrFore = RGB(0, 0, 0); //black Index: main.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/RegressionTest/main.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- main.h 10 Jun 2004 20:19:43 -0000 1.1 +++ main.h 6 Oct 2004 18:28:29 -0000 1.2 @@ -70,7 +70,7 @@ //:>******************************************************************************************** void RunTests(int numberOfTests, TestCase * ptcaseList); int RunOneTestCase(TestCase * ptcase); -bool SetupGraphics(TestCase * ptcase, GrGraphics * pgfx, LgCharRenderProps * pchrp); +bool SetupGraphics(TestCase * ptcase, GrGraphics * pgfx, GrCharProps * pchrp); void OutputError(TestCase * ptcase, std::string strErr, int i = -1); void OutputErrorWithValues(TestCase * ptcase, std::string strErr, int i, int valueFound, int valueExpected); |
From: <sil...@li...> - 2004-10-06 18:29:13
|
Update of /cvsroot/silgraphite/silgraphite/contrib/SimpleEdit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/SimpleEdit Modified Files: SimpleEdit.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: SimpleEdit.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/SimpleEdit/SimpleEdit.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SimpleEdit.cpp 16 Apr 2004 22:26:48 -0000 1.8 +++ SimpleEdit.cpp 6 Oct 2004 18:28:29 -0000 1.9 @@ -25,7 +25,7 @@ // keep this data between events // note that dc and GrGraphics should not be kept between events LOGFONT g_lf; -LgCharRenderProps g_lgchrp; +GrCharProps g_lgchrp; GrTextSrc * g_pgrtext; RECT g_rSrc; RECT g_rDst; @@ -465,7 +465,7 @@ //strcpy(g_lf.lfFaceName, "Doulos SIL"); strcpy(g_lf.lfFaceName, "SILDoulos PigLatinDemo"); - memset(&g_lgchrp, '\0', sizeof(LgCharRenderProps)); + memset(&g_lgchrp, '\0', sizeof(GrCharProps)); g_lgchrp.dympHeight = 24000; // font size in millipoints wcscpy(g_lgchrp.szFaceName, L"SILDoulos PigLatinDemo"); g_lgchrp.clrBack = RGB(255, 255, 255); //white |
From: <sil...@li...> - 2004-10-06 18:29:12
|
Update of /cvsroot/silgraphite/silgraphite/contrib/HelloWorld In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/HelloWorld Modified Files: GrGraphics.cpp GrGraphics.h GrTextSrc.cpp GrTextSrc.h HelloWorld.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: GrGraphics.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/HelloWorld/GrGraphics.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GrGraphics.cpp 9 Jun 2004 23:29:06 -0000 1.5 +++ GrGraphics.cpp 6 Oct 2004 18:28:22 -0000 1.6 @@ -53,7 +53,7 @@ { m_hdc = 0; m_hfont = 0; - memset (&m_chrp, '\0', sizeof(LgCharRenderProps)); + memset (&m_chrp, '\0', sizeof(GrCharProps)); // Vertical and horizontal resolution. Zero indicates not yet initialized. m_yInch = 0; @@ -64,7 +64,8 @@ ----------------------------------------------------------------------------------------------*/ GrGraphics::~GrGraphics() { - DeleteObject(SelectObject(m_hdc, GetStockObject(ANSI_VAR_FONT))); + if (m_hdc) + DeleteObject(SelectObject(m_hdc, GetStockObject(ANSI_VAR_FONT))); } /*---------------------------------------------------------------------------------------------- @@ -123,9 +124,9 @@ super/subscript are ignored, as is baseline adjust; client is presumed to have handled them. Sets colors and HFONT. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::SetupGraphics(LgCharRenderProps * pchrp) +GrResult GrGraphics::SetupGraphics(GrCharProps * pchrp) { - memcpy(&m_chrp, pchrp, sizeof(LgCharRenderProps)); + memcpy(&m_chrp, pchrp, sizeof(GrCharProps)); // set the font LOGFONT lf; @@ -199,17 +200,17 @@ Draw a list of glyphs that are all positioned vertically the same relative to the baseline, given their offsets from each other. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::DrawTextExt(int x, int y, int cch, const OLECHAR * prgchw, +GrResult GrGraphics::DrawTextExt(int x, int y, int cgid, const OLECHAR * prggid, UINT uOptions, const RECT * pRect, int * prgdx) { if (prgdx == NULL) { - if (cch > 1) + if (cgid > 1) return kresInvalidArg; } // must explicitly call W API so get wide version on Win 9x - if (!ExtTextOutW(m_hdc, x, y, uOptions, pRect, prgchw, cch, prgdx)) + if (!ExtTextOutW(m_hdc, x, y, uOptions, pRect, prggid, cgid, prgdx)) return kresUnexpected; return kresOk; @@ -229,15 +230,15 @@ } /*---------------------------------------------------------------------------------------------- - Get glyph metrics for a glyph in the currently selected font. chw must be a glyph id. + Get glyph metrics for a glyph in the currently selected font. gid id a glyph id. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::GetGlyphMetrics(int chw, +GrResult GrGraphics::GetGlyphMetrics(int gid, int * pxBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY) { GLYPHMETRICS gm; const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; - if (GDI_ERROR == ::GetGlyphOutline(m_hdc, chw, GGO_GLYPH_INDEX | GGO_METRICS, + if (GDI_ERROR == ::GetGlyphOutline(m_hdc, gid, GGO_GLYPH_INDEX | GGO_METRICS, &gm, 0, NULL, &mat2)) { return kresUnexpected; @@ -277,19 +278,19 @@ /*---------------------------------------------------------------------------------------------- Get coordinates for a point in a glyph. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet) +GrResult GrGraphics::XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet) { GLYPHMETRICS gm; const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; WORD flag = GGO_GLYPH_INDEX | GGO_NATIVE; - UINT cbBuf = GetGlyphOutline(m_hdc, chw, flag, &gm, 0, NULL, &mat2); + UINT cbBuf = GetGlyphOutline(m_hdc, gid, flag, &gm, 0, NULL, &mat2); if (cbBuf <= 0) return kresUnexpected; byte * pGlyphData = new byte[cbBuf]; if (!pGlyphData) return kresOutOfMemory; - if (GDI_ERROR == GetGlyphOutline(m_hdc, chw, flag, &gm, cbBuf, pGlyphData,&mat2)) + if (GDI_ERROR == GetGlyphOutline(m_hdc, gid, flag, &gm, cbBuf, pGlyphData,&mat2)) return kresUnexpected; TTPOLYGONHEADER * pPolyHdr; @@ -410,9 +411,9 @@ Fill in the argument with information about the properties that are selected into the device context. Assumes SetupGraphics has been called. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::get_FontCharProperties(LgCharRenderProps * pchrp) +GrResult GrGraphics::get_FontCharProperties(GrCharProps * pchrp) { - memcpy(pchrp, &m_chrp, sizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, sizeof(GrCharProps)); return kresOk; } Index: GrGraphics.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/HelloWorld/GrGraphics.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GrGraphics.h 9 Jun 2004 23:29:06 -0000 1.3 +++ GrGraphics.h 6 Oct 2004 18:28:23 -0000 1.4 @@ -21,15 +21,15 @@ { public: GrGraphics(); - ~GrGraphics(); + virtual ~GrGraphics(); // use pixels for coordinates instead of twips as IGrGraphics wrongly indicates virtual GrResult InvertRect(int xLeft, int yTop, int xRight, int yBottom); - virtual GrResult DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, + virtual GrResult DrawTextExt(int x, int y, int gid, const OLECHAR __RPC_FAR * prggid, UINT uOptions, const RECT * pRect, int * prgdx); virtual GrResult GetFontEmSquare(int * pxyFontEmSquare); // fix psBoundingWidth inherited from IGrGraphics - virtual GrResult GetGlyphMetrics(int chw, + virtual GrResult GetGlyphMetrics(int gid, int * pxBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY); virtual GrResult GetFontData(int nTableId, int * pcbTableSz, byte * prgb, int cbMax); @@ -37,19 +37,19 @@ virtual GrResult get_FontAscent(int* pdy); virtual GrResult get_FontDescent(int* pdy); virtual GrResult get_YUnitsPerInch(int * pyInch); - //will NOT change font face name regardless of LgCharRenderProps.szFaceName - virtual GrResult SetupGraphics(LgCharRenderProps * pchrp); - virtual GrResult get_FontCharProperties(LgCharRenderProps * pchrp); + //will NOT change font face name regardless of GrCharProps.szFaceName + virtual GrResult SetupGraphics(GrCharProps * pchrp); + virtual GrResult get_FontCharProperties(GrCharProps * pchrp); //not inherited from IGrGraphics but needed to set up GrGraphics - GrResult Initialize(HDC hdc); //load dc into obj - GrResult SetFont(HFONT hfont); //set font initially, call before SetupGraphics + virtual GrResult Initialize(HDC hdc); //load dc into obj + virtual GrResult SetFont(HFONT hfont); //set font initially, call before SetupGraphics protected: // Member variables HDC m_hdc; HFONT m_hfont; // current font selected into DC, if any - LgCharRenderProps m_chrp; + GrCharProps m_chrp; char m_szFaceName[32]; // Vertical resolution. Zero indicates not yet initialized. Index: GrTextSrc.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/HelloWorld/GrTextSrc.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GrTextSrc.cpp 9 Jun 2004 23:29:06 -0000 1.3 +++ GrTextSrc.cpp 6 Oct 2004 18:28:23 -0000 1.4 @@ -15,15 +15,15 @@ #include "GrClient.h" #include "GrTextSrc.h" -GrTextSrc::GrTextSrc(OLECHAR * pszText, LgCharRenderProps & chrp, - OLECHAR * prgchFontVar, int ichFontVar) +GrTextSrc::GrTextSrc(OLECHAR * pszText, GrCharProps & chrp, + OLECHAR * prgchFontVar, int ichFontVar) { m_cchLength = (int)wcslen(pszText); m_prgchText = new OLECHAR[m_cchLength + 1]; memcpy(m_prgchText, pszText, isizeof(OLECHAR) * m_cchLength); m_prgchText[m_cchLength] = L'\0'; // zero-terminate - memcpy(&m_chrp, &chrp, isizeof(LgCharRenderProps)); + memcpy(&m_chrp, &chrp, isizeof(GrCharProps)); memset(m_rgchFontVar, 0, isizeof(m_rgchFontVar)); memcpy(m_rgchFontVar, prgchFontVar, min((unsigned int)(ichFontVar * isizeof(OLECHAR)), sizeof(m_rgchFontVar))); @@ -49,30 +49,31 @@ return kresOk; } -GrResult GrTextSrc::GetCharProps(int ich, LgCharRenderProps * pchrp, -int * pichMin, int * pichLim) +GrResult GrTextSrc::GetCharProps(int ich, GrCharProps * pchrp, + int * pichMin, int * pichLim) { - memcpy(pchrp, &m_chrp, isizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, isizeof(GrCharProps)); *pichMin = 0; *pichLim = m_cchLength; return kresOk; } GrResult GrTextSrc::GetParaProps(int ich, LgParaRenderProps * pchrp, -int * pichMin, int * pichLim) + int * pichMin, int * pichLim) { memset(pchrp, 0, isizeof(LgParaRenderProps)); return kresNotImpl; } GrResult GrTextSrc::GetFontVariations(int ich, - OLECHAR * prgchFontVar, int ichMax, int * pich, - int * pichMin, int * pichLim) + OLECHAR * prgchFontVar, int ichMax, int * pich, + int * pichMin, int * pichLim) { - *pich = isizeof(m_rgchFontVar); + *pich = wcslen(m_rgchFontVar); if (ichMax < *pich) return kresFalse; + memset(prgchFontVar, 0, isizeof(m_rgchFontVar)); memcpy(prgchFontVar, m_rgchFontVar, isizeof(m_rgchFontVar)); *pichMin = 0; Index: GrTextSrc.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/HelloWorld/GrTextSrc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GrTextSrc.h 9 Jun 2004 23:29:06 -0000 1.2 +++ GrTextSrc.h 6 Oct 2004 18:28:23 -0000 1.3 @@ -20,29 +20,34 @@ class GrTextSrc : public IGrTextSource { public: - GrTextSrc(OLECHAR * pszText, LgCharRenderProps & chrp, - OLECHAR * prgchFontVar, int ichFontVar); + GrTextSrc(utf16 * pszText, GrCharProps & chrp, + utf16 * prgchFontVar, int ichFontVar); ~GrTextSrc(); virtual GrResult Fetch(int ichMin, int ichLim, OLECHAR * prgchBuf); virtual GrResult get_Length(int * pcch); - virtual GrResult GetCharProps(int ich, LgCharRenderProps * pchrp, + virtual GrResult GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim); virtual GrResult GetParaProps(int ich, LgParaRenderProps * pchrp, int * pichMin, int * pichLim); virtual GrResult GetFontVariations(int ich, - OLECHAR * prgchFontVar, int ichMax, int * pich, + utf16 * prgchFontVar, int ichMax, int * pich, int * pichMin, int * pichLim); virtual void TextSrcObject(IGrTextSource ** ppgts); virtual void DeleteTextSrcPtr(); void SetColor(int clr); + void SetRtl(bool fRtl, int nDirDepth) + { + m_chrp.fWsRtl = fRtl; + m_chrp.nDirDepth = nDirDepth; + } protected: - OLECHAR * m_prgchText; + utf16 * m_prgchText; int m_cchLength; OLECHAR m_rgchFontVar[64]; - LgCharRenderProps m_chrp; + GrCharProps m_chrp; }; #endif Index: HelloWorld.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/HelloWorld/HelloWorld.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- HelloWorld.cpp 9 Jun 2004 23:29:06 -0000 1.7 +++ HelloWorld.cpp 6 Oct 2004 18:28:23 -0000 1.8 @@ -160,8 +160,8 @@ MessageBox(hWnd, "GrGraphics didn't initialize", "", MB_OK); pgrfx->SetFont(hFont); - LgCharRenderProps * pchrp = new LgCharRenderProps(); - memset(pchrp, '\0', sizeof(LgCharRenderProps)); + GrCharProps * pchrp = new GrCharProps(); + memset(pchrp, '\0', sizeof(GrCharProps)); pchrp->dympHeight = 24000; // font size in millipoints wcscpy(pchrp->szFaceName, L"SILDoulos PigLatinDemo"); pchrp->clrBack = RGB(255, 255, 255); //white |
From: <sil...@li...> - 2004-10-06 18:29:11
|
Update of /cvsroot/silgraphite/silgraphite/contrib/JustTestApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/JustTestApp Modified Files: JustTestApp.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: JustTestApp.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/JustTestApp/JustTestApp.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- JustTestApp.cpp 9 Jun 2004 23:29:06 -0000 1.5 +++ JustTestApp.cpp 6 Oct 2004 18:28:28 -0000 1.6 @@ -27,7 +27,7 @@ // keep this data between events // note that dc and GrGraphics should not be kept between events LOGFONT g_lf; -LgCharRenderProps g_lgchrp; +GrCharProps g_lgchrp; RECT g_rSrc; RECT g_rDst; @@ -593,7 +593,7 @@ g_vdyOffsets[i] = g_vdyOffsets[i - 1] + (g_vdympSizes[i - 1] / 1000) * 2; } } - memset(&g_lgchrp, '\0', sizeof(LgCharRenderProps)); + memset(&g_lgchrp, '\0', sizeof(GrCharProps)); g_lgchrp.dympHeight = g_vdympSizes[0]; // font size in millipoints wcscpy(g_lgchrp.szFaceName, L"Doulos Justification Test"); g_lgchrp.clrBack = RGB(255, 255, 255); // white |
Update of /cvsroot/silgraphite/silgraphite/src/GrEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/src/GrEngine Modified Files: GrCharStream.cpp GrCharStream.h GrEngine.cpp GrPass.cpp GrPass.h GrPassActionCode.cpp GrSegment.cpp GrSlotState.cpp GrSlotState.h GrSlotStream.cpp GrSlotStream.h GrTableManager.cpp GrTableManager.h TestPasses.cpp TransductionLog.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: GrCharStream.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrCharStream.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GrCharStream.cpp 30 Jul 2004 13:01:28 -0000 1.13 +++ GrCharStream.cpp 6 Oct 2004 18:28:31 -0000 1.14 @@ -72,7 +72,7 @@ @param pcchw16bit - number of 16-bit chars consumed to get one complete Unicode codepoint. ----------------------------------------------------------------------------------------------*/ int GrCharStream::NextGet(GrTableManager * ptman, - GrFeatureValues * pfval, LgCharRenderProps ** ppchrp, int * pichwSegOffset, + GrFeatureValues * pfval, GrCharProps ** ppchrp, int * pichwSegOffset, int * pcchw16bit) { GrResult res; @@ -255,7 +255,7 @@ if (ichw <= 0 || ichw >= cchw) return true; - LgCharRenderProps chrp; + GrCharProps chrp; res = pgts->GetCharProps(ichw, &chrp, &ichwRunMin, &ichwRunLim); if (ResultFailed(res)) { @@ -338,7 +338,7 @@ Get the current feature values and character properties from the stream. ----------------------------------------------------------------------------------------------*/ void GrCharStream::CurrentFeatures(GrTableManager * ptman, - GrFeatureValues * pfval, LgCharRenderProps ** ppchrp) + GrFeatureValues * pfval, GrCharProps ** ppchrp) { if (m_ichwRunOffset == kPosInfinity) { Index: GrCharStream.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrCharStream.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GrCharStream.h 9 Jun 2004 23:29:08 -0000 1.11 +++ GrCharStream.h 6 Oct 2004 18:28:31 -0000 1.12 @@ -82,11 +82,11 @@ m_ichwLim = m_ichwPos; } - int NextGet(GrTableManager *, GrFeatureValues * pfval, LgCharRenderProps ** ppchrp, + int NextGet(GrTableManager *, GrFeatureValues * pfval, GrCharProps ** ppchrp, int * ichwSegOffset, int * pcchw16bit); void CurrentFeatures(GrTableManager * ptman, - GrFeatureValues * pfval, LgCharRenderProps ** ppchrp); + GrFeatureValues * pfval, GrCharProps ** ppchrp); // For transduction logging: int GetLogData(GrTableManager * ptman, int * rgnChars, bool * rgfNewRun, @@ -128,7 +128,7 @@ int m_inRunOffset; // index into m_prgnRunText; kPosInfinity if nothing set up int m_ichwRunOffset; // corresponding index into text source GrFeatureValues m_fvalRunFeats; - LgCharRenderProps m_chrpRun; + GrCharProps m_chrpRun; std::vector<int> m_vislotNextChunkMap; // maps from 16-bit chars to 32-bit chars & glyphs }; Index: GrEngine.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrEngine.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- GrEngine.cpp 16 Sep 2004 14:39:36 -0000 1.37 +++ GrEngine.cpp 6 Oct 2004 18:28:31 -0000 1.38 @@ -437,7 +437,7 @@ GrResult GrEngine::InitRenderer(IGrGraphics * pgg, OLECHAR * prgchData, int cchData) { /* - LgCharRenderProps chrp; + GrCharProps chrp; pvg->get_FontCharProperties(&chrp); stu::wstring stu(chrp.szFaceName); stu.append(L":"); @@ -555,7 +555,7 @@ - interpret any 'magic' font name Review: is this needed on the generic Graphite engine? ----------------------------------------------------------------------------------------------*/ -GrResult GrEngine::InterpretChrp(LgCharRenderProps * pchrp) +GrResult GrEngine::InterpretChrp(GrCharProps * pchrp) { ChkGrArgPtr(pchrp); @@ -834,7 +834,7 @@ ----------------------------------------------------------------------------------------------*/ GrResult GrEngine::GetGlyphAttribute(int iGlyph, int jgat, int nLevel, int * pnValueRet) { - return m_ptman->GetGlyphAttrForJustification(iGlyph, jgat, nLevel, pnValueRet); + return m_ptman->State()->GetGlyphAttrForJustification(iGlyph, jgat, nLevel, pnValueRet); } /*---------------------------------------------------------------------------------------------- @@ -843,7 +843,7 @@ ----------------------------------------------------------------------------------------------*/ GrResult GrEngine::SetGlyphAttribute(int iGlyph, int jgat, int nLevel, int nValue) { - return m_ptman->SetGlyphAttrForJustification(iGlyph, jgat, nLevel, nValue); + return m_ptman->State()->SetGlyphAttrForJustification(iGlyph, jgat, nLevel, nValue); } //:>******************************************************************************************** @@ -1093,7 +1093,7 @@ GrResult res = kresOk; Assert(m_ptman); - m_ptman->SetGraphics(pgg); + m_ptman->State()->SetGraphics(pgg); // Create a character stream on the text source. GrCharStream * pchstrm = new GrCharStream(pgts, ichMin, ichStrmLim, @@ -1298,7 +1298,7 @@ #endif // OLD_TEST_STUFF // Get char props for first run. - LgCharRenderProps chrp; + GrCharProps chrp; int ichwMinBogus, ichwLimBogus; GrResult res = pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus); if (ResultFailed(res)) @@ -1336,7 +1336,7 @@ while (true) { - LgCharRenderProps chrp; + GrCharProps chrp; int ichwMinRun, ichwLimRun; pgts->GetCharProps(ichwMinNext, &chrp, &ichwMinRun, &ichwLimRun); *pnDirDepth = chrp.nDirDepth; @@ -1358,7 +1358,7 @@ } else { - LgCharRenderProps chrpNext; + GrCharProps chrpNext; int ichwMinBogus, ichwLimBogus; pgts->GetCharProps(ichwLimRun, &chrpNext, &ichwMinBogus, &ichwLimBogus); @@ -1414,7 +1414,7 @@ ----------------------------------------------------------------------------------------------*/ GrResult GrEngine::SetUp(IGrGraphics * pgg, std::wstring stuFeatures) { - LgCharRenderProps chrp; + GrCharProps chrp; pgg->get_FontCharProperties(&chrp); bool fBold, fItalic; fBold = (chrp.ttvBold == kttvOn || chrp.ttvBold == kttvInvert); @@ -1428,7 +1428,7 @@ m_nScriptTag = 0; // not currently used, but set it to something - LgCharRenderProps chrp; + GrCharProps chrp; OLECHAR rgchFaceName[32]; // using this instead of std::wstring seemed to fix a mysterious bug std::wstring stuFeatures; if (m_stuInitialize.size() && !pgg) @@ -1950,9 +1950,6 @@ f = ReadFeatTable(grstrm, lnFeatOff); if (!f) ThrowHr(kresUnexpected); - - // Create the slot streams. - m_ptman->CreateSlotStreams(); } catch (...) { @@ -2123,7 +2120,7 @@ m_fUseSepBase = false; m_stuBaseFaceName.erase(); - LgCharRenderProps chrpOriginal; + GrCharProps chrpOriginal; sile_tbl = TableBuffer(*pgg, TtfUtil::TableIdTag(ktiSile)); if (sile_tbl) @@ -2315,9 +2312,6 @@ goto LUnexpected; } - // Create the slot streams. - m_ptman->CreateSlotStreams(); - m_stuErrCtrlFile.erase(); m_nFontCheckSum = nCheckSum; m_resFontRead = kresOk; @@ -2420,9 +2414,6 @@ // Read the "Feat" table. ReadFeatTable(qstrm, nFeatOffset); - - // Create the slot streams. - m_ptman->CreateSlotStreams(); } #endif // OLD_TEST_STUFF //:End Ignore @@ -2436,7 +2427,7 @@ int ichwMinBogus, ichwLimBogus; // Set the font to the one that this engine is using, regardless of what was requested. - LgCharRenderProps chrp; + GrCharProps chrp; CheckHr(pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus)); *pfBold = chrp.ttvBold == kttvOff ? false : true; @@ -2453,7 +2444,7 @@ // Set the font to the one that this engine is using, regardless of what the // text itself requested. I.e, the font name in the chrp is virtually ignored. - LgCharRenderProps chrp; + GrCharProps chrp; CheckHr(pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus)); AdjustFontAndStyles(pgg, stuFaceName, &chrp); @@ -2476,7 +2467,7 @@ TODO: clean this up. ----------------------------------------------------------------------------------------------*/ void GrEngine::AdjustFontAndStyles(IGrGraphics * pgg, std::wstring & stuFaceName, - LgCharRenderProps * pchrp) + GrCharProps * pchrp) { InterpretChrp(pchrp); @@ -2514,7 +2505,7 @@ int ichwMinBogus, ichwLimBogus; // Set the font to the one that this engine is using, regardless of what was requested. - LgCharRenderProps chrp; + GrCharProps chrp; CheckHr(pgts->GetCharProps(ichwMin, &chrp, &ichwMinBogus, &ichwLimBogus)); AdjustFontAndStyles(pgg, stuFaceName, &chrp); @@ -2646,7 +2637,7 @@ { Assert(!fBase || m_stuBaseFaceName.size() > 0); - LgCharRenderProps chrp; + GrCharProps chrp; pgg->get_FontCharProperties(&chrp); if (fBase) { @@ -2958,9 +2949,6 @@ // Feat table m_cfeat = 0; - - if (m_ptman != 0) - m_ptman->CreateSlotStreams(); } /*---------------------------------------------------------------------------------------------- Index: GrPass.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrPass.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- GrPass.cpp 2 Sep 2004 20:29:03 -0000 1.18 +++ GrPass.cpp 6 Oct 2004 18:28:31 -0000 1.19 @@ -38,7 +38,7 @@ //:> Methods //:>******************************************************************************************** /*---------------------------------------------------------------------------------------------- - Constructor + Constructors and initializers ----------------------------------------------------------------------------------------------*/ GrPass::GrPass(int i) : m_ipass(i), @@ -55,17 +55,29 @@ m_prgbConstraintBlock(NULL), m_prgbActionBlock(NULL), m_prgibConstraintDebug(NULL), - m_prgibRuleDebug(NULL), - m_nRulesSinceAdvance(0), - m_nMaxChunk(0), - m_cslotSkipToResync(0), - m_fDidResyncSkip(false) + m_prgibRuleDebug(NULL) { +} + +void PassState::InitForNewSegment(int ipass, int nMaxChunk) +{ + m_ipass = ipass; + m_nRulesSinceAdvance = 0; + m_nMaxChunk = nMaxChunk; + m_cslotSkipToResync = 0; + m_fDidResyncSkip = false; InitializeLogInfo(); } +void PassState::InitializeLogInfo() +{ + m_crulrec = 0; + memset(m_rgcslotDeletions, 0, 128); + memset(m_rgfInsertion, 0, 128); +} + /*---------------------------------------------------------------------------------------------- - Destructor + Destructors ----------------------------------------------------------------------------------------------*/ GrPass::~GrPass() { @@ -110,7 +122,6 @@ // max rule context m_nMaxRuleContext = grstrm.ReadByteFromFont(); - m_nMaxChunk = m_nMaxRuleContext; // MaxBackup m_nMaxBackup = grstrm.ReadByteFromFont(); @@ -247,7 +258,7 @@ int islotInitWritePos = psstrmOut->WritePos(); int cslotToGet = max(cslotNeededByNext, - NeededToResync() - psstrmOut->WritePos()); + m_pzpst->NeededToResync() - psstrmOut->WritePos()); int cslotGot = 0; gid16 chwLB = ptman->LBGlyphID(); @@ -409,10 +420,10 @@ int islotInitWritePos = psstrmOut->WritePos(); - Assert(NeededToResync() == 0); + Assert(m_pzpst->NeededToResync() == 0); int cslotToGet = max(cslotNeededByNext, - NeededToResync() - psstrmOut->WritePos()); + m_pzpst->NeededToResync() - psstrmOut->WritePos()); int cslotGot = 0; int nTopDir = ptman->TopDirectionLevel(); @@ -447,9 +458,10 @@ std::vector<int> vislotStarts; std::vector<int> vislotStops; - int islotReverseLim = psstrmIn->DirLevelRange(ptman, psstrmIn->ReadPos(), nTopDir, + int islotReverseLim = psstrmIn->DirLevelRange(ptman->State(), + psstrmIn->ReadPos(), nTopDir, vislotStarts, vislotStops); - //int islotReverseLim = psstrmIn->OldDirLevelRange(ptman, psstrmIn->ReadPos(), nTopDir); + //int islotReverseLim = psstrmIn->OldDirLevelRange(pengst, psstrmIn->ReadPos(), nTopDir); if (islotReverseLim == -1) { // We haven't got the full range of reversed text yet-- @@ -578,10 +590,12 @@ LgLineBreak lb, int cslotToGet, bool fNeedFinalBreak, LgTrailingWsHandling twsh, int * pislotFinalBreak) { + EngineState * pengst = ptman->State(); + // This pass should be the glyph-generation pass. Assert(dynamic_cast<GrGlyphGenPass*>(this)); - Assert(m_cslotSkipToResync == 0); - m_fDidResyncSkip = true; + Assert(m_pzpst->m_cslotSkipToResync == 0); + m_pzpst->m_fDidResyncSkip = true; for (int islot = 0; islot < cslotToGet; ++islot) { @@ -612,9 +626,9 @@ ((ptman->RightToLeft()) ? kdircRlb : kdircLlb), -1, false, pchstrm->SegOffset()); if (pchstrm->AtEnd()) - ptman->SetFinalLB(); + pengst->SetFinalLB(); else - ptman->SetInsertedLB(true); + pengst->SetInsertedLB(true); } else { @@ -622,7 +636,7 @@ psstrmOut->SetSegLimToWritePos(); } *pislotFinalBreak = psstrmOut->WritePos() - 1; - if (ptman->NumberOfLbPasses() > 0 && ptman->HasInitialLB()) + if (ptman->NumberOfLbPasses() > 0 && pengst->HasInitialLB()) { // Because we cheated above: the output stream of the linekbreak table // has an initial LB, which this stream doesn't have. Adjust the position @@ -649,12 +663,12 @@ int ichwSegOffset; // offset from the official start of the segment int cchw; // number of 16-bit chars consumed GrFeatureValues fval; - LgCharRenderProps * pchrp = NULL; + GrCharProps * pchrp = NULL; int nUnicode = pchstrm->NextGet(ptman, &fval, &pchrp, &ichwSegOffset, &cchw); gid16 chwGlyphID = ptman->GetGlyphIDFromUnicode(nUnicode); GrSlotState * pslotNew; - ptman->NewSlot(chwGlyphID, fval, pchrp, 0, ichwSegOffset, nUnicode, &pslotNew); + ptman->State()->NewSlot(chwGlyphID, fval, pchrp, 0, ichwSegOffset, nUnicode, &pslotNew); psstrmOut->NextPut(pslotNew); psstrmOut->MapInputChunk(islotChunkI, islotChunkO, pchstrm->SegOffset(), false, false); @@ -665,7 +679,7 @@ { // Hard line-break: we're done. pchstrm->SetLimToPos(); - ptman->SetHitHardBreak(); + pengst->SetHitHardBreak(); } } @@ -700,6 +714,8 @@ bool fHaveLineBreak, bool fMustBacktrack, LgLineBreak lbMax, LgTrailingWsHandling twsh, int * pislotLB, int * pxsWidth) { + EngineState * pengst = ptman->State(); + // This pass should be the final positioning pass. Assert(dynamic_cast<GrPosPass*>(this)); @@ -713,11 +729,11 @@ while (true) { // Do this right up front, so we are only measuring actual output. - if (CanResyncSkip(psstrmOutput)) - DoResyncSkip(psstrmOutput); + if (m_pzpst->CanResyncSkip(psstrmOutput)) + m_pzpst->DoResyncSkip(psstrmOutput); bool fMoreSpace; - if (!DidResyncSkip()) + if (!m_pzpst->DidResyncSkip()) fMoreSpace = true; else if (fInfiniteWidth) fMoreSpace = true; @@ -738,7 +754,7 @@ psstrmInput->ClearReprocBuffer(); *pislotLB = -1; - ptman->SetExceededSpace(); + pengst->SetExceededSpace(); return kBacktrack; } @@ -812,6 +828,8 @@ int GrPass::RemoveTrailingWhiteSpace(GrTableManager * ptman, GrSlotStream * psstrmOut, LgTrailingWsHandling twsh, int * pislotFinalBreak) { + EngineState * pengst = ptman->State(); + Assert(twsh == ktwshNoWs); Assert(m_ipass == ptman->NumberOfLbPasses()); // output of (final) lb pass @@ -841,8 +859,8 @@ } psstrmOut->SetSegLim(islotTmp); *pislotFinalBreak = islotTmp - 1; - ptman->SetFinalLB(false); - ptman->SetRemovedTrWhiteSpace(); + pengst->SetFinalLB(false); + pengst->SetRemovedTrWhiteSpace(); ptman->UnwindAndReinit(islotTmp - 1); } @@ -863,7 +881,7 @@ if (islotInput <= psstrmInput->ReadPosMax()) { // Didn't advance. - if (m_nRulesSinceAdvance >= m_nMaxRuleLoop) + if (m_pzpst->m_nRulesSinceAdvance >= m_nMaxRuleLoop) { bool fAdvanced = false; // Forcibly advance. First try to advance to where we backed up from. @@ -877,11 +895,11 @@ if (!fAdvanced && !psstrmInput->AtEndOfContext()) psstrmOutput->CopyOneSlotFrom(psstrmInput); - m_nRulesSinceAdvance = 0; + m_pzpst->m_nRulesSinceAdvance = 0; } - else m_nRulesSinceAdvance++; + else m_pzpst->m_nRulesSinceAdvance++; } - else m_nRulesSinceAdvance = 0; + else m_pzpst->m_nRulesSinceAdvance = 0; psstrmInput->SetReadPosMax(islotInput); } @@ -966,7 +984,7 @@ psstrmIn->AssertChunkMapsValid(psstrmOut); - m_nMaxChunk = max(m_nMaxChunk, psstrmIn->LastNextChunkLength()); + m_pzpst->m_nMaxChunk = max(m_pzpst->m_nMaxChunk, psstrmIn->LastNextChunkLength()); } /*---------------------------------------------------------------------------------------------- @@ -974,7 +992,7 @@ do so. The purpose of this is to resync when restarting for a segment other than the first. Caller should ensure that there are enough slots to skip. ----------------------------------------------------------------------------------------------*/ -int GrPass::DoResyncSkip(GrSlotStream * psstrmOutput) +int PassState::DoResyncSkip(GrSlotStream * psstrmOutput) { if (m_fDidResyncSkip) return 0; @@ -1353,7 +1371,7 @@ { // Back up the number of slots required for the longest rule context, // but if we land in the middle of a chunk, go forward to its boundary. - int islotIn = max(islotChanged - MaxChunk(), 0); + int islotIn = max(islotChanged - m_pzpst->MaxChunk(), 0); if (!psstrmIn->NoReproc()) islotIn = min(islotIn, psstrmIn->ReprocMin()); psstrmIn->ClearReprocBuffer(); @@ -1405,13 +1423,13 @@ } if (psstrmOut->WritePos() < psstrmOut->SlotsSkippedToResync()) { - Assert(psstrmOut->SlotsSkippedToResync() == m_cslotSkipToResync); + Assert(psstrmOut->SlotsSkippedToResync() == m_pzpst->m_cslotSkipToResync); UndoResyncSkip(); psstrmOut->ClearSlotsSkippedToResync(); } if (ptman->LoggingTransduction()) - UnwindLogInfo(islotIn, islotOut); + m_pzpst->UnwindLogInfo(islotIn, islotOut); return islotOut; } @@ -1448,14 +1466,14 @@ psstrmIn->UnwindInput(islotIn, false); psstrmOut->UnwindOutput(islotOut, false); - if (psstrmOut->WritePos() < m_cslotSkipToResync) + if (psstrmOut->WritePos() < m_pzpst->m_cslotSkipToResync) { Assert(false); // shouldn't be any of this mess for the Bidi pass - m_fDidResyncSkip = false; + m_pzpst->m_fDidResyncSkip = false; } if (ptman->LoggingTransduction()) - UnwindLogInfo(islotIn, islotOut); + m_pzpst->UnwindLogInfo(islotIn, islotOut); return islotOut; } @@ -1463,7 +1481,7 @@ /*---------------------------------------------------------------------------------------------- Reinitialize part of the transduction logging information when we unwind the pass. ----------------------------------------------------------------------------------------------*/ -void GrPass::UnwindLogInfo(int islotIn, int islotOut) +void PassState::UnwindLogInfo(int islotIn, int islotOut) { while (m_crulrec > 0 && m_rgrulrec[m_crulrec-1].m_islot >= islotIn) { @@ -1541,6 +1559,11 @@ ----------------------------------------------------------------------------------------------*/ void GrPass::RecordRuleFailed(int islot, int irul) { + m_pzpst->RecordRuleFailed(islot, irul); +} + +void PassState::RecordRuleFailed(int islot, int irul) +{ if (m_crulrec >= 128) return; @@ -1556,6 +1579,11 @@ ----------------------------------------------------------------------------------------------*/ void GrPass::RecordRuleFired(int islot, int irul) { + m_pzpst->RecordRuleFired(islot, irul); +} + +void PassState::RecordRuleFired(int islot, int irul) +{ if (m_crulrec >= 128) return; @@ -1568,7 +1596,7 @@ /*---------------------------------------------------------------------------------------------- Record the fact that a slot was deleted before the given slot (in the output). ----------------------------------------------------------------------------------------------*/ -void GrPass::RecordDeletionBefore(int islot) +void PassState::RecordDeletionBefore(int islot) { if (islot >= 128) return; @@ -1579,7 +1607,7 @@ /*---------------------------------------------------------------------------------------------- Record the fact that the given slot was inserted into the output. ----------------------------------------------------------------------------------------------*/ -void GrPass::RecordInsertionAt(int islot) +void PassState::RecordInsertionAt(int islot) { if (islot >= 128) return; Index: GrPass.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrPass.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- GrPass.h 26 Apr 2004 18:45:58 -0000 1.12 +++ GrPass.h 6 Oct 2004 18:28:31 -0000 1.13 @@ -23,6 +23,108 @@ { /*---------------------------------------------------------------------------------------------- + This class stores the state of processing in a single pass. + + Hungarian: zpst +----------------------------------------------------------------------------------------------*/ + +class PassState { + friend class GrPass; + friend class GrGlyphGenPass; + friend class GrLineBreakPass; + friend class GrSubPass; + friend class GrBidiPass; + friend class GrPosPass; + +public: + PassState() + { + } + + void InitForNewSegment(int ipass, int nMaxChunk); + void InitializeLogInfo(); + + int MaxChunk() + { + return m_nMaxChunk; + } + + void SetResyncSkip(int c) + { + m_cslotSkipToResync = c; + m_fDidResyncSkip = false; + } + int NeededToResync() + { + if (m_fDidResyncSkip) + return 0; + return m_cslotSkipToResync; + } + bool DidResyncSkip() + { + return m_fDidResyncSkip; + } + bool CanResyncSkip(GrSlotStream * psstrmOutput) + { + if (m_fDidResyncSkip) + return true; // already did it + // Are we in the position to do the resync-skip? + return m_cslotSkipToResync <= psstrmOutput->WritePos(); + } + int DoResyncSkip(GrSlotStream * psstrmOutput); + void UndoResyncSkip() + { + m_fDidResyncSkip = false; + } + + void UnwindLogInfo(int islotIn, int islotOut); + void RecordRuleFailed(int islot, int irul); + void RecordRuleFired(int islot, int irul); + void RecordDeletionBefore(int islot); + void RecordInsertionAt(int islot); +#ifdef TRACING + void LogRulesFiredAndFailed(std::ofstream & strmOut, GrSlotStream * psstrmIn); + void LogInsertionsAndDeletions(std::ofstream & strmOut, GrSlotStream * psstrmOut); +#endif // TRACING + +protected: + int m_ipass; + + // Used to avoid infinite loops. If m_nRulesSinceAdvance > m_nMaxRuleLoop, + // and we have not passed the stream's ReadPosMax, forcibly advance. + int m_nRulesSinceAdvance; + + // Maximum length of chunk, used when unwinding the streams during backtracking. This + // must be initialized to m_nMaxRuleContext, but that is not always adequate, because + // when there is reprocessing going on the chunks may be longer. + int m_nMaxChunk; + + // Indicates how much of the pass's initial output should be automatically + // skipped over in order to resync with a chunk boundary. This handles the situation + // where we are reprocessing a little of the previous segment in order to handle + // cross-line-boundary contextuals. The goal is to skip over the output until we hit + // what we know (from processing the previous segment) is a chunk boundary. + // + // In most cases (and always when this is the first segment of the + // writing system) this number is 0. + int m_cslotSkipToResync; + bool m_fDidResyncSkip; + + // For logging transduction process: record of one rule matched or fired + struct RuleRecord + { + int m_irul; // rule index + int m_islot; // slot index of input stream + bool m_fFired; + }; + RuleRecord m_rgrulrec[128]; + int m_crulrec; + + int m_rgcslotDeletions[128]; // number of deletions before slot i in output + int m_rgfInsertion[128]; // true if slot i in output was inserted +}; + +/*---------------------------------------------------------------------------------------------- This class handles finding and applying rules from the pass and storing the results in the appropriate stream. @@ -84,17 +186,15 @@ bool ReadFromFont(GrIStream & grstrm, int fxdVersion, int nOffset); void InitializeWithNoRules(); - void InitializeLogInfo() - { - m_crulrec = 0; - memset(m_rgcslotDeletions, 0, 128); - memset(m_rgfInsertion, 0, 128); - } - virtual void SetTopDirLevel(int n) { // only GrBidiPass does anything interesting } + void SetPassState(PassState * pzpst) + { + m_pzpst = pzpst; + } + virtual void ExtendOutput(GrTableManager *, IGrGraphics *, GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput, int nslotToGet, LgTrailingWsHandling twsh, @@ -124,32 +224,21 @@ return m_nMaxBackup; } - void SetResyncSkip(int c) - { - m_cslotSkipToResync = c; - m_fDidResyncSkip = false; - } - int NeededToResync() - { - if (m_fDidResyncSkip) - return 0; - return m_cslotSkipToResync; - } bool DidResyncSkip() { - return m_fDidResyncSkip; + return m_pzpst->DidResyncSkip(); } - bool CanResyncSkip(GrSlotStream * psstrmOutput) + int DoResyncSkip(GrSlotStream * psstrmOutput) { - if (m_fDidResyncSkip) - return true; // already did it - // Are we in the position to do the resync-skip? - return m_cslotSkipToResync <= psstrmOutput->WritePos(); + return m_pzpst->DoResyncSkip(psstrmOutput); } - int DoResyncSkip(GrSlotStream * psstrmOutput); void UndoResyncSkip() { - m_fDidResyncSkip = false; + m_pzpst->UndoResyncSkip(); + } + void SetResyncSkip(int n) + { + m_pzpst->SetResyncSkip(n); } virtual bool IsPosPass() @@ -242,9 +331,6 @@ void RecordRuleFailed(int islot, int irul); void RecordRuleFired(int islot, int irul); - void RecordDeletionBefore(int islot); - void RecordInsertionAt(int islot); - void UnwindLogInfo(int islotIn, int islotOut); #ifdef TRACING void LogRulesFiredAndFailed(std::ofstream & strmOut, GrSlotStream * psstrmIn); void LogInsertionsAndDeletions(std::ofstream & strmOut, GrSlotStream * psstrmOut); @@ -265,21 +351,15 @@ { } + friend class EngineState; // let it call the method below virtual int MaxRuleContext() // GrBidiPass overrides { return m_nMaxRuleContext; } - int MaxChunk() - { - return m_nMaxChunk; - } - protected: // Instance variables: - //////////// Font information //////////// - int m_ipass; // index of pass int m_fxdVersion; @@ -320,41 +400,8 @@ data16 * m_prgibConstraintDebug; // m_crul+1 of these data16 * m_prgibRuleDebug; // m_crul+1 of these - //////////// State information //////////// - - // Used to avoid infinite loops. If m_nRulesSinceAdvance > m_nMaxRuleLoop, - // and we have not passed the stream's ReadPosMax, forcibly advance. - int m_nRulesSinceAdvance; - - // Maximum length of chunk, used when unwinding the streams during backtracking; this - // must be initialized to m_nMaxRuleContext, but that is not always adequate, because - // when there is reprocessing going on the chunks may be longer. - int m_nMaxChunk; - - // Indicates how much of the pass's initial output should be automatically - // skipped over in order to resync with a chunk boundary. This handles the situation - // where we are reprocessing a little of the previous segment in order to handle - // cross-line-boundary contextuals. The goal is to skip over the output until we hit - // what we know (from processing the previous segment) is a chunk boundary. - // - // In most cases (and always when this is the first segment of the - // old writing system) this number is 0. - int m_cslotSkipToResync; - bool m_fDidResyncSkip; - - // For logging transduction process: - struct RuleRecord - { - int m_irul; // rule index - int m_islot; // slot index of input stream - bool m_fFired; - }; - RuleRecord m_rgrulrec[128]; - int m_crulrec; - - int m_rgcslotDeletions[128]; // number of deletions before slot i in output - int m_rgfInsertion[128]; // true if slot i in output was inserted - + // state of process for this pass + PassState * m_pzpst; public: #ifdef OLD_TEST_STUFF Index: GrPassActionCode.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrPassActionCode.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- GrPassActionCode.cpp 16 Sep 2004 12:09:42 -0000 1.14 +++ GrPassActionCode.cpp 6 Oct 2004 18:28:31 -0000 1.15 @@ -283,7 +283,7 @@ // *pfMustGet still = true if (ptman->LoggingTransduction()) - RecordInsertionAt(psstrmOut->WritePos()); + m_pzpst->RecordInsertionAt(psstrmOut->WritePos()); } break; case kopDelete: @@ -594,6 +594,8 @@ void GrPass::DoPutGlyph(GrTableManager * ptman, bool fInserting, int nReplacementClass, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) { + EngineState * pengst = ptman->State(); + // If we are exactly at the segment boundary, pass the information on to the output stream. bool fSegSegMin = psstrmIn->AtSegMin() && !fInserting; bool fSetSegLim = psstrmIn->AtSegLim() && !fInserting; @@ -613,12 +615,12 @@ GrSlotState * pslotNew; if (fInserting) { - ptman->NewSlot(nGlyphReplacement, pslotNextInput, m_ipass, &pslotNew); + pengst->NewSlot(nGlyphReplacement, pslotNextInput, m_ipass, &pslotNew); // leave associations empty; eventually they will be "neutralized" } else { - ptman->NewSlotCopy(pslotNextInput, m_ipass, &pslotNew); + pengst->NewSlotCopy(pslotNextInput, m_ipass, &pslotNew); pslotNew->SetGlyphID(nGlyphReplacement); ptman->SetSlotAttrsFromGlyphAttrs(pslotNew); } @@ -643,6 +645,8 @@ void GrPass::DoPutCopy(GrTableManager * ptman, bool fInserting, int cslotCopyFrom, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) { + EngineState * pengst = ptman->State(); + // If we are exactly at the segment boundary, pass the information on to the output stream. bool fSegSegMin = psstrmIn->AtSegMin() && !fInserting; bool fSetSegLim = psstrmIn->AtSegLim() && !fInserting; @@ -657,7 +661,7 @@ GrSlotState * pslotCopyFrom = psstrmIn->RuleInputSlot(cslotCopyFrom, psstrmOut); GrSlotState * pslotNew; - ptman->NewSlotCopy(pslotCopyFrom, m_ipass, &pslotNew); + pengst->NewSlotCopy(pslotCopyFrom, m_ipass, &pslotNew); if (fSegSegMin) psstrmOut->SetSegMinToWritePos(); @@ -683,6 +687,8 @@ int cslotSel, int nSelClass, int nReplacementClass, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut) { + EngineState * pengst = ptman->State(); + // If we are exactly at the segment boundary, pass the information on to the output stream. bool fSegSegMin = psstrmIn->AtSegMin() && !fInserting; bool fSetSegLim = psstrmIn->AtSegLim() && !fInserting; @@ -709,12 +715,12 @@ GrSlotState * pslotNew; if (fInserting) { - ptman->NewSlot(nGlyphReplacement, pslotNextInput, m_ipass, &pslotNew); + pengst->NewSlot(nGlyphReplacement, pslotNextInput, m_ipass, &pslotNew); // leave associations empty; eventually they will be "neutralized" } else { - ptman->NewSlotCopy(pslotNextInput, m_ipass, &pslotNew); + pengst->NewSlotCopy(pslotNextInput, m_ipass, &pslotNew); pslotNew->SetGlyphID(nGlyphReplacement); ptman->SetSlotAttrsFromGlyphAttrs(pslotNew); } @@ -754,7 +760,7 @@ pslot->MarkDeleted(); if (ptman->LoggingTransduction()) - RecordDeletionBefore(psstrmOut->WritePos()); + m_pzpst->RecordDeletionBefore(psstrmOut->WritePos()); } /*---------------------------------------------------------------------------------------------- Index: GrSegment.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSegment.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- GrSegment.cpp 16 Sep 2004 14:58:14 -0000 1.26 +++ GrSegment.cpp 6 Oct 2004 18:28:31 -0000 1.27 @@ -568,7 +568,7 @@ } // Get char props for first run. - LgCharRenderProps chrp; + GrCharProps chrp; int ichwMinBogus, ichwLimBogus; res = m_pgts->GetCharProps(ichwBase, &chrp, &ichwMinBogus, &ichwLimBogus); if (ResultSucceeded(res)) @@ -597,7 +597,7 @@ // Get char props for first run. // GrResult res; -// LgCharRenderProps chrp; +// GrCharProps chrp; // int ichwMinBogus, ichwLimBogus; // if (ResultFailed(res = m_pgts->GetCharProps(ichwBase, &chrp, &ichwMinBogus, &ichwLimBogus))) // return WARN(res); @@ -642,7 +642,7 @@ ChkGrOutPtr(pws); // Get char props for first run. -// LgCharRenderProps chrp; +// GrCharProps chrp; // int ichwMinBogus, ichwLimBogus; // if (ResultFailed(res = m_pgts->GetCharProps(ichwBase, &chrp, &ichwMinBogus, &ichwLimBogus))) // return WARN(res); @@ -1949,8 +1949,8 @@ //:>******************************************************************************************** /*---------------------------------------------------------------------------------------------- - Return the breakweight for the given character. Returns the best value if the before - and after values are different. + Return the breakweight for the given character. Returns the best value if the character is + mapped to glyphs with different values. ----------------------------------------------------------------------------------------------*/ GrResult GrSegment::GetBreakWeight(int ichBase, int ich, LgLineBreak * plb, bool fBreakBefore) { @@ -2001,7 +2001,7 @@ /*---------------------------------------------------------------------------------------------- Return the width of the range of characters. Line-boundary contextualization is handled - by the measure attributes on the glyphs. The width returns is equivalent to the sum of + by the measure attributes on the glyphs. The width returned is equivalent to the sum of the widths of any line-segments that would be needed to underline all the characters. ----------------------------------------------------------------------------------------------*/ GrResult GrSegment::GetRangeWidth(int ichBase, IGrGraphics * pgg, int ichMin, int ichLim, Index: GrSlotState.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSlotState.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- GrSlotState.cpp 9 Jun 2004 23:29:08 -0000 1.15 +++ GrSlotState.cpp 6 Oct 2004 18:28:31 -0000 1.16 @@ -41,7 +41,7 @@ ----------------------------------------------------------------------------------------------*/ // standard for pass 0 slots void GrSlotState::Initialize(int chw, GrEngine * pgreng, - GrFeatureValues fval, LgCharRenderProps * pchrp, + GrFeatureValues fval, GrCharProps * pchrp, int ipass, int ichwSegOffset, int nUnicode) { Assert(ipass == 0); @@ -527,7 +527,7 @@ int GrSlotState::GlyphMetricEmUnits(GrTableManager * ptman, int nMetricID) { int mValue; - if (ptman->GraphicsObject()) + if (ptman->State()->GraphicsObject()) { // Get the actual metric, possibly adjusted for hinting, then convert back to // design units. @@ -574,7 +574,7 @@ return 0; } - return GetGlyphMetric(ptman->GraphicsObject(), nMetricID, + return GetGlyphMetric(ptman->State()->GraphicsObject(), nMetricID, ActualGlyphForOutput(ptman)); } @@ -677,7 +677,7 @@ ----------------------------------------------------------------------------------------------*/ int GrSlotState::IsSpace(GrTableManager * ptman) { - return GrSlotAbstract::IsSpace(ptman->GraphicsObject(), ActualGlyphForOutput(ptman)); + return GrSlotAbstract::IsSpace(ptman->State()->GraphicsObject(), ActualGlyphForOutput(ptman)); } int GrSlotAbstract::IsSpace(IGrGraphics * pgg, gid16 chwGlyphID) Index: GrSlotState.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSlotState.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GrSlotState.h 2 Sep 2004 20:29:03 -0000 1.13 +++ GrSlotState.h 6 Oct 2004 18:28:31 -0000 1.14 @@ -409,7 +409,7 @@ { } - void Initialize(int chw, GrEngine *, GrFeatureValues fval, LgCharRenderProps * pchrp, + void Initialize(int chw, GrEngine *, GrFeatureValues fval, GrCharProps * pchrp, int ipass, int ichwSegOffset, int nUnicode = -1); void Initialize(int chw, GrEngine *, GrSlotState * pslotFeat, int ipass, int ichwSegOffset); Index: GrSlotStream.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSlotStream.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- GrSlotStream.cpp 2 Sep 2004 20:29:03 -0000 1.17 +++ GrSlotStream.cpp 6 Oct 2004 18:28:31 -0000 1.18 @@ -318,13 +318,13 @@ @param islotStart @nTopDirLevel - top direction: 0 = left-to-right, 1 = right-to-left ----------------------------------------------------------------------------------------------*/ -int GrSlotStream::OldDirLevelRange(GrTableManager * ptman, int islotStart, int nTopDirLevel) +int GrSlotStream::OldDirLevelRange(EngineState * pengst, int islotStart, int nTopDirLevel) { Assert(m_islotReadPos <= islotStart); Assert(islotStart < m_islotWritePos); int islot = islotStart; - int nSlotDirLevel = GetSlotDirLevel(ptman, islot, nTopDirLevel, nTopDirLevel, + int nSlotDirLevel = GetSlotDirLevel(pengst, islot, nTopDirLevel, nTopDirLevel, kdircUnknown, kdircNeutral); if (nSlotDirLevel == -1) return -1; @@ -343,7 +343,7 @@ return islot; } - nSlotDirLevel = GetSlotDirLevel(ptman, islot, nTopDirLevel, nTopDirLevel, + nSlotDirLevel = GetSlotDirLevel(pengst, islot, nTopDirLevel, nTopDirLevel, kdircUnknown, kdircNeutral); if (nSlotDirLevel == -1) return -1; @@ -359,7 +359,7 @@ @param islotStart @nTopDirLevel - top direction: 0 = left-to-right, 1 = right-to-left ----------------------------------------------------------------------------------------------*/ -int GrSlotStream::DirLevelRange(GrTableManager * ptman, int islotStart, int nTopDirLevel, +int GrSlotStream::DirLevelRange(EngineState * pengst, int islotStart, int nTopDirLevel, std::vector<int> & vislotStarts, std::vector<int> & vislotStops) { Assert(m_islotReadPos <= islotStart); @@ -456,13 +456,13 @@ } else { - nSlotDirLevel = GetSlotDirLevel(ptman, islot, nTopDirLevel, nMarkerLevel, + nSlotDirLevel = GetSlotDirLevel(pengst, islot, nTopDirLevel, nMarkerLevel, dircMarker, dircOverride); if (nSlotDirLevel == -1) return -1; // not enough slots } - Assert(ptman->WhiteSpaceOnly() || nCurrLevel >= nTopDirLevel); + Assert(pengst->WhiteSpaceOnly() || nCurrLevel >= nTopDirLevel); while (nSlotDirLevel > nCurrLevel) { vislotStartStack.push_back(islot); @@ -479,14 +479,14 @@ vislotStops.push_back(islot - 1); // previous character was the end of the range } else - Assert(ptman->WhiteSpaceOnly()); // the space is higher than the segment itself + Assert(pengst->WhiteSpaceOnly()); // the space is higher than the segment itself nCurrLevel--; } // In the case of white-space-only segments, the space may be bumped up to a level // higher than the segment itself. - Assert(ptman->WhiteSpaceOnly() || vislotStartStack.size() + nTopDirLevel == nCurrLevel); - Assert(ptman->WhiteSpaceOnly() || vnLevelStack.size() == vdircMarkerStack.size()); - Assert(ptman->WhiteSpaceOnly() || vdircOverrideStack.size() == vdircMarkerStack.size()); + Assert(pengst->WhiteSpaceOnly() || vislotStartStack.size() + nTopDirLevel == nCurrLevel); + Assert(pengst->WhiteSpaceOnly() || vnLevelStack.size() == vdircMarkerStack.size()); + Assert(pengst->WhiteSpaceOnly() || vdircOverrideStack.size() == vdircMarkerStack.size()); if (nCurrLevel <= nTopDirLevel) { @@ -527,7 +527,7 @@ vislotStops.push_back(min(islot - 1, islotSegLim - 1)); nCurrLevel--; } - Assert(ptman->WhiteSpaceOnly() || nCurrLevel == nTopDirLevel); + Assert(pengst->WhiteSpaceOnly() || nCurrLevel == nTopDirLevel); Assert(vislotStarts.size() == vislotStops.size()); // The start- and stop-lists were generated in the order that we hit the stops, in other @@ -552,7 +552,7 @@ (for interpreting PDF codes) @param dircOverride - override imposed by LRO or RLO ----------------------------------------------------------------------------------------------*/ -int GrSlotStream::GetSlotDirLevel(GrTableManager * ptman, int islot, +int GrSlotStream::GetSlotDirLevel(EngineState * pengst, int islot, int nOuterLevel, int nCurrLevel, DirCode dircMarker, DirCode dircOverride) { // Assert(m_psstrmReprocess == NULL); @@ -564,10 +564,10 @@ // already figured out return nDirLevel; - if (ptman->WhiteSpaceOnly()) + if (pengst->WhiteSpaceOnly()) { // White-space-only segments should not have any reordering. - nDirLevel = ptman->ParaRightToLeft(); + nDirLevel = pengst->ParaRightToLeft(); pslot->SetDirLevel(nDirLevel); pslot->MarkDirProcessed(); return nDirLevel; @@ -639,7 +639,7 @@ Warn("Pathological case in bidi algorithm"); } #endif // _DEBUG - dircLp = AdjacentNonBndNeutralCode(ptman, islotLp - 1, -1, dircMarker); + dircLp = AdjacentNonBndNeutralCode(pengst, islotLp - 1, -1, dircMarker); m_vpslot[islotLp]->SetDirProcessed(dircLp); } @@ -647,7 +647,7 @@ // W2. European numbers are changed to Arabic numbers if the previous strong type // was an Arabic letter. - DirCode dircPrevStrong = AdjacentStrongCode(ptman, islot - 1, -1, dircMarker); + DirCode dircPrevStrong = AdjacentStrongCode(pengst, islot - 1, -1, dircMarker); if (dircPrevStrong == kdircRArab) { for (islotLp = islot; islotLp < islotWeakRunLim; islotLp++) @@ -667,8 +667,8 @@ if ((dircLp == kdircEuroSep || dircLp == kdircComSep) && islotLp + 1 < m_islotWritePos) // don't test last slot in stream { - DirCode dircPrev = AdjacentNonBndNeutralCode(ptman, islotLp - 1, -1, dircMarker); - DirCode dircNext = AdjacentNonBndNeutralCode(ptman, islotLp + 1, 1, dircMarker); + DirCode dircPrev = AdjacentNonBndNeutralCode(pengst, islotLp - 1, -1, dircMarker); + DirCode dircNext = AdjacentNonBndNeutralCode(pengst, islotLp + 1, 1, dircMarker); if (dircPrev == dircNext) { if (dircLp == kdircEuroSep && dircPrev == kdircEuroNum) @@ -693,11 +693,11 @@ dircLp = m_vpslot[islotLp]->DirProcessed(); if (dircLp == kdircEuroTerm || dircLp == kdircBndNeutral) { - if (TerminatorSequence(ptman, islotLp - 1, -1, dircMarker) == kdircEuroNum) + if (TerminatorSequence(pengst, islotLp - 1, -1, dircMarker) == kdircEuroNum) dircLp = kdircEuroNum; else { - if (TerminatorSequence(ptman, islotLp + 1, 1, dircMarker) == kdircEuroNum) + if (TerminatorSequence(pengst, islotLp + 1, 1, dircMarker) == kdircEuroNum) dircLp = kdircEuroNum; // else could possibly be unknown if we are at the end of the stream } @@ -714,7 +714,7 @@ // W7. European numbers are changed to plain left-to-right if the previous strong type // was left-to-right. - dircPrevStrong = AdjacentStrongCode(ptman, islot - 1, -1, dircMarker); + dircPrevStrong = AdjacentStrongCode(pengst, islot - 1, -1, dircMarker); if (dircPrevStrong == kdircL) { for (islotLp = islot; islotLp < islotWeakRunLim; islotLp++) @@ -733,7 +733,7 @@ int islotFinalLB = -1; for (islotLp = islotWeakRunLim; islotLp-- > islot; ) { - if (m_vpslot[islotLp]->IsFinalLineBreak(ptman->LBGlyphID())) + if (m_vpslot[islotLp]->IsFinalLineBreak(pengst->TableManager()->LBGlyphID())) { islotFinalLB = islotLp; for (int islotLp2 = islotLp; islotLp2-- > islot; ) @@ -768,8 +768,8 @@ // First, look for either a strong code or a number. If we get at least // one strong code and a number with the same direction, use that strong // code. - DirCode dircPrev = AdjacentStrongCode(ptman, islotLp - 1, -1, dircMarker, true); - DirCode dircNext = AdjacentStrongCode(ptman, islotLp + 1, 1, dircMarker, true); + DirCode dircPrev = AdjacentStrongCode(pengst, islotLp - 1, -1, dircMarker, true); + DirCode dircNext = AdjacentStrongCode(pengst, islotLp + 1, 1, dircMarker, true); if (dircNext == kdircUnknown) return -1; @@ -798,9 +798,9 @@ { // Try again, insisting on strong codes, no numbers. if (!StrongDir(dircPrev)) - dircPrev = AdjacentStrongCode(ptman, islotLp - 1, -1, dircMarker, false); + dircPrev = AdjacentStrongCode(pengst, islotLp - 1, -1, dircMarker, false); if (!StrongDir(dircNext)) - dircNext = AdjacentStrongCode(ptman, islotLp + 1, 1, dircMarker, false); + dircNext = AdjacentStrongCode(pengst, islotLp + 1, 1, dircMarker, false); if (dircPrev == kdircUnknown) dircPrev = dircNext; @@ -933,11 +933,11 @@ directionality @param dircPDF - how to interpret PDF codes (from corresponding RLO, etc) ----------------------------------------------------------------------------------------------*/ -DirCode GrSlotStream::AdjacentStrongCode(GrTableManager * ptman, int islot, int nInc, +DirCode GrSlotStream::AdjacentStrongCode(EngineState * pengst, int islot, int nInc, DirCode dircPDF, bool fNumbersAreStrong) { if (islot < 0) - return ptman->InitialStrongDir(); + return pengst->InitialStrongDir(); else if (islot >= m_islotWritePos) { @@ -956,7 +956,7 @@ if (fNumbersAreStrong && (dirc == kdircEuroNum || dirc == kdircArabNum)) return dirc; - return AdjacentStrongCode(ptman, islot + nInc, nInc, dircPDF, fNumbersAreStrong); + return AdjacentStrongCode(pengst, islot + nInc, nInc, dircPDF, fNumbersAreStrong); } /*---------------------------------------------------------------------------------------------- @@ -968,11 +968,11 @@ @param nInc - +1 to search forward, -1 to search backward @param dircPDF - how to interpret PDF codes (from corresponding RLO, etc) ----------------------------------------------------------------------------------------------*/ -DirCode GrSlotStream::TerminatorSequence(GrTableManager * ptman, int islot, int nInc, +DirCode GrSlotStream::TerminatorSequence(EngineState * pengst, int islot, int nInc, DirCode dircPDF) { if (islot < 0) - return ptman->InitialTermDir(); + return pengst->InitialTermDir(); else if (islot >= m_islotWritePos) { @@ -991,13 +991,13 @@ return kdircEuroNum; else if (dirc == kdircEuroTerm) // yes, this slot is a terminator; are there more? - return TerminatorSequence(ptman, islot + nInc, nInc, dircPDF); + return TerminatorSequence(pengst, islot + nInc, nInc, dircPDF); else if (dirc == kdircLlb || dirc == kdircRlb) // line-break slot--ignore and keep going - return TerminatorSequence(ptman, islot + nInc, nInc, dircPDF); + return TerminatorSequence(pengst, islot + nInc, nInc, dircPDF); else if (dirc == kdircBndNeutral) // boundary neutral--ignore and keep going - return TerminatorSequence(ptman, islot + nInc, nInc, dircPDF); + return TerminatorSequence(pengst, islot + nInc, nInc, dircPDF); else // no number found return kdircNeutral; @@ -1011,7 +1011,7 @@ @param nInc - +1 to search forward, -1 to search backward @param dircPDF - how to interpret PDF codes (from corresponding RLO, etc) ----------------------------------------------------------------------------------------------*/ -DirCode GrSlotStream::AdjacentNonBndNeutralCode(GrTableManager * ptman, int islot, int nInc, +DirCode GrSlotStream::AdjacentNonBndNeutralCode(EngineState * pengst, int islot, int nInc, DirCode dircPDF) { Assert(islot < m_islotWritePos); @@ -1029,7 +1029,7 @@ DirCode dirc = m_vpslot[islot]->DirProcessed(); if (dirc == kdircBndNeutral) - return AdjacentNonBndNeutralCode(ptman, islot + nInc, nInc, dircPDF); + return AdjacentNonBndNeutralCode(pengst, islot + nInc, nInc, dircPDF); else if (dirc == kdircPDF) return (RightToLeftDir(dircPDF)) ? kdircPdfR : kdircPdfL; else @@ -1229,6 +1229,8 @@ LgLineBreak lb, LgTrailingWsHandling twsh, int islotMin, LgLineBreak * plbNextToTry) { + EngineState * pengst = ptman->State(); + Assert(!fInsertedLB || islotPrevBreak > -1); int ichwSegOffset; @@ -1240,7 +1242,7 @@ return -1; // didn't find a legal break } - GrSlotState * pslotCopyFeat = ptman->AnAdjacentSlot(m_ipass, islot + 1); + GrSlotState * pslotCopyFeat = pengst->AnAdjacentSlot(m_ipass, islot + 1); Assert(pslotCopyFeat); if (islotPrevBreak > -1 && fInsertedLB) @@ -1259,7 +1261,7 @@ } GrSlotState * pslotNew; - ptman->NewSlot(ptman->LBGlyphID(), pslotCopyFeat, 0, ichwSegOffset, &pslotNew); + pengst->NewSlot(ptman->LBGlyphID(), pslotCopyFeat, 0, ichwSegOffset, &pslotNew); pslotNew->SetSpecialSlotFlag(kspslLbFinal); pslotNew->SetBreakWeight(lbFound); @@ -1363,7 +1365,7 @@ GrSlotState * pslot = m_vpslot[*pislot]; *plbNextToTry = klbClipBreak; // worst break - ptman->SetRemovedTrWhiteSpace(false); + ptman->State()->SetRemovedTrWhiteSpace(false); while (twsh != ktwshOnlyWs) // in white-space only case, ignore lb values { @@ -1423,7 +1425,7 @@ return false; pslot = m_vpslot[*pislot]; *pichwSegOffset = pslot->SegOffset(); - ptman->SetRemovedTrWhiteSpace(true); + ptman->State()->SetRemovedTrWhiteSpace(true); } } @@ -1545,6 +1547,8 @@ void GrSlotStream::AppendLineBreak(GrTableManager * ptman, GrCharStream * pchstrm, LgLineBreak lb, DirCode dirc, int islotLB, bool fInitial, int ichwSegOffset) { + EngineState * pengst = ptman->State(); + Assert(AssertValid()); /// Assert(m_islotReprocPos == -1); @@ -1554,16 +1558,16 @@ // int islot = m_islotWritePos; - GrSlotState * pslotCopyFeat = ptman->AnAdjacentSlot(m_ipass, islotLB); + GrSlotState * pslotCopyFeat = pengst->AnAdjacentSlot(m_ipass, islotLB); GrSlotState * pslotNew; if (pslotCopyFeat) - ptman->NewSlot(ptman->LBGlyphID(), pslotCopyFeat, 0, ichwSegOffset, &pslotNew); + pengst->NewSlot(ptman->LBGlyphID(), pslotCopyFeat, 0, ichwSegOffset, &pslotNew); else { GrFeatureValues fval; - LgCharRenderProps * pchrp = NULL; + GrCharProps * pchrp = NULL; pchstrm->CurrentFeatures(ptman, &fval, &pchrp); - ptman->NewSlot(ptman->LBGlyphID(), fval, pchrp, 0, ichwSegOffset, -1, &pslotNew); + pengst->NewSlot(ptman->LBGlyphID(), fval, pchrp, 0, ichwSegOffset, -1, &pslotNew); } pslotNew->m_lb = lb; @@ -1578,7 +1582,6 @@ if (m_ipass > 0) AdjustPrevStreamNextChunkMap(ptman, islotLB, 1); - m_islotWritePos++; if (m_fUsedByPosPass && GotIndexOffset()) @@ -2101,9 +2104,9 @@ { GrSlotState * pslot = SlotAt(islot); if (pslot->IsInitialLineBreak(chwLB)) - ptman->SetStartLineContext(true); + ptman->State()->SetStartLineContext(true); if (pslot->IsFinalLineBreak(chwLB)) - ptman->SetEndLineContext(true); + ptman->State()->SetEndLineContext(true); } } Index: GrSlotStream.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSlotStream.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GrSlotStream.h 9 Jun 2004 23:29:08 -0000 1.11 +++ GrSlotStream.h 6 Oct 2004 18:28:31 -0000 1.12 @@ -22,6 +22,8 @@ namespace gr { +class EngineState; + /*---------------------------------------------------------------------------------------------- Each GrSlotStream represents the output of one pass, which also serves as the input of the following pass. Hence it has two positions, a write position for when it is @@ -317,15 +319,15 @@ m_islotReadPosMax = std::max(m_islotReadPosMax, islot); } - int OldDirLevelRange(GrTableManager * ptman, int islotStart, int nTopDirection); - int DirLevelRange(GrTableManager * ptman, int islotStart, int nTopDirection, + int OldDirLevelRange(EngineState * pengst, int islotStart, int nTopDirection); + int DirLevelRange(EngineState * pengst, int islotStart, int nTopDirection, std::vector<int> & vislotStarts, std::vector<int> & vislotStops); - int GetSlotDirLevel(GrTableManager * ptman, int islot, + int GetSlotDirLevel(EngineState * pengst, int islot, int nOuterLevel, int nCurrLevel, DirCode dircMarker, DirCode dircOverride); - DirCode AdjacentStrongCode(GrTableManager * ptman, int islot, int nInc, + DirCode AdjacentStrongCode(EngineState * pengst, int islot, int nInc, DirCode dircPDF, bool fNumbersAreStrong = false); - DirCode TerminatorSequence(GrTableManager * ptman, int islot, int nInc, DirCode dircPDF); - DirCode AdjacentNonBndNeutralCode(GrTableManager * ptman, int islot, int nInc, + DirCode TerminatorSequence(EngineState * pengst, int islot, int nInc, DirCode dircPDF); + DirCode AdjacentNonBndNeutralCode(EngineState * pengst, int islot, int nInc, DirCode dircPDF); void CopyOneSlotFrom(GrSlotStream * psstrmPrev); Index: GrTableManager.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrTableManager.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- GrTableManager.cpp 22 Jul 2004 12:37:28 -0000 1.22 +++ GrTableManager.cpp 6 Oct 2004 18:28:31 -0000 1.23 @@ -41,26 +41,77 @@ //:>******************************************************************************************** /*---------------------------------------------------------------------------------------------- - Destructor. + Constructors and initializers +----------------------------------------------------------------------------------------------*/ +EngineState::EngineState() + : m_ipassJustCalled(-1), + m_prgzpst(NULL), + m_prgpsstrm(NULL), + m_pgg(NULL), [...977 lines suppressed...] { Assert(psstrm->OutputOfPass() == m_cpass - 1); // only used for final stream @@ -2284,7 +2417,7 @@ *ppslotLastBase = pslotNew; *ppslot = pslotNew; } - (*ppslot)->AddJWidthToAdvance(this); + (*ppslot)->AddJWidthToAdvance(TableManager()); } } @@ -2327,7 +2460,7 @@ int islotIn = pchstrm->SegOffset(ichw); Assert(islotIn >= 0); - islotIn += (fInitial? m_cslotPreSeg - 1: m_cslotPreSeg); + islotIn += (fInitial? m_engst.m_cslotPreSeg - 1: m_engst.m_cslotPreSeg); gid16 chwLBGlyphID = LBGlyphID(); Index: GrTableManager.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrTableManager.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- GrTableManager.h 9 Jun 2004 23:29:08 -0000 1.15 +++ GrTableManager.h 6 Oct 2004 18:28:31 -0000 1.16 @@ -23,104 +23,29 @@ { /*---------------------------------------------------------------------------------------------- - There is a single instance of GrTableManager that handle the interactions between - passes, including the demand-pull mechanism. + There is a single instance of Engine State that keeps track of the state of the processing + for a single segment generation. - Hungarian: tman + Hungarian: engst ----------------------------------------------------------------------------------------------*/ - -class GrTableManager { - +class EngineState { + friend class GrTableManager; public: - // Constructor & destructor: - GrTableManager(GrEngine * pgreng) - : m_cpass(0), - m_fBidi(false), - m_prgppass(NULL), - m_prgpsstrm(NULL), - m_pgreng(pgreng), - m_ipassJustCalled(-1), - m_pgg(NULL), - m_fStartLineContext(false), - m_fEndLineContext(false), - m_cslotPreSeg(0), - m_islotblkCurr(-1), - m_islotNext(kSlotBlockSize), - m_fInitialLB(false), - m_fFinalLB(false), - m_fInsertedLB(false), - m_fExceededSpace(false), - m_fHitHardBreak(false), - m_fRemovedWhtsp(false), - m_dxsShrinkPossible(GrSlotState::kNotYetSet), - m_islotPosNext(-1), - m_xsPosXNext(0), - m_ysPosYNext(0), - m_dxsTotWidthSoFar(0), - m_dxsVisWidthSoFar(0) - { - m_vslotblk.clear(); - m_vprgnSlotVarLenBufs.clear(); - } + EngineState(); + void Initialize(GrEngine *, GrTableManager *); - ~GrTableManager(); + ~EngineState(); void DestroySlotBlocks(); - bool CreateAndReadPasses(GrIStream & grstrm, int fxdVersion, - int cpassFont, long lSubTableStart, int * rgnPassOffsets, - int ipassSub1Font, int ipassPos1Font, int ipassJust1Font, byte ipassPostBidiFont); + void InitForNewSegment(GrTableManager * ptman, IGrGraphics * pgg); void CreateEmpty(); - void CreateSlotStreams(); - - void SetGraphics(IGrGraphics * pgg) - { - m_pgg = pgg; - } - - void GetSegment(IGrGraphics * pgg, GrCharStream * pchstrm, - IGrJustifier * pgjus, int jmodi, - bool fStartLine, bool fEndLine, int ichStop, - int dxWidth, int dxUnjustified, - bool fNeedFinalBreak, bool fNextIsSameWs, bool fMoreText, - bool fInfiniteWidth, bool fWidthIsCharCount, - LgLineBreak lbPref, LgLineBreak lbMax, int ichwCallerBtLim, - LgTrailingWsHandling twsh, bool fParaRtoL, int nDirDepth, - GrSegment ** ppsegRet, - int * pdichwLimSeg, - int * pdxWidth, LgEndSegmentType * pest, - int cbPrev, byte * pbPrevSegDat, - int cbNextMax, byte * pbNextSegDat, int * pcbNextSegDat, - int * pdichwContext); - - IGrGraphics * GraphicsObject() - { - return m_pgg; - } - - GrPass* Pass(int ipass) - { - Assert(ipass >= 0); - return m_prgppass[ipass]; - } - - int NumberOfPasses() - { - return m_cpass; - } - - int NumberOfLbPasses() - { - return m_cpassLB; - } + GrEngine * Engine(); + GrTableManager * TableManager(); - bool HasBidiPass() - { - return m_fBidi; - } + void CreateSlotStreams(); - // Return the stream that serves as input to the given pass. GrSlotStream * InputStream(int ipass) { Assert(ipass > 0); // the char stream serves as input to the zeroth pass @@ -130,83 +55,16 @@ // Return the stream that serves as output to the given pass. GrSlotStream * OutputStream(int ipass) { + Assert(ipass < m_cpass); return m_prgpsstrm[ipass]; } GrSlotState * AnAdjacentSlot(int ipassArg, int islotArg); - void UnwindAndReinit(int islotNewBreak); + GrResult GetGlyphAttrForJustification(int iGlyph, int jgat, int nLevel, int * pxysValueRet); + GrResult SetGlyphAttrForJustification(int iGlyph, int jgat, int nLevel, int xysValue); - // Memory management for slots: - void NewSlot(int gID, GrFeatureValues fval, LgCharRenderProps * pchrp, - int ipass, int ichwSegOffset, int nUnicode, - GrSlotState **); - void NewSlot(int gID, GrSlotState * pslotFeat, int ipass, int ichwSegOffset, - GrSlotState **); - void NewSlot(int gID, GrSlotState * pslotFeat, int ipass, GrSlotState **); - void NewSlotCopy(GrSlotState * pslotCopyFrom, int ipass, - GrSlotState ** pslotRet); enum { kSlotBlockSize = 50 }; // number of slots to allocate in a block -protected: - void NextSlot(GrSlotState ** ppslot); - -public: - int InternalJustificationMode() - { - return m_jmodi; - } - - bool ShouldLogJustification() - { - return m_jmodi != kjmodiNormal; - } - - DirCode InitialStrongDir() - { - return m_dircInitialStrongDir; - } - DirCode InitialTermDir() - { - return m_dircInitialTermDir; - } - - // Forward to the engine itself - gid16 GetGlyphIDFromUnicode(int nUnicode); - gid16 ActualGlyphForOutput(utf16 chwGlyphID); - GrGlyphTable * GlyphTable(); - - gid16 LBGlyphID(); - - gid16 GetClassGlyphIDAt(int nClass, int nIndex); - int GetIndexInGlyphClass(int nClass, gid16 chwGlyphID); - - void SetSlotAttrsFromGlyphAttrs(GrSlotState * pslot); - - int NumFeat(); - int DefaultForFeatureAt(int ifeat); - GrFeature * FeatureWithID(int nID, int * pifeat); - GrFeature * Feature(int ifeat); - - bool RightToLeft(); - int TopDirectionLevel(); - - int VerticalOffset(); - - int NumUserDefn(); - int NumCompPerLig(); - - int ComponentIndexForGlyph(gid16 chwGlyphID, int nCompID); - int GlyphAttrValue(gid16 chwGlyphID, int nAttrID); - - bool LoggingTransduction(); - // --- - - int EmToLogUnits(int m); - int LogToEmUnits(int xys); - bool GPointToXY(gid16 chwGlyphID, int nGPoint, int * xs, int * ys); - - void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, - int * pxsWidth, int * pxsVisibleWidth); void InitPosCache() { @@ -217,7 +75,14 @@ m_dxsVisWidthSoFar = 0; } - bool IsWhiteSpace(GrSlotState * pslot); + void SetGraphics(IGrGraphics * pgg) + { + m_pgg = pgg; + } + IGrGraphics * GraphicsObject() + { + return m_pgg; + } bool StartLineContext() { @@ -304,6 +169,231 @@ return m_fParaRtl; } + //int PrevPassMaxBackup(int ipass) + //{ + // if (ipass == 0) + // return 0; + // return Pass(ipass - 1)->MaxBackup(); + //} + + DirCode InitialStrongDir() + { + return m_dircInitialStrongDir; + } + DirCode InitialTermDir() + { + return m_dircInitialTermDir; + } + + void InitializeStreams(GrTableManager * ptman, + IGrGraphics * pgg, GrCharStream * pchstrm, + int cbPrev, byte * pbPrevSegDat, int * pislotFinalBreak); + int LbSlotToSegLim(in... [truncated message content] |
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/include Modified Files: GrCommon.h GrData.h GrEngine.h GrSegment.h IGrGraphics.h IGrGraphicsDrawing.h IGrGraphicsFont.h IGrTextSource.h Added Files: GrStructs.h Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps --- NEW FILE: GrStructs.h --- /*--------------------------------------------------------------------*//*:Ignore this sentence. Copyright (C) 1999, 2001 SIL International. All rights reserved. Distributable under the terms of either the Common Public License or the GNU Lesser General Public License, as specified in the LICENSING.txt file. File: GrStructs.h Responsibility: Sharon Correll Last reviewed: Not yet. Copyright (C) 1999 by SIL International. All rights reserved. Description: Cross-platform structure definitions. ----------------------------------------------------------------------------------------------*/ #ifdef _MSC_VER #pragma once #endif #ifndef STRUCTS_INCLUDED #define STRUCTS_INCLUDED namespace gr { //:End Ignore typedef struct tagGrCharProps { unsigned long clrFore; unsigned long clrBack; int dympOffset; int ws; int ows; byte fWsRtl; int nDirDepth; byte ssv; byte ttvBold; byte ttvItalic; int dympHeight; wchar_t szFaceName[ 32 ]; wchar_t szFontVar[ 64 ]; } GrCharProps; } // namespace gr #endif // !STRUCTS_INCLUDED Index: GrCommon.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrCommon.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- GrCommon.h 9 Jun 2004 23:29:07 -0000 1.12 +++ GrCommon.h 6 Oct 2004 18:28:30 -0000 1.13 @@ -35,7 +35,6 @@ #include <string> // Project headers - #include "GrPlatform.h" #include "GrDebug.h" // Debug related definitions. Index: GrData.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrData.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GrData.h 22 Jul 2004 12:27:01 -0000 1.13 +++ GrData.h 6 Oct 2004 18:28:30 -0000 1.14 @@ -10,7 +10,7 @@ Description: Data structures needed by the Graphite engine, particularly for argument passing. - NOT to be used within FieldWorks + NOT to be used within FieldWorks. Special Note: This file needs to be used by C files. Please do not use C++ style comments; use @@ -28,25 +28,10 @@ //:End Ignore */ -namespace gr -{ +#include "GrStructs.h" -typedef struct tagLgCharRenderProps +namespace gr { - unsigned long clrFore; - unsigned long clrBack; - int dympOffset; - int ws; - int ows; - byte fWsRtl; - int nDirDepth; - byte ssv; - byte ttvBold; - byte ttvItalic; - int dympHeight; - wchar_t szFaceName[ 32 ]; - wchar_t szFontVar[ 64 ]; -} LgCharRenderProps; enum { kttvOff = 0, Index: GrEngine.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrEngine.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- GrEngine.h 16 Sep 2004 13:42:31 -0000 1.21 +++ GrEngine.h 6 Oct 2004 18:28:30 -0000 1.22 @@ -169,7 +169,7 @@ GrResult get_ScriptDirection(int * pgrfsdc, OLECHAR * prgchwErrMsg, int cchMaxErrMsg); - GrResult InterpretChrp(LgCharRenderProps * pchrp); + GrResult InterpretChrp(GrCharProps * pchrp); GrResult MakeJustifiedSegment(IGrGraphics * pgg, IGrTextSource * pgts, IGrJustifier * pgj, int ichMin, int ichLim, @@ -569,7 +569,7 @@ GrResult ReadFromGraphicsFont(IGrGraphics * pgg, bool fItalic); void DestroyEverything(); - void AdjustFontAndStyles(IGrGraphics * pgg, std::wstring & stuFaceName, LgCharRenderProps * pchrp); + void AdjustFontAndStyles(IGrGraphics * pgg, std::wstring & stuFaceName, GrCharProps * pchrp); bool CheckTableVersions(GrIStream * pgrstrm, byte *silf_tbl, int lSilfStart, byte *gloc_tbl, int lGlocStart, Index: GrSegment.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrSegment.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- GrSegment.h 16 Sep 2004 14:57:16 -0000 1.21 +++ GrSegment.h 6 Oct 2004 18:28:30 -0000 1.22 @@ -141,7 +141,7 @@ GrResult GetInitialization(int cbDat, byte * prgbDat, int * pcbDatRet); GrResult GetGlyphsAndPositions(int ichBase, IGrGraphics * pgg, - RECT rsArg, RECT rdArg, int cgidMax, int * pcchRet, utf16 * prgchGlyphs, + RECT rsArg, RECT rdArg, int cgidMax, int * pcgidRet, utf16 * prggid, int * prgxd, int * prgyd, int * prgdxdAdv); GrResult GetCharData(int ichBase, int cchMax, utf16 * prgch, int * pcchRet); GrResult GlyphToChar(int ichBase, IGrGraphics * pgg, int igbb, bool fFirst, int * pich); @@ -159,6 +159,7 @@ LgLineBreak lbPref, LgLineBreak lbWorst, int dxMaxWidth, int * pichBreak, int * pdxBreakWidth, bool fStartLine = true, bool fEndLine = true); + GrResult GetUniscribeClusters(int ichBase, IGrGraphics * pgg, int * prgigbb1stOfCluster, int cchMax, int * pcch, bool * pfClusterStart, int cfMax, int * pcf); Index: IGrGraphics.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/IGrGraphics.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- IGrGraphics.h 12 Apr 2004 10:24:25 -0000 1.8 +++ IGrGraphics.h 6 Oct 2004 18:28:30 -0000 1.9 @@ -23,10 +23,11 @@ #include "GrData.h" #endif +#include "GrStructs.h" + namespace gr { - /*---------------------------------------------------------------------------------------------- Class: IGrGraphics ----------------------------------------------------------------------------------------------*/ @@ -34,22 +35,22 @@ { public: // For drawing: - virtual GrResult InvertRect(int twLeft, int twTop, int twRight, int twBottom) = 0; - virtual GrResult DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, + virtual GrResult InvertRect(int xLeft, int yTop, int xRight, int yBottom) = 0; + virtual GrResult DrawTextExt(int x, int y, int cgid, const OLECHAR __RPC_FAR * prggid, UINT uOptions, const RECT __RPC_FAR * pRect, int __RPC_FAR * prgdx) = 0; virtual GrResult get_YUnitsPerInch(int * pyInch) = 0; - virtual GrResult SetupGraphics(LgCharRenderProps * pchrp) = 0; + virtual GrResult SetupGraphics(GrCharProps * pchrp) = 0; // Other: virtual GrResult GetFontEmSquare(int * pxyFontEmSquare) = 0; - virtual GrResult GetGlyphMetrics(int chw, + virtual GrResult GetGlyphMetrics(int gid, int * psBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY) = 0; virtual GrResult GetFontData(int nTableId, int * pcbTableSz, byte * prgb, int cbMax) = 0; - virtual GrResult XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet) = 0; + virtual GrResult XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet) = 0; virtual GrResult get_FontAscent(int* pdy) = 0; virtual GrResult get_FontDescent(int* pdy) = 0; - virtual GrResult get_FontCharProperties(LgCharRenderProps * pchrp) = 0; + virtual GrResult get_FontCharProperties(GrCharProps * pchrp) = 0; }; } // namespace gr Index: IGrGraphicsDrawing.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/IGrGraphicsDrawing.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- IGrGraphicsDrawing.h 12 Apr 2004 10:24:25 -0000 1.4 +++ IGrGraphicsDrawing.h 6 Oct 2004 18:28:30 -0000 1.5 @@ -27,10 +27,10 @@ { public: virtual GrResult InvertRect(int twLeft, int twTop, int twRight, int twBottom) = 0; - virtual GrResult DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, + virtual GrResult DrawTextExt(int x, int y, int cgid, const OLECHAR __RPC_FAR * prggid, UINT uOptions, const RECT __RPC_FAR * pRect, int __RPC_FAR * prgdx) = 0; virtual GrResult get_YUnitsPerInch(int * pyInch) = 0; - virtual GrResult SetupGraphics(LgCharRenderProps * pchrp) = 0; + virtual GrResult SetupGraphics(GrCharProps * pchrp) = 0; }; } Index: IGrGraphicsFont.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/IGrGraphicsFont.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- IGrGraphicsFont.h 12 Apr 2004 10:24:25 -0000 1.4 +++ IGrGraphicsFont.h 6 Oct 2004 18:28:30 -0000 1.5 @@ -27,15 +27,16 @@ { public: virtual GrResult GetFontEmSquare(int * pxyFontEmSquare) = 0; - virtual GrResult GetGlyphMetrics(int chw, - int * psBoundingWidth, int * pyBoundingHeight, + virtual GrResult GetGlyphMetrics(int gid, + int * pxBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY) = 0; virtual GrResult GetFontData(int nTableId, int * pcbTableSz, byte * prgb, int cbMax) = 0; - virtual GrResult XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet) = 0; + virtual GrResult XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet) = 0; virtual GrResult get_FontAscent(int* pdy) = 0; virtual GrResult get_FontDescent(int* pdy) = 0; - virtual GrResult get_FontCharProperties(LgCharRenderProps * pchrp) = 0; + // should this one be moved to IGrGraphicsDrawing? + virtual GrResult get_FontCharProperties(GrCharProps * pchrp) = 0; }; } Index: IGrTextSource.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/IGrTextSource.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- IGrTextSource.h 2 Sep 2004 20:29:02 -0000 1.6 +++ IGrTextSource.h 6 Oct 2004 18:28:30 -0000 1.7 @@ -19,12 +19,11 @@ #include "GrAppData.h" - +#include "GrStructs.h" namespace gr { - /*---------------------------------------------------------------------------------------------- Class: IGrTextSource This class provides an interface for a text source for the Graphite engine. @@ -34,7 +33,7 @@ public: virtual GrResult Fetch(int ichMin, int ichLim, utf16 * prgchBuf) = 0; virtual GrResult get_Length(int * pcch) = 0; - virtual GrResult GetCharProps(int ich, LgCharRenderProps * pchrp, + virtual GrResult GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim) = 0; virtual GrResult GetParaProps(int ich, LgParaRenderProps * pchrp, int * pichMin, int * pichLim) = 0; |
From: <sil...@li...> - 2004-10-06 18:28:58
|
Update of /cvsroot/silgraphite/silgraphite/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/src/lib Modified Files: GrUtil.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: GrUtil.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/lib/GrUtil.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GrUtil.cpp 26 Apr 2004 18:45:59 -0000 1.10 +++ GrUtil.cpp 6 Oct 2004 18:28:32 -0000 1.11 @@ -222,7 +222,7 @@ { // If no tables in the font, look in the registry; there might be another // version of the font somewhere with the Graphite tables. - LgCharRenderProps chrp; + GrCharProps chrp; pgg->get_FontCharProperties(&chrp); // utf16 rgchStyle[25]; // if (chrp.ttvBold == kttvOff) |
From: <sil...@li...> - 2004-10-06 18:28:41
|
Update of /cvsroot/silgraphite/silgraphite/contrib/fwviews In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/contrib/fwviews Modified Files: GrGraphics.cpp GrGraphics.h GrTxtSrc.cpp GrTxtSrc.h Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: GrGraphics.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/fwviews/GrGraphics.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GrGraphics.cpp 16 Apr 2004 22:26:48 -0000 1.10 +++ GrGraphics.cpp 6 Oct 2004 18:28:30 -0000 1.11 @@ -480,20 +480,20 @@ Draw a list of glyphs that are all positioned vertically the same relative to the baseline, given their offsets from each other. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, +GrResult GrGraphics::DrawTextExt(int x, int y, int cgid, const OLECHAR __RPC_FAR * prggid, UINT uOptions, const RECT __RPC_FAR * pRect, int __RPC_FAR * prgdx) { - ChkGrArrayArg(prgchw, cch); + ChkGrArrayArg(prggid, cgid); ChkGrArgPtrN(pRect); if (prgdx == NULL) { - Assert(cch <= 1); - if (cch > 1) + Assert(cgid <= 1); + if (cgid > 1) ThrowInternalError(kresUnexpected); } else { - ChkGrArrayArg(prgdx, cch); + ChkGrArrayArg(prgdx, cgid); } #ifdef BASELINE @@ -501,9 +501,9 @@ { RECT rect; StrAnsi staChar; - staChar.Assign(prgchw,cch); + staChar.Assign(prggid, cgid); StrAnsi stargdx("{"); - for (int i = 0; i < cch; i++) { + for (int i = 0; i < cgid; i++) { if (i == cch-1) stargdx.FormatAppend("%d}", *(prgdx + i)); else @@ -517,7 +517,7 @@ rect.right = 0; rect.bottom = 0; } - m_psts->OutputFormat("DrawTextExt(%d, %d, %d, \"%s\", %d, {%d, %d, %d, %d}, \"%s\")\n", x, y, cch, + m_psts->OutputFormat("DrawTextExt(%d, %d, %d, \"%s\", %d, {%d, %d, %d, %d}, \"%s\")\n", x, y, cgid, staChar.Chars(), uOptions, rect.left, rect.top, rect.right, rect.bottom, stargdx.Chars()); } @@ -536,7 +536,7 @@ return kresOk; // must explicitly call W API so get wide version on Win 9x - if (!::ExtTextOutW(m_hdc, x, y, uOptions, pRect, prgchw, cch, prgdx)) + if (!::ExtTextOutW(m_hdc, x, y, uOptions, pRect, prggid, cgid, prgdx)) ThrowInternalError(kresUnexpected, "ExtTextOutW failed"); #ifdef BASELINE @@ -758,14 +758,14 @@ /*---------------------------------------------------------------------------------------------- Get coordinates for a point in a glyph. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet) +GrResult GrGraphics::XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet) { ChkGrOutPtr(pxRet); ChkGrOutPtr(pyRet); #ifdef BASELINE if (m_fFile) - m_psts->OutputFormat("XYFromGlyphpoint(%d, %d, ptr, ptr)\n", chw, nPoint); + m_psts->OutputFormat("XYFromGlyphpoint(%d, %d, ptr, ptr)\n", gid, nPoint); #endif CheckDc(); @@ -774,13 +774,13 @@ const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}}; WORD flag = GGO_GLYPH_INDEX | GGO_NATIVE; - UINT cbBuf = ::GetGlyphOutline(m_hdcMeasure, chw, flag, &gm, 0, NULL, &mat2); + UINT cbBuf = ::GetGlyphOutline(m_hdcMeasure, gid, flag, &gm, 0, NULL, &mat2); if (cbBuf <= 0) ThrowInternalError(kresUnexpected, "First GetGlyphOutline in XYFromGlyphPoint failed"); byte * pGlyphData = NewObj byte[cbBuf]; if (!pGlyphData) return WarnHr(kresOutOfMemory); - if (GDI_ERROR == ::GetGlyphOutline(m_hdcMeasure, chw, flag, &gm, cbBuf, pGlyphData,&mat2)) + if (GDI_ERROR == ::GetGlyphOutline(m_hdcMeasure, gid, flag, &gm, cbBuf, pGlyphData,&mat2)) ThrowInternalError(kresUnexpected, "Second GetGlyphOutline in XYFromGlyphPoint failed"); int dxLogPerInch = GetXInch(); @@ -1028,7 +1028,7 @@ super/subscript are ignored, as is baseline adjust; client is presumed to have handled them. Sets colors and HFONT. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::SetupGraphics(LgCharRenderProps * pchrp) +GrResult GrGraphics::SetupGraphics(GrCharProps * pchrp) { ChkGrArgPtr(pchrp); #ifdef BASELINE @@ -1038,7 +1038,7 @@ // pchrp->fBold, pchrp->dympHeight, pchrp->szFaceName, pchrp->clrFore, pchrp->clrBack); #endif - const int cbFontOffset = offsetof(LgCharRenderProps, ttvBold); + const int cbFontOffset = offsetof(GrCharProps, ttvBold); // if the info related to choosing HFONT is different, make a new HFONT if (!m_hfont || memcmp(((byte *)pchrp) + cbFontOffset, ((byte *)&m_chrp) + cbFontOffset, isizeof(m_chrp) - cbFontOffset)) @@ -1116,9 +1116,9 @@ Fill in the argument with information about the properties that are selected into the device context. Assumes SetupGraphics has been called. ----------------------------------------------------------------------------------------------*/ -GrResult GrGraphics::get_FontCharProperties(LgCharRenderProps * pchrp) +GrResult GrGraphics::get_FontCharProperties(GrCharProps * pchrp) { - memcpy(pchrp, &m_chrp, isizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, isizeof(GrCharProps)); return kresOk; } Index: GrGraphics.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/fwviews/GrGraphics.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GrGraphics.h 16 Apr 2004 22:26:48 -0000 1.5 +++ GrGraphics.h 6 Oct 2004 18:28:30 -0000 1.6 @@ -40,13 +40,13 @@ return cref; } - virtual GrResult InvertRect(int twLeft, int twTop, int twRight, int twBottom); + virtual GrResult InvertRect(int xLeft, int yTop, int xRight, int yBottom); virtual GrResult put_ForeColor(int nRGB); virtual GrResult put_BackColor(int nRGB); - virtual GrResult DrawRectangle(int twLeft, int twTop, int twRight, int twBottom); + virtual GrResult DrawRectangle(int xLeft, int yTop, int xRight, int yBottom); virtual GrResult DrawHorzLine(int xLeft, int xRight, int y, int dyHeight, int cdx, int * prgdx, int * pdxStart); - virtual GrResult DrawLine(int twXStart, int twYStart, int twXEnd, int twYEnd); + virtual GrResult DrawLine(int xStart, int yStart, int xEnd, int yEnd); virtual GrResult DrawText(int ixTwips, int iyTwips, int cch, const OLECHAR * prgch, int nStretch); virtual GrResult DrawTextExt(int x, int y, int cch, const OLECHAR __RPC_FAR * prgchw, @@ -57,20 +57,20 @@ int dxStretch, int * pdx); virtual GrResult GetClipRect(int * pxLeft, int * pyTop, int * pxRight, int * pyBottom); virtual GrResult GetFontEmSquare(int * pxyFontEmSquare); - virtual GrResult GetGlyphMetrics(int chw, + virtual GrResult GetGlyphMetrics(int gid, int * psBoundingWidth, int * pyBoundingHeight, int * pxBoundingX, int * pyBoundingY, int * pxAdvanceX, int * pyAdvanceY); virtual GrResult GetFontData(int nTableId, int * pcbTableSz, byte * prgb, int cbMax); - virtual GrResult XYFromGlyphPoint(int chw, int nPoint, int * pxRet, int * pyRet); + virtual GrResult XYFromGlyphPoint(int gid, int nPoint, int * pxRet, int * pyRet); virtual GrResult get_FontAscent(int* pdy); virtual GrResult get_FontDescent(int* pdy); - virtual GrResult get_FontCharProperties(LgCharRenderProps * pchrp); + virtual GrResult get_FontCharProperties(GrCharProps * pchrp); virtual GrResult ReleaseDC(); virtual GrResult get_XUnitsPerInch(int * pxInch); virtual GrResult put_XUnitsPerInch(int xInch); virtual GrResult get_YUnitsPerInch(int * pyInch); virtual GrResult put_YUnitsPerInch(int yInch); - virtual GrResult SetupGraphics(LgCharRenderProps * pchrp); + virtual GrResult SetupGraphics(GrCharProps * pchrp); virtual GrResult PushClipRect(RECT rcClip); virtual GrResult PopClipRect(); @@ -114,7 +114,7 @@ // If we have a distinct measure DC, we save its original font here to restore into it. HFONT m_hfontOldMeasure; HFONT m_hfont; // current font selected into DC, if any - LgCharRenderProps m_chrp; + GrCharProps m_chrp; // Vertical and horizontal resolution. Zero indicates not yet initialized. int m_xInch; Index: GrTxtSrc.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/fwviews/GrTxtSrc.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GrTxtSrc.cpp 17 Jul 2003 10:16:31 -0000 1.4 +++ GrTxtSrc.cpp 6 Oct 2004 18:28:30 -0000 1.5 @@ -34,7 +34,7 @@ /*---------------------------------------------------------------------------------------------- Constructors. ----------------------------------------------------------------------------------------------*/ -GrSimpleTextSource::GrSimpleTextSource(OLECHAR * pszText, LgCharRenderProps & chrp, +GrSimpleTextSource::GrSimpleTextSource(OLECHAR * pszText, GrCharProps & chrp, OLECHAR * prgchFontVar, int ichFontVar) { Assert(ichFontVar < isizeof(m_rgchFontVar)); @@ -46,7 +46,7 @@ memcpy(m_prgchText, pszText, isizeof(OLECHAR) * m_cchLength); m_prgchText[m_cchLength] = 0; // zero-terminate - memcpy(&m_chrp, &chrp, isizeof(LgCharRenderProps)); + memcpy(&m_chrp, &chrp, isizeof(GrCharProps)); memset(m_rgchFontVar, 0, isizeof(m_rgchFontVar)); memcpy(m_rgchFontVar, prgchFontVar, min(ichFontVar, isizeof(m_rgchFontVar))); } @@ -79,14 +79,14 @@ It is possible they also apply to a larger range. ich is in rendered characters. ----------------------------------------------------------------------------------------------*/ -GrResult GrSimpleTextSource::GetCharProps(int ich, LgCharRenderProps * pchrp, +GrResult GrSimpleTextSource::GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim) { ChkGrArgPtrN(pchrp); ChkGrArgPtrN(pichLim); ChkGrArgPtrN(pichMin); - memcpy(pchrp, &m_chrp, isizeof(LgCharRenderProps)); + memcpy(pchrp, &m_chrp, isizeof(GrCharProps)); *pichMin = 0; *pichLim = m_cchLength; return kresOk; Index: GrTxtSrc.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/fwviews/GrTxtSrc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GrTxtSrc.h 12 Apr 2004 10:24:23 -0000 1.3 +++ GrTxtSrc.h 6 Oct 2004 18:28:30 -0000 1.4 @@ -26,7 +26,7 @@ { public: // Constructor: - GrSimpleTextSource(OLECHAR * pszText, LgCharRenderProps & chrp, + GrSimpleTextSource(OLECHAR * pszText, GrCharProps & chrp, OLECHAR * prgchFontVar, int ichFontVar); ~GrSimpleTextSource(); @@ -46,7 +46,7 @@ virtual GrResult Fetch(int ichMin, int ichLim, OLECHAR * prgchBuf); virtual GrResult get_Length(int * pcch); - virtual GrResult GetCharProps(int ich, LgCharRenderProps * pchrp, + virtual GrResult GetCharProps(int ich, GrCharProps * pchrp, int * pichMin, int * pichLim); virtual GrResult GetParaProps(int ich, LgParaRenderProps * pchrp, int * pichMin, int * pichLim); @@ -77,7 +77,7 @@ OLECHAR * m_prgchText; int m_cchLength; OLECHAR m_rgchFontVar[64]; - LgCharRenderProps m_chrp; + GrCharProps m_chrp; }; |
From: <sil...@li...> - 2004-10-06 18:28:40
|
Update of /cvsroot/silgraphite/silgraphite/src/GrCompiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2214/src/GrCompiler Modified Files: main.cpp Log Message: Synchronized with FW changelist #11847: refactor classes; change LgCharRenderProps -> GrCharProps Index: main.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrCompiler/main.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- main.cpp 22 Jul 2004 11:43:25 -0000 1.13 +++ main.cpp 6 Oct 2004 18:28:30 -0000 1.14 @@ -81,6 +81,10 @@ if (argc < 3 + cargExtra) { std::cout << "\nusage: grcompiler [options] gdl-file input-font-file [output-font-file] [output-font-name]\n"; + std::cout << "\nOptions:\n"; + std::cout << " /d - output debugger files\n"; + std::cout << " /nNNNN - set name table start location\n"; + std::cout << " /vN - set font table version number\n"; return 2; } |
From: <sil...@li...> - 2004-09-17 09:09:15
|
Update of /cvsroot/silgraphite/silgraphite/src/GrCompiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8939 Modified Files: main.h Log Message: need to use gr namespace Index: main.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrCompiler/main.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- main.h 2 Sep 2004 21:26:03 -0000 1.15 +++ main.h 17 Sep 2004 09:08:57 -0000 1.16 @@ -34,6 +34,7 @@ #include "Platform.h" #endif +using namespace gr; /************************************************************************************* Interfaces. *************************************************************************************/ |
From: <sil...@li...> - 2004-09-16 15:37:06
|
Update of /cvsroot/silgraphite/silgraphite/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26701 Modified Files: Platform.cpp Log Message: naive implementation of Platform_8bitToUnicode for non-win32 Index: Platform.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/lib/Platform.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Platform.cpp 16 Apr 2004 22:26:51 -0000 1.12 +++ Platform.cpp 16 Sep 2004 15:36:58 -0000 1.13 @@ -285,6 +285,12 @@ return dest_len; } +size_t Platform_8bitToUnicode(int nCodePage, const char * prgchsSrc, int cchsSrc, + utf16 * prgchwDst, int cchwDst) +{ + return Platform_AnsiToUnicode(prgchsSrc, cchsSrc, prgchwDst, cchwDst); +} + // char * itoa(int value, char *string, int radix) // { |
From: <sil...@li...> - 2004-09-16 14:58:30
|
Update of /cvsroot/silgraphite/silgraphite/src/GrEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17713 Modified Files: GrSegment.cpp Log Message: add GetUniscribeGlyphsAndPositions Index: GrSegment.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrSegment.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- GrSegment.cpp 2 Sep 2004 20:29:03 -0000 1.25 +++ GrSegment.cpp 16 Sep 2004 14:58:14 -0000 1.26 @@ -5645,5 +5645,92 @@ } +/*---------------------------------------------------------------------------------------------- + Return information about the positioning of glyphs as appropriate for Uniscribe. + The advance widths returned are the natural ones (what would be applied if no smart + rendering were happening), and the x-offsets are the difference between the + natural location of the glyph and what is produced by Graphite. The y-offset + is the same as GetGlyphsAndPositions. + + This is an experimental method. Its behavior may change signficantly in the future. +----------------------------------------------------------------------------------------------*/ +GrResult GrSegment::GetUniscribeGlyphsAndPositions(int ichBase, IGrGraphics * pgg, + RECT rs, RECT rd, int cgidMax, int *pcgidRet, utf16 * prgchGlyphs, + int * prgxd, int * prgyd, int * prgdxdAdv) +{ + ChkGrArgPtr(pgg); + ChkGrOutPtr(pcgidRet); + ChkGrArrayArg(prgxd, cgidMax); + ChkGrArrayArg(prgyd, cgidMax); + ChkGrArrayArg(prgdxdAdv, cgidMax); + + GrResult res; + + SetUpGraphics(ichBase, pgg, true); + + if (m_fJustify) + { + res = ComputeDimensions(ichBase, pgg); + if (ResultFailed(res)) + { + RestoreFont(pgg); + ReturnResult(res); + } + } + + int cgbb = NumGbb(); + *pcgidRet = cgbb; + if (cgidMax < cgbb) + { + res = (cgidMax == 0) ? kresFalse : kresInvalidArg; + RestoreFont(pgg); + ReturnResult(res); + } + + if (m_dysAscent < 0) + { + res = ComputeDimensions(ichBase, pgg); + if (ResultFailed(res)) + { + RestoreFont(pgg); + ReturnResult(res); + } + } + + int * rgxdTmp = new int[cgidMax]; + int * rgdxdAdvTmp = new int[cgidMax]; + res = GetGlyphsAndPositions(ichBase, pgg, rs, rd, cgidMax, pcgidRet, + prgchGlyphs, rgxdTmp, prgyd, rgdxdAdvTmp); + if (ResultFailed(res)) + { + delete[] rgxdTmp; + delete[] rgdxdAdvTmp; + RestoreFont(pgg); + ReturnResult(res); + } + + int xdLeft = ScaleX(0, rs, rd); + int xdXPosNatural = xdLeft; + for (int igbb = 0; igbb < *pcgidRet; igbb++) + { + int islout = SlotIndexForGbb(igbb); + GrSlotOutput * pslout = OutputSlot(islout); + int dxsAdvNatural = pslout->AdvanceXMetric(); + int dxdAdvNatural = ScaleX(dxsAdvNatural, rs, rd) - xdLeft; + prgdxdAdv[igbb] = dxdAdvNatural; + prgxd[igbb] = rgxdTmp[igbb] - xdXPosNatural; + + xdXPosNatural += dxdAdvNatural; + } + + delete[] rgxdTmp; + delete[] rgdxdAdvTmp; + + RestoreFont(pgg); + + ReturnResult(res); + +} + } // namespace gr |
From: <sil...@li...> - 2004-09-16 14:57:24
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17441 Modified Files: GrSegment.h Log Message: add GetUniscribeGlyphsAndPositions Index: GrSegment.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrSegment.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- GrSegment.h 2 Sep 2004 20:29:02 -0000 1.20 +++ GrSegment.h 16 Sep 2004 14:57:16 -0000 1.21 @@ -165,6 +165,9 @@ GrResult GetUniscribePositions(int ichBase, IGrGraphics * pgg, RECT rs, RECT rd, int cgidMax, int * pcgidRet, int * prgxd, int * prgyd, int * prgdxdAdv); + GrResult GetUniscribeGlyphsAndPositions(int ichBase, IGrGraphics * pgg, + RECT rsArg, RECT rdArg, int cgidMax, int * pcchRet, utf16 * prgchGlyphs, + int * prgxd, int * prgyd, int * prgdxdAdv); // Other public methods: |
From: <sil...@li...> - 2004-09-16 14:47:22
|
Update of /cvsroot/silgraphite/silgraphite/contrib/pangomod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15160 Modified Files: pangographite.cpp Log Message: use GetUniscribeGlyphsAndPositions Index: pangographite.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/pangomod/pangographite.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pangographite.cpp 30 Aug 2004 13:58:51 -0000 1.5 +++ pangographite.cpp 16 Sep 2004 14:47:13 -0000 1.6 @@ -21,6 +21,7 @@ */ #include <pango/pango-glyph.h> +#include "GrResult.h" #include "GrTextSrc.h" #include "GrGraphics.h" #include "GrClient.h" @@ -118,44 +119,61 @@ prgyd = new int[n_chars]; prgdxdAdv = new int[n_chars]; - pgrseg->GetGlyphsAndPositions(0, pgrfx, + pgrseg->GetUniscribeGlyphsAndPositions(0, pgrfx, rs, rd, n_chars, &n_chars, prgchGlyphs, prgxd, prgyd, prgdxdAdv); pango_glyph_string_set_size (glyphs, n_chars); PangoGlyph index; PangoRectangle logical_rect; + int prev_offset = 0; + for (int i=0; i<n_chars; i++) { //g_message("char %d", i); //glyphs->glyphs[i].glyph = pango_fc_font_get_glyph ((PangoFcFont *) xftfont, prgchGlyphs[i]); glyphs->glyphs[i].glyph = prgchGlyphs[i]; // which of these 2??? glyphs->glyphs[i].geometry.y_offset = prgyd[i]*PANGO_SCALE; + + glyphs->glyphs[i].geometry.x_offset = PANGO_SCALE * prgxd[i]; + +#if 0 + // pango x offset is graphite offset - previous offset - previous width + #if 1 + glyphs->glyphs[i].geometry.x_offset = PANGO_SCALE * prgxd[i]; + #else if (i) glyphs->glyphs[i].geometry.x_offset = PANGO_SCALE * (prgxd[i] - prev_offset - PANGO_PIXELS(logical_rect.width)); else glyphs->glyphs[i].geometry.x_offset = 0; + #endif #if 0 if (glyphs->glyphs[i].geometry.x_offset) { - g_message("glyphs %d xoffset %d (%d %d %d)", i, glyphs->glyphs[i].geometry.x_offset, - prgxd[i], prev_offset, PANGO_PIXELS(logical_rect.width)); + g_message("glyphs %d xoffset %d (%d %d %d) %d", i, glyphs->glyphs[i].geometry.x_offset, + prgxd[i], prev_offset, PANGO_PIXELS(logical_rect.width), prgdxdAdv[i]); + } + else + { + g_message("glyphs %d (%d %d %d) %d", i, + prgxd[i], prev_offset, PANGO_PIXELS(logical_rect.width), prgdxdAdv[i]); } #endif prev_offset = prgxd[i]; +#endif pango_font_get_glyph_extents (xftfont, glyphs->glyphs[i].glyph, NULL, &logical_rect); glyphs->glyphs[i].geometry.width = logical_rect.width; //glyphs->log_clusters[i] = prgdxdAdv[i]; - pgrseg->GlyphToChar(0, pgrfx, i, 1, &(glyphs->log_clusters[i])) -; + pgrseg->GlyphToChar(0, pgrfx, i, 1, &(glyphs->log_clusters[i])); + #if 0 - g_message("char %d complete glyph %d xoff %d yoff %d width %d logclust %d", + g_message("%d complete glyph %d xoff %d yoff %d width %d logclust %d", i, glyphs->glyphs[i].glyph, - glyphs->glyphs[i].geometry.x_offset, glyphs->glyphs[i].geometry.y_offset, - glyphs->glyphs[i].geometry.width, glyphs->log_clusters[i]); + PANGO_PIXELS(glyphs->glyphs[i].geometry.x_offset), PANGO_PIXELS(glyphs->glyphs[i].geometry.y_offset), + PANGO_PIXELS(glyphs->glyphs[i].geometry.width), glyphs->log_clusters[i]); #endif //glyphs->glyphs[i].geometry.width = prgdxdAdv[i]; @@ -173,150 +191,88 @@ //delete pgrseg; //delete pgrfx; //dtor cleans up font delete xftgreng; + #ifdef WDGDEBUG + g_message("%d glyphs:%d:%s", glyphs->num_glyphs, length, text ); + #endif } -#if 0 // from XftHelloWorld - GrGraphics * pgrfx = new GrGraphics(xftdraw, xftfont); +#if 0 +GrResult GrSegment::GetUniscribePositions(int ichBase, IGrGraphics * pgg, + RECT rs, RECT rd, int cgidMax, int *pcgidRet, + int * prgxd, int * prgyd, int * prgdxdAdv) +{ + ChkGrArgPtr(pgg); + ChkGrOutPtr(pcgidRet); + ChkGrArrayArg(prgxd, cgidMax); + ChkGrArrayArg(prgyd, cgidMax); + ChkGrArrayArg(prgdxdAdv, cgidMax); - GrSegment * pgrseg; - int cchSeg; // how many characters fit in the segment - int dxWidth; // width of resulting segment - LgEndSegmentType est; // why the segment was ended - byte rgbNextSeg[256]; - int ciNextSeg; - OLECHAR errmsg[128]; - int dichContext; + GrResult res; - xftgreng.InitRenderer(pgrfx, NULL, 0); -// OutputDebugStringA("running FindBreakPoint\n"); - GrResult res = xftgreng.FindBreakPoint(pgrfx, pgrtext, - 0, // start at the beginning of the string - 100, 100, // try to handle entire string if possible - false, // need final break - true, // is this the first segment on the line? - 60000, // width available - klbWordBreak, // preferred kind of line break - klbClipBreak, // worst-case line break - ktwshAll, // standard handling of trailing white space - false, // paragraph is left-to-right - &pgrseg, - &cchSeg, &dxWidth, &est, - 0, NULL, // no preceding segment to handle - 256, rgbNextSeg, &ciNextSeg, // info for following segment, exception thrown if this missing - &dichContext, // index of first char of interest to following seg - errmsg, 128); // for returning an error message -// OutputDebugStringA("ran FindBreakPoint\n"); - if (res != kresOk) + SetUpGraphics(ichBase, pgg, true); + + if (m_fJustify) { - std::cerr << "Could not create segment." << std::endl; - delete pgrtext; - delete pgrfx; - //delete greng; - return -1; + res = ComputeDimensions(ichBase, pgg); + if (ResultFailed(res)) + { + RestoreFont(pgg); + ReturnResult(res); + } } - int dxHeight; - int dwX = x, dwY = y; - res = pgrseg->Extent(0, pgrfx, &dxWidth, &dxHeight); - RECT rSrc; - //INT adj = this->GetAdjustAscent(aDC); - //dwY -= adj; - rSrc.top = -dwY; - rSrc.left = -dwX; - rSrc.right = dxWidth - dwX; - rSrc.bottom = dxHeight - dwY; - RECT rDst; - rDst.top = 0; - rDst.left = 0; - rDst.right = dxWidth; - rDst.bottom = dxHeight; -// OutputDebugStringA("Drawing Segment\n"); - pgrseg->DrawSegment(0, pgrfx, rSrc, rDst, &dxWidth); -// OutputDebugStringA("Drew Segment\n"); - delete pgrseg; - delete pgrtext; - delete pgrfx; //dtor cleans up font - //delete greng; -#endif -#if 0 // from HelloWorld - hdc = BeginPaint(hWnd, &ps); - - HFONT hFont; - LOGFONT lf; - memset(&lf, '\0', sizeof(LOGFONT)); - lf.lfCharSet = DEFAULT_CHARSET; - lf.lfHeight = -MulDiv(12, GetDeviceCaps(hdc, LOGPIXELSY), 72); - //strcpy(lf.lfFaceName, "Doulos SIL"); - strcpy(lf.lfFaceName, "SILDoulos PigLatinDemo"); - hFont = CreateFontIndirect(&lf); - GrGraphics * pgrfx = new GrGraphics(); - if (pgrfx->Initialize(hdc) != kresOk) - MessageBox(hWnd, "GrGraphics didn't initialize", "", MB_OK); - pgrfx->SetFont(hFont); + int cgbb = NumGbb(); + *pcgidRet = cgbb; + if (cgidMax < cgbb) + { + res = (cgidMax == 0) ? kresFalse : kresInvalidArg; + RestoreFont(pgg); + ReturnResult(res); + } - LgCharRenderProps * pchrp = new LgCharRenderProps(); - memset(pchrp, '\0', sizeof(LgCharRenderProps)); - pchrp->dympHeight = 24000; // font size in millipoints - //could set szFaceName for consistency but ignored - //wcscpy(pchrp->szFaceName, L"Doulos SIL"); - //wcscpy(pchrp->szFaceName, L"SILDoulos PigLatinDemo"); - pchrp->clrBack = RGB(255, 255, 255); //white - pchrp->clrFore = RGB(0, 0, 0); //black - pgrfx->SetupGraphics(pchrp); - GrTextSrc * pgrtext; - //pgrtext = new GrTextSrc(L"Now i\x0303\x0301s the time to render in Graphite", *pchrp, L"", 0); - pgrtext = new GrTextSrc(L"Hello World!", *pchrp, L"", 0); - GrSegment * pgrseg; - int cchSeg; // how many characters fit in the segment - int dxWidth; // width of resulting segment - LgEndSegmentType est; // why the segment was ended - byte rgbNextSeg[256]; - int ciNextSeg; - OLECHAR errmsg[128]; - int dichContext; - int iLen; + if (m_dysAscent < 0) + { + res = ComputeDimensions(ichBase, pgg); + if (ResultFailed(res)) + { + RestoreFont(pgg); + ReturnResult(res); + } + } - pgrtext->get_Length(&iLen); - res = greng.InitRenderer(pgrfx, NULL, 0); - if (res != kresOk) - MessageBox(hWnd, "Could not initialize engine", "", MB_OK); - res = greng.FindBreakPoint(pgrfx, pgrtext, - 0, // start at the beginning of the string - iLen, iLen, // try to handle entire string if possible - false, // need final break - true, // is this the first segment on the line? - 60000, // width available - klbWordBreak, // preferred kind of line break - klbClipBreak, // worst-case line break - ktwshAll, // standard handling of trailing white space - false, // paragraph is left-to-right - &pgrseg, - &cchSeg, &dxWidth, &est, - 0, NULL, // no preceding segment to handle - 256, rgbNextSeg, &ciNextSeg, // info for following segment, exception thrown if this missing - &dichContext, // index of first char of interest to following seg - errmsg, 128); // for returning an error message - if (res != kresOk) - MessageBox(hWnd, "Could not create segment", "", MB_OK); - - RECT rSrc; - rSrc.top = -30; - rSrc.left = -30; - rSrc.right = 66; - rSrc.bottom = 66; - RECT rDst; - rDst.top = 0; - rDst.left = 0; - rDst.right = 96; - rDst.bottom = 96; - pgrseg->DrawSegment(0, pgrfx, rSrc, rDst, &dxWidth); - - delete pgrseg; - delete pgrtext; - delete pchrp; - delete pgrfx; //dtor cleans up font - - EndPaint(hWnd, &ps); //cleans up dc -#endif + int * rgxdTmp = new int[cgidMax]; + int * rgdxdAdvTmp = new int[cgidMax]; + res = GetGlyphsAndPositions(ichBase, pgg, rs, rd, cgidMax, pcgidRet, + NULL, rgxdTmp, prgyd, rgdxdAdvTmp); + if (ResultFailed(res)) + { + delete[] rgxdTmp; + delete[] rgdxdAdvTmp; + RestoreFont(pgg); + ReturnResult(res); + } + + int xdLeft = ScaleX(0, rs, rd); + int xdXPosNatural = xdLeft; + for (int igbb = 0; igbb < *pcgidRet; igbb++) + { + int islout = SlotIndexForGbb(igbb); + GrSlotOutput * pslout = OutputSlot(islout); + int dxsAdvNatural = pslout->AdvanceXMetric(); + int dxdAdvNatural = ScaleX(dxsAdvNatural, rs, rd) - xdLeft; + prgdxdAdv[igbb] = dxdAdvNatural; + prgxd[igbb] = rgxdTmp[igbb] - xdXPosNatural; + + xdXPosNatural += dxdAdvNatural; + } + delete[] rgxdTmp; + delete[] rgdxdAdvTmp; + + RestoreFont(pgg); + + ReturnResult(res); + +} +#endif |
From: <sil...@li...> - 2004-09-16 14:44:40
|
Update of /cvsroot/silgraphite/silgraphite/contrib/pangomod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14402 Modified Files: GrTextSrc.cpp silgraphite-fc.c testtext.c Log Message: use g_utf8_to_utf16 in GrTextSrc alternative fonts in testtext fontdesc is debug only now Index: GrTextSrc.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/pangomod/GrTextSrc.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GrTextSrc.cpp 27 Aug 2004 10:19:01 -0000 1.4 +++ GrTextSrc.cpp 16 Sep 2004 14:44:31 -0000 1.5 @@ -3,6 +3,7 @@ #include <iostream> #include <glib/gunicode.h> #include <glib/gmessages.h> +#include <glib/gmem.h> GrTextSrc::GrTextSrc(const char* pszText, int length, LgCharRenderProps & chrp, const char * prgchFontVar, int ichFontVar) @@ -12,8 +13,14 @@ #endif m_cchLength = g_utf8_strlen (pszText, length); // std::cout << "GrTextSrc8 " << pszText << " length " << m_cchLength << std::endl; + + + #if 0 m_prgchText = new utf16[m_cchLength + 1]; utf16ncpy(m_prgchText, pszText, m_cchLength); + #else + m_prgchText = g_utf8_to_utf16(pszText, length, NULL, NULL, NULL); + #endif //memcpy(m_prgchText, pszText, isizeof(OLECHAR) * m_cchLength); m_prgchText[m_cchLength] = '\0'; // zero-terminate @@ -55,7 +62,11 @@ GrTextSrc::~GrTextSrc() { + #if 1 + g_free(m_prgchText); + #else delete [] m_prgchText; + #endif } GrResult GrTextSrc::Fetch(int ichMin, int ichLim, utf16 * prgchBuf) Index: silgraphite-fc.c =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/pangomod/silgraphite-fc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- silgraphite-fc.c 27 Aug 2004 10:19:01 -0000 1.3 +++ silgraphite-fc.c 16 Sep 2004 14:44:31 -0000 1.4 @@ -370,10 +370,8 @@ PangoLanguage *lang, gunichar wc) { - PangoFontDescription *desc; PangoFcFont *fcfont; char * fontcap; - char *fontdesc; #ifdef WDGDEBUG g_message("graphite_engine_covers %s", pango_language_to_string(lang)); @@ -409,13 +407,16 @@ } + #ifdef WDGDEBUG + PangoFontDescription *desc; + char *fontdesc; + desc = pango_font_describe(font); fontdesc = pango_font_description_to_string (desc); pango_font_description_free(desc); - #ifdef WDGDEBUG g_message("fontdesc %s", fontdesc); - #endif g_free(fontdesc); + #endif fcfont = (PangoFcFont *)font; //patt = fcfont->font_pattern; //FcPatternGet (patt, "fontcap", 0, val); Index: testtext.c =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/contrib/pangomod/testtext.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- testtext.c 30 Aug 2004 13:56:35 -0000 1.2 +++ testtext.c 16 Sep 2004 14:44:31 -0000 1.3 @@ -2462,10 +2462,18 @@ /* Change default font throughout the widget */ #if 0 + #if 1 + PangoFontDescription *font_desc = pango_font_description_from_string ("Doulos SIL 20"); + #else PangoFontDescription *font_desc = pango_font_description_from_string ("SimpleGraphiteFont 14"); + #endif + #else + #if 1 + PangoFontDescription *font_desc = pango_font_description_from_string ("Padauk 24"); #else PangoFontDescription *font_desc = pango_font_description_from_string ("SILDoulos PigLatinDemo 14"); #endif + #endif #if 1 gtk_widget_modify_font (view->text_view, font_desc); #endif |
From: <sil...@li...> - 2004-09-16 14:39:49
|
Update of /cvsroot/silgraphite/silgraphite/src/GrEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13435 Modified Files: GrEngine.cpp Log Message: pbPrevSegDatLocal is a array so delete[] Index: GrEngine.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrEngine.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- GrEngine.cpp 16 Sep 2004 13:42:14 -0000 1.36 +++ GrEngine.cpp 16 Sep 2004 14:39:36 -0000 1.37 @@ -1187,7 +1187,7 @@ } delete pchstrm; - delete pbPrevSegDatLocal; + delete [] pbPrevSegDatLocal; if (m_fUseSepBase) SwitchGraphicsFont(pgg, false); |
Update of /cvsroot/silgraphite/silgraphite/rpm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3685/rpm Added Files: README.txt font-tools-silgraphite.spec fonts-silgraphite-doulos.spec fonts-silgraphite-examples.spec gdlcomp.spec silgraphite.spec Log Message: add draft rpm spec files from yosch --- NEW FILE: README.txt --- This is a set of draft rpm specs to package the various SILGraphite related libraries, tools and fonts. Use them to build your packages and deploy SILGraphite on your platform. ( Note: these templates have been built and tested on a Mandrake GNU/Linux 9.2 system. See the Mdk RPM howto: http://qa.mandrakesoft.com/twiki/bin/view/Main/RpmHowTo ) Comments and feedback welcome. --- NEW FILE: font-tools-silgraphite.spec --- %define name font-tools-silgraphite %define version 1.0 %define release 1sil Name: %{name} Version: %{version} Release: %{release} License: Artistic Group: Development/Perl URL: http://scripts.sil.org Source: http://scripts.sil.org/download/%{name}-%{version}.tar.bz2 Summary: A set of font tools (perl scripts) for SILGraphite BuildRoot: %_tmppath/%name-buildroot #Buildrequires: perl-modulefoo perl-modulebar Requires: perl %description A set of font tools (perl scripts) for the SILGraphite smart rendering engine. These scripts are provided to help you with the creation, adaptation and documentation of gdl (Graphite Description Language) source files. They use the following perl modules: Font::TTF SIL::Graphite SIL::GrPerl %prep %setup -q #%patch1 -p0 %build %configure %make %install rm -rf %buildroot %makeinstall %post %postun %clean rm -rf %buildroot %files %defattr(-,root,root,0755) %_bindir/* %doc COPYING README INSTALL Changelog AUTHORS ISSUES Docs/ %changelog * Mon Jun 10 2003 Nicolas Spalinger <nicolas.spalinger@sil.or> 1.0sil - first spec submitted to SILGraphite-devel --- NEW FILE: fonts-silgraphite-doulos.spec --- %define family doulos %define version 1.0 %define release 1sil %define name fonts-silgraphite-%{family} %define fontdir fonts/silgraphite/%{family} Name: %{name} Version: %{version} Release: %{release} License: Distributable Group: System/Fonts/SILGraphite Source: http://scripts.sil.org/download/%{name}-%{version}.tar.bz2 URL: http://www.sil.org/computing/fonts/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: freetype-tools Requires: freetype, XFree86-xfs Provides: %{name} Prereq: chkfontpath, fontconfig Summary: The SIL Doulos Unicode IPA smart font (with gdl source code) %description The Doulos smart font is part of a new family of fonts based around new generation extensible rendering technologies. It contains all the symbols defined in Unicode 3.0 for the International Phonetic Alphabet and is supplied in Regular typeface. It also covers the older SILIPA93 font, (excluding positional variants) Latin-1 codepage, including ASCII, and the Mac Roman codepage. The extra smart behaviours are defined by GDL (Graphite Description Language) rules compiled into special font tables. You will find the corresponding gdl source code in: /usr/share/doc/fonts-silgraphite-doulos*/gdl/ In addition to the fonts themselves, this package includes Keyman(c) keyboard files (version 5 and 6) which simplify the typing of IPA text. The corresponding keyboard sources are included to allow you to adapt easily the keyboard to your needs. Tools to convert to and from Unicode are also included: xml specification, dtd and TECkit file. See /usr/share/doc/*doulos*. Future work aims to extend this font into other faces and also to provide other fonts with extended character sets to provide for the needs of linguistic analysis. Breaking new ground is not without its problems. Please be aware that this font is still in beta stage. Feedback and comments welcome. For more details visit the NRSI's (Non-Roman Script Initiative) website: http://scripts.sil.org %prep %setup -q -c -n %{name} %build cd %{name}-%{version} mkdir -p fonts mv *.ttf fonts/ mv fonts .. mv * .. cd .. cd fonts mkfontscale . mkfontdir . fc-cache -v . %install rm -rf %{buildroot} cd fonts mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{fontdir} cp *.ttf fonts.* $RPM_BUILD_ROOT%{_datadir}/%{fontdir} %clean rm -rf %{buildroot} %post if test $1 -eq 1 then /usr/sbin/chkfontpath --add %{_datadir}/%{fontdir} fi %preun if test $1 -eq 0 then /usr/sbin/chkfontpath --remove %{_datadir}/%{fontdir} fi %postun # 0 means a real uninstall if [ "$1" = "0" ]; then [ -x %_sbindir/chkfontpath ] && \ %_sbindir/chkfontpath -q -r %{_datadir}/%{fontdir} %{_bindir}/fc-cache %{_datadir}/fonts/ fi %files %defattr(-,root,root,0755) %doc README COPYING ChangeLog ISSUES INSTALL KeyboardLayout THANKS Conversion/ Keyboards/ gdl/ %{_datadir}/%{fontdir} %changelog * Wed Feb 18 2004 Nicolas Spalinger <nic...@si...> - 1.0-1sil - Draft spec file submitted to the SILGraphite team --- NEW FILE: fonts-silgraphite-examples.spec --- %define family examples %define version 1.0 %define release 1sil %define name fonts-silgraphite-%{family} %define fontdir fonts/silgraphite/%{family} Name: %{name} Version: %{version} Release: %{release} License: Distributable Group: System/Fonts/SILGraphite Source: http://scripts.sil.org/download/%{name}-%{version}.tar.bz2 URL: http://scripts.sil.org BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: freetype-tools Requires: freetype, XFree86-xfs Provides: %{name} Prereq: chkfontpath, fontconfig Summary: Smart fonts (with gdl source code) from SIL International %description This collection of smart font examples currently contains: - Padauk - Thai - Stackingdiac - Piglatin - AllCaps - IPA - ... This set of smart fonts are good examples of crucial building blocks for a sustainable free and open WSI (Writing System Implementation). Together with the SILGraphite smart rendering library, they offer the following features: - contextual substitution, insertion, and deletion - reordering - creation of ligatures with defined components - positioning based on attachment points or shifting and kerning - application of the Unicode bidirectional algorithm - multiple insertion points and selection All these behaviours are defined by GDL (Graphite Description Language) instructions compiled into special font tables. You will find the corresponding gdl source code in: /usr/share/doc/fonts-silgraphite-examples*/gdl/ For more details about writing your own smart font rules with GDL and compiling them into a font with gdlcomp visit the NRSI's (Non-Roman Script Initiative) website: http://scripts.sil.org %prep %setup -q -c -n %{name} %build cd %{name}-%{version} mkdir -p fonts mv *.ttf fonts/ mv fonts .. mv * .. cd .. cd fonts mkfontscale . mkfontdir . fc-cache -v . %install rm -rf %{buildroot} cd fonts mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{fontdir} cp *.ttf fonts.* $RPM_BUILD_ROOT%{_datadir}/%{fontdir} %clean rm -rf %{buildroot} %post if test $1 -eq 1 then chkfontpath --add %{_datadir}/%{fontdir} fi %preun if test $1 -eq 0 then chkfontpath --remove %{_datadir}/%{fontdir} fi %postun # 0 means a real uninstall if [ "$1" = "0" ]; then [ -x %_sbindir/chkfontpath ] && \ %_sbindir/chkfontpath -q -r %{_datadir}/%{fontdir} %{_bindir}/fc-cache %{_datadir}/fonts/ fi %files %defattr(-,root,root,0755) %doc README INSTALL COPYING ChangeLog ISSUES THANKS gdl/ doc/ %{_datadir}/%{fontdir} %changelog * Wed Feb 18 2004 Nicolas Spalinger <nic...@si...> - 1.0-1sil - Draft spec file submitted to the SILGraphite team --- NEW FILE: gdlcomp.spec --- %define name gdlcomp %define version 1.0 %define release 1sil Name: %{name} Version: %{version} Release: %{release} License: LGPL or CPL Group: Development/Other Source: http://scripts.sil.org/download/%{name}-%{version}.tar.bz2 Url: http://scripts.sil.org/gdlcomp BuildRoot: %{_tmppath}/%{name}-%{version}-root #BuildRequires: libsilgraphite1-devel Summary: the GDL (Graphite Description Language) compiler %description Gdlcomp is part of the SILGraphite framework: a system that can be used to create and use "smart fonts" capable of displaying writing systems with various complex behaviors, such as: contextual shaping, ligatures, reordering, split glyphs, bidirectionality, stacking diacritics and complex positioning. This library was designed and developed by the NRSI (Non-Roman Script Initiative) within SIL International (www.sil.org) to act as a complement to other smart font rendering technologies with limited practical local extensability. Its purpose is to help meet the needs of a very large number of "minority language" communities for local extensibility of complex script behaviors. Gdlcomp is a compiler used to add extras smart tables to fonts. Behaviours for a given writing system are specified through smart rules from a gdl (Graphite Description Language) source code which gdlcomp then compiles into a font. %prep %setup -q #%patch1 -p0 %build %configure %make %install rm -rf $buildroot %makeinstall %clean rm -rf $buildroot %files %defattr(-,root,root,755) %doc README ChangeLog TODO COPYING THANKS License/ %{_bindir}/* %{_mandir}/man1/* %changelog * Wed Feb 18 2004 Nicolas Spalinger <nic...@si...> - 1.0-1sil - Draft spec file submitted to the SILGraphite team --- NEW FILE: silgraphite.spec --- %define name silgraphite %define version 1.0.0 %define release 1sil %define lib_major 1 %define lib_name_orig lib%{name} %define lib_name %mklibname %{name} %{lib_major} Name: %{name} Version: %version Release: %release License: LGPL or CPL Group: System/Internationalization URL: http://graphite.sil.org/ Source: http://graphite.sil.org/download/%{name}-%{version}.tar.bz2 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root Provides: %{name} Summary: An Extensible Rendering Engine for Complex Writing Systems %description SILGraphite is a system that can be used to create and use "smart fonts" capable of displaying writing systems with various complex behaviors, such as: contextual shaping, ligatures, reordering, split glyphs, bidirectionality, stacking diacritics and complex positioning. This library was designed and developed by the NRSI (Non-Roman Script Initiative) within SIL International (www.sil.org) to act as a complement to other smart font rendering technologies with limited practical local extensability. Its purpose is to help meet the needs of a very large number of "minority language" communities for local extensibility of complex script behaviors. The behavior of the SILGraphite rendering engine for a given writing system is specified through extra tables added to a TrueType font. These tables are generated by compiling a GDL (Graphite Description Language) source file into a font using gdlcomp. This package provides the libraries and the documentation for using SILGraphite as well as development files, test suites and example wrappers for all the major toolkits and platforms. %package -n %{lib_name} Summary: An Extensible Rendering Engine for Complex Writing Systems Group: System/Internationalization Provides: %{name} = %{version}-%{release} Requires: libfreetype6-devel Requires: libxfree86-devel %description -n %{lib_name} SILGraphite is a system that can be used to create and use "smart fonts" capable of displaying writing systems with various complex behaviors, such as: contextual shaping, ligatures, reordering, split glyphs, bidirectionality, stacking diacritics and complex positioning. This library was designed and developed by the NRSI (Non-Roman Script Initiative) within SIL International (www.sil.org) to act as a complement to other smart font rendering technologies with limited practical local extensability. Its purpose is to help meet the needs of a very large number of "minority language" communities for local extensibility of complex script behaviors. The behavior of the SILGraphite rendering engine for a given writing system is specified though extra tables added to a TrueType font. These tables are generated by compiling a GDL (Graphite Description Language) source file into a font using gdlcomp. This package provides the libraries for using SILGraphite. %package -n %{lib_name}-devel Summary: Libraries and include files for developing with SILGraphite. Group: Development/C++ Requires: %{lib_name} = %{version} Provides: %{lib_name_orig}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{lib_name}-devel SILGraphite is a system that can be used to create and use "smart fonts" capable of displaying writing systems with various complex behaviors, such as: contextual shaping, ligatures, reordering, split glyphs, bidirectionality, stacking diacritics, complex positioning. This library was designed and developed by the NRSI (Non-Roman Script Initiative) within SIL International (www.sil.org) to act as a complement to other smart font rendering technologies with limited practical local extensability. Its purpose is to help meet the needs of a very large number of "minority language" communities for local extensibility of complex script behaviors. The behavior of the SILGraphite rendering engine for a given writing system is specified by extra tables added to a TrueType font. These tables are generated by compiling a GDL (Graphite Description Language) source file into a font using gdlcomp. This package provides the necessary development libraries, include files, test suites and example wrappers to allow you to develop with SILGraphite and enable your own application to use the advanced features of smart fonts. %prep %setup -q #%patch1 -p0 de-windowsify.patch.bz2 %build %configure %make %install rm -rf %buildroot %makeinstall %post -n %{lib_name} -p /sbin/ldconfig %postun -n %{lib_name} -p /sbin/ldconfig %clean rm -rf %buildroot %files -n %{lib_name} %defattr(-, root, root, 0755) %{_libdir}/*.1* %doc README TODO THANKS COPYING HISTORY INSTALL ChangeLog README.SILGraphite-Powered doc/ License/ %files -n %{lib_name}-devel %defattr(-, root, root, 0755) #%{_libdir}/*.so* %{_libdir}/*.a* %{_libdir}/*.la* %dir %{_includedir}/silgraphite %{_includedir}/silgraphite/* %{_libdir}/pkgconfig/silgraphite.pc %defattr(0644, root, root, 0755) %doc README TODO THANKS COPYING HISTORY INSTALL ChangeLog README.SILGraphite-Powered contrib/Perl/ contrib/XftHelloWorld/ doc/ License/ %changelog * Wed Feb 18 2004 Nicolas Spalinger <nic...@si...> - 1.0-1sil - Draft spec file submitted to the SILGraphite team |
From: <sil...@li...> - 2004-09-16 13:52:06
|
Update of /cvsroot/silgraphite/silgraphite/rpm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3577/rpm Log Message: Directory /cvsroot/silgraphite/silgraphite/rpm added to the repository |
From: <sil...@li...> - 2004-09-16 13:42:40
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1398/include Modified Files: GrEngine.h Log Message: crtdbg is VCPP only Index: GrEngine.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrEngine.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- GrEngine.h 2 Sep 2004 21:29:37 -0000 1.20 +++ GrEngine.h 16 Sep 2004 13:42:31 -0000 1.21 @@ -19,7 +19,7 @@ #include <limits> #include "IGrJustifyingEngine.h" -#ifdef _WIN32 +#ifdef _MSC_VER #include <crtdbg.h> #endif |
From: <sil...@li...> - 2004-09-16 13:42:39
|
Update of /cvsroot/silgraphite/silgraphite/src/GrEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1398/d/d Modified Files: GrEngine.cpp Log Message: crtdbg is VCPP only Index: GrEngine.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrEngine.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- GrEngine.cpp 2 Sep 2004 20:29:03 -0000 1.35 +++ GrEngine.cpp 16 Sep 2004 13:42:14 -0000 1.36 @@ -175,11 +175,12 @@ GrEngine::~GrEngine() { DestroyEverything(); - + #ifdef _MSC_VER if (!_CrtCheckMemory()) { OutputDebugString(L"bad memory"); } + #endif } @@ -189,11 +190,12 @@ void GrEngine::DestroyEverything() { DestroyContents(); - + #ifdef _MSC_VER if (!_CrtCheckMemory()) { OutputDebugString(L"bad memory"); } + #endif m_stuInitialize.erase(); m_strCtrlFileReg.erase(); |
From: <sil...@li...> - 2004-09-16 12:18:08
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13610 Modified Files: Makefile.am Log Message: install GrAppData.h Index: Makefile.am =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 29 Jul 2004 14:10:52 -0000 1.7 +++ Makefile.am 16 Sep 2004 12:17:57 -0000 1.8 @@ -1,3 +1,4 @@ +pkginclude_HEADERS += $(top_srcdir)/include/GrAppData.h pkginclude_HEADERS += $(top_srcdir)/include/GrClient.h pkginclude_HEADERS += $(top_srcdir)/include/GrCommon.h pkginclude_HEADERS += $(top_srcdir)/include/GrConstants.h |
From: <sil...@li...> - 2004-09-16 12:09:51
|
Update of /cvsroot/silgraphite/silgraphite/src/GrEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512 Modified Files: GrPassActionCode.cpp Log Message: say no nay never to assumptions about the signedness of char Index: GrPassActionCode.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrEngine/GrPassActionCode.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GrPassActionCode.cpp 29 May 2004 19:16:44 -0000 1.13 +++ GrPassActionCode.cpp 16 Sep 2004 12:09:42 -0000 1.14 @@ -31,7 +31,7 @@ //:> Local type definitions //:>******************************************************************************************** -typedef char Int8; // signed value +typedef signed char Int8; // signed value typedef unsigned char Uint8; // unsigned value |
From: <sil...@li...> - 2004-09-03 11:01:09
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28155 Modified Files: GrAppData.h Log Message: gcc likes newlines at the end of files Index: GrAppData.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrAppData.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GrAppData.h 2 Sep 2004 20:29:02 -0000 1.1 +++ GrAppData.h 3 Sep 2004 11:01:00 -0000 1.2 @@ -12,4 +12,5 @@ Data structures need by applications that use the Graphite engine. ----------------------------------------------------------------------------------------------*/ -#include "GrData.h" \ No newline at end of file +#include "GrData.h" + |