diff options
author | Herbert Dürr <hdu@apache.org> | 2013-12-16 16:07:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-06 14:32:30 +0000 |
commit | a16aacd6474f02307341646ec08f9e1608a8615d (patch) | |
tree | 23d5a086d982d77329f2de6196c97c3139d9bdbf /vcl/source/fontsubset/cff.cxx | |
parent | 8723bf714b6156396f30ac71c0268e5a51c76337 (diff) |
Resolves: #i123840# add and use the sal_GlyphId type
Using the central definition adds consistency and cleans up many ad hoc
declarations. The type sal_GlyphId will become a class in the future so
that its bitfield operations etc. can then be isolated into nice methods.
(cherry picked from commit c0a84ad10964fb7a65b6239cbe1cef8698b5d17b)
Conflicts:
vcl/aqua/source/gdi/salatslayout.cxx
vcl/aqua/source/gdi/salgdi.cxx
vcl/generic/glyphs/gcach_ftyp.cxx
vcl/generic/print/genpspgraphics.cxx
vcl/generic/print/glyphset.cxx
vcl/generic/print/glyphset.hxx
vcl/headless/svptext.cxx
vcl/inc/generic/genpspgraphics.h
vcl/inc/generic/glyphcache.hxx
vcl/inc/os2/salgdi.h
vcl/inc/quartz/salgdi.h
vcl/inc/salgdi.hxx
vcl/inc/sallayout.hxx
vcl/inc/unx/salgdi.h
vcl/inc/vcl/fontmanager.hxx
vcl/inc/win/salgdi.h
vcl/os2/source/gdi/os2layout.cxx
vcl/os2/source/gdi/salgdi3.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/sallayout.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/gcach_layout.cxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/unx/generic/fontmanager/fontmanager.cxx
vcl/unx/generic/gdi/gcach_xpeer.cxx
vcl/unx/generic/gdi/gcach_xpeer.hxx
vcl/unx/generic/gdi/salgdi3.cxx
vcl/unx/generic/gdi/xrender_peer.hxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/winlayout.cxx
Change-Id: Ic629131950360e2df4c15db30d6a5362193c6330
Diffstat (limited to 'vcl/source/fontsubset/cff.cxx')
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index e2241a1b3fb4..0fbe9407b633 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -22,7 +22,7 @@ #include <cstring> #include <assert.h> -#include <fontsubset.hxx> +#include "fontsubset.hxx" #include <vcl/strhelper.hxx> @@ -346,7 +346,7 @@ class SubsetterContext public: virtual ~SubsetterContext( void); virtual bool emitAsType1( class Type1Emitter&, - const long* pGlyphIDs, const U8* pEncoding, + const sal_GlyphId* pGlyphIds, const U8* pEncoding, GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ) = 0; }; @@ -371,7 +371,7 @@ public: void initialCffRead( void); bool emitAsType1( class Type1Emitter&, - const long* pGlyphIDs, const U8* pEncoding, + const sal_GlyphId* pGlyphIds, const U8* pEncoding, GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ); // used by charstring converter @@ -2031,7 +2031,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail, // -------------------------------------------------------------------- bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, - const long* pReqGlyphIDs, const U8* pReqEncoding, + const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding, GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo) { // prepare some fontdirectory details @@ -2104,7 +2104,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, "/Encoding 256 array\n" "0 1 255 {1 index exch /.notdef put} for\n"); for( int i = 1; (i < nGlyphCount) && (i < 256); ++i) { - const char* pGlyphName = getGlyphName( pReqGlyphIDs[i]); + const char* pGlyphName = getGlyphName( pReqGlyphIds[i]); pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName); } pOut += sprintf( pOut, "readonly def\n"); @@ -2254,20 +2254,20 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, "2 index /CharStrings %d dict dup begin\n", nGlyphCount); rEmitter.emitAllCrypted(); for( int i = 0; i < nGlyphCount; ++i) { - const int nGlyphId = pReqGlyphIDs[i]; - assert( (nGlyphId >= 0) && (nGlyphId < mnCharStrCount)); + const int nCffGlyphId = pReqGlyphIds[i]; + assert( (nCffGlyphId >= 0) && (nCffGlyphId < mnCharStrCount)); // get privdict context matching to the glyph - const int nFDSelect = getFDSelect( nGlyphId); + const int nFDSelect = getFDSelect( nCffGlyphId); if( nFDSelect < 0) continue; mpCffLocal = &maCffLocal[ nFDSelect]; // convert the Type2op charstring to its Type1op counterpart - const int nT2Len = seekIndexData( mnCharStrBase, nGlyphId); + const int nT2Len = seekIndexData( mnCharStrBase, nCffGlyphId); assert( nT2Len > 0); U8 aType1Ops[ MAX_T1OPS_SIZE]; // TODO: dynamic allocation const int nT1Len = convert2Type1Ops( mpCffLocal, mpReadPtr, nT2Len, aType1Ops); // get the glyph name - const char* pGlyphName = getGlyphName( nGlyphId); + const char* pGlyphName = getGlyphName( nCffGlyphId); // emit the encrypted Type1op charstring pOut += sprintf( pOut, "/%s %d RD ", pGlyphName, nT1Len); memcpy( pOut, aType1Ops, nT1Len); |