Kaydet (Commit) 5bc86df0 authored tarafından Caolán McNamara's avatar Caolán McNamara

lets keep original encoding

üst e4473809
...@@ -2812,7 +2812,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, ...@@ -2812,7 +2812,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) ) if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) )
return FALSE; return FALSE;
const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding(); const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding();
const ByteString aToFile( rtl::OUStringToOString( aSysPath, aThreadEncoding ) ); const rtl::OString aToFile(rtl::OUStringToOString(aSysPath, aThreadEncoding));
// check if the font has a CFF-table // check if the font has a CFF-table
const DWORD nCffTag = CalcTag( "CFF " ); const DWORD nCffTag = CalcTag( "CFF " );
...@@ -2840,7 +2840,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, ...@@ -2840,7 +2840,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
pCharMap->DeReference(); // TODO: and and use a RAII object pCharMap->DeReference(); // TODO: and and use a RAII object
// provide a font subset from the CFF-table // provide a font subset from the CFF-table
FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" ); FILE* pOutFile = fopen( aToFile.getStr(), "wb" );
rInfo.LoadFont( FontSubsetInfo::CFF_FONT, aRawCffData.get(), aRawCffData.size() ); rInfo.LoadFont( FontSubsetInfo::CFF_FONT, aRawCffData.get(), aRawCffData.size() );
bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL, bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
nRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths ); nRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
...@@ -2929,7 +2929,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, ...@@ -2929,7 +2929,7 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
free( pMetrics ); free( pMetrics );
// write subset into destination file // write subset into destination file
nRC = ::CreateTTFromTTGlyphs( aSftTTF.get(), aToFile.GetBuffer(), aShortIDs, nRC = ::CreateTTFromTTGlyphs( aSftTTF.get(), aToFile.getStr(), aShortIDs,
aTempEncs, nGlyphCount, 0, NULL, 0 ); aTempEncs, nGlyphCount, 0, NULL, 0 );
return (nRC == SF_OK); return (nRC == SF_OK);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment