From: <sil...@li...> - 2003-04-14 21:35:03
|
Update of /cvsroot/silgraphite/silgraphite/include In directory sc8-pr-cvs1:/tmp/cvs-serv17948/include Modified Files: GrData.h GrEngine.h GrSegment.h IGrGraphics.h Log Message: Synchronized with FW, 14 Apr 2003, changelist #06701 Index: GrData.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrData.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GrData.h 1 Apr 2003 08:55:06 -0000 1.5 +++ GrData.h 14 Apr 2003 21:34:25 -0000 1.6 @@ -33,8 +33,8 @@ unsigned long clrFore; unsigned long clrBack; int dympOffset; - int enc; int ws; + int ows; byte fWsRtl; int nDirDepth; byte ssv; Index: GrEngine.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrEngine.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GrEngine.h 30 Jan 2003 20:17:28 -0000 1.5 +++ GrEngine.h 14 Apr 2003 21:34:25 -0000 1.6 @@ -135,11 +135,30 @@ int ComponentIndexForGlyph(wchar chwGlyphID, int nCompID); void InitFontName(); - void RecordFontError(OLECHAR * prgchwErrMsg, int cchMaxErrMsg); + void RecordFontLoadError(OLECHAR * prgchwErrMsg, int cchMaxErrMsg); + void RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMaxErrMsg, GrResult res); void ClearFontError(OLECHAR * prgchwErrMsg, int cchMaxErrMsg); - void GetWritingSystemDirection(IGrTextSource * pgts, int ichwMin); + void GetOldWritingSystemDirection(IGrTextSource * pgts, int ichwMin); GrResult SetUp(IGrGraphics * pgg, bool fBold = false, bool fItalic = false); + GrResult RunUsingEmpty(IGrGraphics * pgg, + GrCharStream * pchstrm, + bool fStartLine, bool fEndLine, + int dxMaxWidth, + bool fNeedFinalBreak, bool fNextIsSameWs, bool fMoreText, + 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); + bool InErrorState() + { + return m_fInErrorState; + } + StrUni FaceName() { return m_stuFaceName; @@ -240,6 +259,20 @@ virtual void NewSegment(GrSegment ** ppseg); + // The highest version of the font tables that this version of the engine supports: + int CurrentTableVersion() + { + return 2; + } + + static int ReadVersion(GrIStream & grstrm) + { + int nVersion = grstrm.ReadIntFromFont(); + if (nVersion == 0x00010000) + nVersion = 0x00000001; // kludge for silly mistake + return nVersion; + } + protected: // Member variables: long m_cref; @@ -281,10 +314,12 @@ // E_UNEXPECTED if dumb rendering // E_FAIL if dumb rendering with no cmap + bool m_fInErrorState; // true if we are handling a rendering error + int m_nFontCheckSum; // when loading a font using the GrGraphics, remember the // check sum as a unique identifer - int m_nScriptTag; // from the pertinent writing system; currently not used + int m_nScriptTag; // from the pertinent old writing system; currently not used int m_grfsdc; // supported script directions bool m_fRightToLeft; // overall writing-system direction @@ -336,9 +371,10 @@ // for Unicode to glyph ID mapping byte * m_pCmap; // hold the full cmap table - void * m_pCmap31; // point to the MS Unicode cmap subtable - // uses platform 3 encoding 1 or 0, preferably 1 + void * m_pCmap_3_1; // point to the MS Unicode cmap subtable + // uses platform 3 writing system 1 or 0, preferably 1 // use for Unicode to Glyph ID conversion + void * m_pCmap_3_10; // for feature names and maybe other strings from font later byte * m_pNameTbl; // hold full name table; use Name() method to access @@ -363,6 +399,10 @@ GrResult ReadFromGraphicsFont(IGrGraphics * pgg); void AdjustFontAndStyles(IGrGraphics * pgg, StrUni & stuFaceName, LgCharRenderProps * pchrp); + bool CheckTableVersions(GrIStream * pgrstrm, + Vector<byte> & vbSilfTbl, int lSilfStart, + Vector<byte> & vbGlatTbl, int lGlocStart, + Vector<byte> & vbFeatTbl, int lFeatStart, int * pnVersion); void ReadSilTable(GrIStream & grstrm, long lTableStart, int iSubTable, int * pchwMaxGlyphID); void ReadGlocAndGlatTables(GrIStream & grstrm, long lGlocStart, long lGlatStart, @@ -371,7 +411,7 @@ void CreateEmpty(); - wchar MapToPseudo(wchar chwUnicode); + wchar MapToPseudo(int nUnicode); //:Ignore #ifdef OLD_TEST_STUFF Index: GrSegment.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/GrSegment.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GrSegment.h 30 Jan 2003 20:17:28 -0000 1.4 +++ GrSegment.h 14 Apr 2003 21:34:26 -0000 1.5 @@ -78,7 +78,7 @@ GrResult get_RightToLeft(int ichwBase, bool * pfResult); GrResult get_DirectionDepth(int ichwBase, int * pnDepth, bool * pfWeak); GrResult SetDirectionDepth(int ichwBase, int nNewDepth); - GrResult get_WritingSystem(int ichwBase, int * penc, int * pws); + GrResult get_OldWritingSystem(int ichwBase, int * pws, int * pows); GrResult get_Lim(int ichwBase, int * pdichw); GrResult get_LimInterest(int ichwBase, int * pdichw); @@ -289,7 +289,7 @@ GrEngine * m_qreneng; // engine that is responsible - bool m_fWsRtl; // writing system direction + bool m_fWsRtl; // old writing system direction bool m_fParaRtl; // paragraph direction LgTrailingWsHandling m_twsh; Index: IGrGraphics.h =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/include/IGrGraphics.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- IGrGraphics.h 1 Apr 2003 08:55:11 -0000 1.4 +++ IGrGraphics.h 14 Apr 2003 21:34:26 -0000 1.5 @@ -18,7 +18,10 @@ #define IGRGRAPHICS_INCLUDED #include "GrResult.h" + +#ifndef GR_FW #include "GrData.h" +#endif /*---------------------------------------------------------------------------------------------- Class: IGrGraphics |