diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-18 16:52:05 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-18 16:52:27 +0100 |
commit | 849a713ffd29a58ae79e48f80835c28bbd9d5a72 (patch) | |
tree | 7d2c662f43a00f3bc04a0d51c685544074538a5c /vcl/source/fontsubset/cff.cxx | |
parent | f7cbde525450a1a9427873c264791c65056c4f2a (diff) |
remove non-compiled code
Diffstat (limited to 'vcl/source/fontsubset/cff.cxx')
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 8472e073ba8d..15deba7d2e21 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -154,12 +154,6 @@ static const char* pStringIds[] = { // -------------------------------------------------------------------- -#if 0 // TODO: use them -static const char* pStdEncNames[] = { - "ISOAdobe", "Expert", "ExpertSubSet" -}; -#endif - // -------------------------------------------------------------------- // TOP DICT keywords (also covers PRIV DICT keywords) @@ -1244,32 +1238,23 @@ void CffSubsetterContext::convertOneTypeEsc( void) } case TYPE2OP::HFLEX1: { assert( mnStackIdx == 9); -#if 0 // emulate hflex1 as straight line - const ValType* pX = &mnValStack[ mnStackIdx]; - const ValType fDX = pX[-9] + pX[-7] + pX[-5] + pX[-4] + pX[-3] + pX[-1]; - writeType1Val( fDX); - writeTypeOp( TYPE1OP::HLINETO); -#else // emulate hflex1 as two curves + writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, 0); writeCurveTo( mnStackIdx, -4, 0, -3, -2, -1, 0); // TODO: emulate hflex1 using othersubr call -#endif + mnStackIdx -= 9; } break; case TYPE2OP::HFLEX: { assert( mnStackIdx == 7); ValType* pX = &mnValStack[ mnStackIdx]; -#if 0 // emulate hflex as straight line - const ValType fDX = pX[-7] + pX[-6] + pX[-4] + pX[-3] + pX[-2] + pX[-1]; - writeType1Val( fDX); - writeTypeOp( TYPE1OP::HLINETO); -#else // emulate hflex as two curves + pX[+1] = -pX[-5]; // temp: +dy5==-dy2 writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, 0); writeCurveTo( mnStackIdx, -3, 0, -2, +1, -1, 0); // TODO: emulate hflex using othersubr call -#endif + mnStackIdx -= 7; } break; @@ -1391,13 +1376,7 @@ if( mbSawError) { writeType1Val( -350); writeType1Val( 700); writeTypeOp( TYPE1OP::RLINETO); -#if 0 - writeType1Val( -300); - writeType1Val( -800); - writeTypeOp( TYPE1OP::RLINETO); -#else writeTypeOp( TYPE1OP::CLOSEPATH); -#endif writeTypeOp( TYPE1OP::ENDCHAR); } #else // useful for manually encoding charstrings @@ -2128,13 +2107,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pOut += sprintf( pOut, "%%!FontType1-1.0: %s 001.003\n", rEmitter.maSubsetName); // emit TOPDICT -#if 0 // improve PS Type1 caching? - nOfs += sprintf( &aT1Str[nOfs], - "FontDirectory/%s known{/%s findfont dup/UniqueID known{dup\n" - "/UniqueID get %d eq exch/FontType get 1 eq and}{pop false}ifelse\n" - "{save true}{false}ifelse}\n{false}ifelse\n", - pFamilyName, pFamilyName, nUniqueId); -#endif pOut += sprintf( pOut, "11 dict begin\n" // TODO: dynamic entry count for TOPDICT "/FontType 1 def\n" @@ -2158,10 +2130,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, " /FamilyName (%s) readonly def\n" "end readonly def\n", pFullName, pFamilyName); -#if 0 // TODO: use an standard Type1 encoding if possible - pOut += sprintf( pOut, - "/Encoding StandardEncoding def\n"); -#else + pOut += sprintf( pOut, "/Encoding 256 array\n" "0 1 255 {1 index exch /.notdef put} for\n"); @@ -2170,7 +2139,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName); } pOut += sprintf( pOut, "readonly def\n"); -#endif pOut += sprintf( pOut, // TODO: more topdict entries "currentdict end\n" |