Kaydet (Commit) abe4d7bd authored tarafından Khaled Hosny's avatar Khaled Hosny

Kill code for Type 1 fonts on Unix

We already ignore them, so this is unreachable code now.

Change-Id: I6fd4699d8175344c36253bf4bf9c024b8986da31
Reviewed-on: https://gerrit.libreoffice.org/31222Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 47ea13ef
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/generic/fontmanager))
$(call gb_CustomTarget_get_target,vcl/unx/generic/fontmanager) : \
$(call gb_CustomTarget_get_workdir,vcl/unx/generic/fontmanager)/afm_hash.hpp
$(call gb_CustomTarget_get_workdir,vcl/unx/generic/fontmanager)/afm_hash.hpp : \
$(SRCDIR)/vcl/unx/generic/fontmanager/afm_keyword_list \
| $(call gb_CustomTarget_get_workdir,vcl/unx/generic/fontmanager)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GPF,1)
$(GPERF) -C -t -l -L C++ -m 20 -Z AfmKeywordHash -k '1,4,6,$$' $< | sed -e 's/(char\*)0/(char\*)0, NOPE/g' | grep -v '^#line' > $@
# vim: set noet sw=4:
...@@ -35,8 +35,6 @@ endif ...@@ -35,8 +35,6 @@ endif
$(eval $(call gb_Library_set_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl))
$(eval $(call gb_Library_use_custom_headers,vcl,officecfg/registry vcl/unx/generic/fontmanager))
$(eval $(call gb_Library_set_include,vcl,\ $(eval $(call gb_Library_set_include,vcl,\
$$(INCLUDE) \ $$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \ -I$(SRCDIR)/vcl/inc \
...@@ -549,7 +547,6 @@ vcl_headless_freetype_code=\ ...@@ -549,7 +547,6 @@ vcl_headless_freetype_code=\
vcl/unx/generic/fontmanager/fontconfig \ vcl/unx/generic/fontmanager/fontconfig \
vcl/unx/generic/fontmanager/fontmanager \ vcl/unx/generic/fontmanager/fontmanager \
vcl/unx/generic/fontmanager/helper \ vcl/unx/generic/fontmanager/helper \
vcl/unx/generic/fontmanager/parseAFM \
vcl/headless/svpcairotextrender \ vcl/headless/svpcairotextrender \
vcl/unx/generic/print/bitmap_gfx \ vcl/unx/generic/print/bitmap_gfx \
vcl/unx/generic/print/common_gfx \ vcl/unx/generic/print/common_gfx \
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
$(eval $(call gb_Module_Module,vcl)) $(eval $(call gb_Module_Module,vcl))
$(eval $(call gb_Module_add_targets,vcl,\ $(eval $(call gb_Module_add_targets,vcl,\
CustomTarget_afm_hash \
Library_vcl \ Library_vcl \
Package_opengl \ Package_opengl \
$(if $(filter WNT,$(OS)), \ $(if $(filter WNT,$(OS)), \
......
...@@ -57,7 +57,6 @@ namespace fonttype ...@@ -57,7 +57,6 @@ namespace fonttype
{ {
enum type { enum type {
Unknown = 0, Unknown = 0,
Type1 = 1,
TrueType = 2, TrueType = 2,
}; };
} }
...@@ -65,8 +64,8 @@ enum type { ...@@ -65,8 +64,8 @@ enum type {
/* /*
* the difference between FastPrintFontInfo and PrintFontInfo * the difference between FastPrintFontInfo and PrintFontInfo
* is that the information in FastPrintFontInfo can usually * is that the information in FastPrintFontInfo can usually
* be gathered without opening either the font file or * be gathered without opening either the font file, they are
* an afm metric file. they are gathered from fonts.dir alone. * gathered from fonts.dir alone.
* if only FastPrintFontInfo is gathered and PrintFontInfo * if only FastPrintFontInfo is gathered and PrintFontInfo
* on demand and for less fonts, then performance in startup * on demand and for less fonts, then performance in startup
* increases considerably * increases considerably
...@@ -88,7 +87,6 @@ struct FastPrintFontInfo ...@@ -88,7 +87,6 @@ struct FastPrintFontInfo
FontPitch m_ePitch; FontPitch m_ePitch;
rtl_TextEncoding m_aEncoding; rtl_TextEncoding m_aEncoding;
bool m_bSubsettable; bool m_bSubsettable;
bool m_bEmbeddable;
FastPrintFontInfo() FastPrintFontInfo()
: m_nID(0) : m_nID(0)
...@@ -100,7 +98,6 @@ struct FastPrintFontInfo ...@@ -100,7 +98,6 @@ struct FastPrintFontInfo
, m_ePitch(PITCH_DONTKNOW) , m_ePitch(PITCH_DONTKNOW)
, m_aEncoding(RTL_TEXTENCODING_DONTKNOW) , m_aEncoding(RTL_TEXTENCODING_DONTKNOW)
, m_bSubsettable(false) , m_bSubsettable(false)
, m_bEmbeddable(false)
{} {}
}; };
...@@ -142,10 +139,8 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -142,10 +139,8 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
{ {
struct PrintFont; struct PrintFont;
struct TrueTypeFontFile; struct TrueTypeFontFile;
struct Type1FontFile;
friend struct PrintFont; friend struct PrintFont;
friend struct TrueTypeFontFile; friend struct TrueTypeFontFile;
friend struct Type1FontFile;
friend class FontCache; friend class FontCache;
struct PrintFontMetrics struct PrintFontMetrics
...@@ -188,7 +183,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -188,7 +183,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
FontWeight m_eWeight; FontWeight m_eWeight;
FontPitch m_ePitch; FontPitch m_ePitch;
rtl_TextEncoding m_aEncoding; rtl_TextEncoding m_aEncoding;
bool m_bFontEncodingOnly; // set if font should be only accessed by builtin encoding
CharacterMetric m_aGlobalMetricX; CharacterMetric m_aGlobalMetricX;
CharacterMetric m_aGlobalMetricY; CharacterMetric m_aGlobalMetricY;
PrintFontMetrics* m_pMetrics; PrintFontMetrics* m_pMetrics;
...@@ -202,33 +196,9 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -202,33 +196,9 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
bool m_bHaveVerticalSubstitutedGlyphs; bool m_bHaveVerticalSubstitutedGlyphs;
bool m_bUserOverride; bool m_bUserOverride;
/// mapping from unicode (well, UCS-2) to font code
std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
/// HACK for Type 1 fonts: if multiple UCS-2 codes map to the same
/// font code, this set contains the preferred one, i.e., the one that
/// is specified explicitly via "C" or "CH" in the AFM file
std::set<sal_Unicode> m_aEncodingVectorPriority;
std::map< sal_Unicode, OString > m_aNonEncoded;
explicit PrintFont( fonttype::type eType ); explicit PrintFont( fonttype::type eType );
virtual ~PrintFont(); virtual ~PrintFont();
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) = 0; virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) = 0;
bool readAfmMetrics( utl::MultiAtomProvider* pProvider, bool bFillEncodingvector, bool bOnlyGlobalAttributes );
};
struct Type1FontFile : public PrintFont
{
int m_nDirectory; // atom containing system dependent path
OString m_aFontFile; // relative to directory
OString m_aMetricFile; // dito
/* note: m_aFontFile and Metric file are not atoms
because they should be fairly unique */
Type1FontFile() : PrintFont( fonttype::Type1 ), m_nDirectory( 0 ) {}
virtual ~Type1FontFile() override;
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) override;
}; };
struct TrueTypeFontFile : public PrintFont struct TrueTypeFontFile : public PrintFont
...@@ -258,14 +228,8 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -258,14 +228,8 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
std::unordered_map< int, OString > m_aAtomToDir; std::unordered_map< int, OString > m_aAtomToDir;
int m_nNextDirAtom; int m_nNextDirAtom;
std::unordered_multimap< OString, sal_Unicode, OStringHash > m_aAdobenameToUnicode;
std::unordered_multimap< sal_Unicode, OString > m_aUnicodeToAdobename;
std::unordered_multimap< sal_Unicode, sal_uInt8 > m_aUnicodeToAdobecode;
std::unordered_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
mutable FontCache* m_pFontCache; mutable FontCache* m_pFontCache;
OString getAfmFile( PrintFont* pFont ) const;
OString getFontFile( PrintFont* pFont ) const; OString getFontFile( PrintFont* pFont ) const;
bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=nullptr ) const; bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=nullptr ) const;
...@@ -375,13 +339,6 @@ public: ...@@ -375,13 +339,6 @@ public:
return pFont ? pFont->m_aEncoding : RTL_TEXTENCODING_DONTKNOW; return pFont ? pFont->m_aEncoding : RTL_TEXTENCODING_DONTKNOW;
} }
// should i only use font's builtin encoding ?
bool getUseOnlyFontEncoding( fontID nFontID ) const
{
PrintFont* pFont = getFont( nFontID );
return pFont && pFont->m_bFontEncodingOnly;
}
// get a specific fonts system dependent filename // get a specific fonts system dependent filename
OString getFontFileSysPath( fontID nFontID ) const OString getFontFileSysPath( fontID nFontID ) const
{ {
...@@ -413,28 +370,10 @@ public: ...@@ -413,28 +370,10 @@ public:
// the user is responsible to allocate pArray large enough // the user is responsible to allocate pArray large enough
bool getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray ) const; bool getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray ) const;
// get encoding vector of font, currently only for Type1 fonts
// returns NULL if encoding vector is empty or font is not type1;
// if ppNonEncoded is set and non encoded type1 glyphs exist
// then *ppNonEncoded is set to the mapping for nonencoded glyphs.
// the encoding vector contains -1 for non encoded glyphs
const std::map< sal_Unicode, sal_Int32 >* getEncodingMap( fontID nFontID, const std::map< sal_Unicode, OString >** ppNonEncoded, std::set<sal_Unicode> const ** ppPriority ) const;
// evaluates copyright flags for TrueType fonts for printing/viewing // evaluates copyright flags for TrueType fonts for printing/viewing
// type1 fonts do not have such a feature, so return for them is true // type1 fonts do not have such a feature, so return for them is true
bool isFontDownloadingAllowedForPrinting( fontID nFont ) const; bool isFontDownloadingAllowedForPrinting( fontID nFont ) const;
// helper for type 1 fonts
std::list< OString > getAdobeNameFromUnicode( sal_Unicode aChar ) const;
std::vector< sal_Unicode > getUnicodeFromAdobeName( const OString& rName ) const;
std::pair< std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
getUnicodeFromAdobeCode( sal_uInt8 aChar ) const
{
return m_aAdobecodeToUnicode.equal_range( aChar );
}
// creates a new font subset of an existing TrueType font // creates a new font subset of an existing TrueType font
// returns true in case of success, else false // returns true in case of success, else false
// nFont: the font to be subsetted // nFont: the font to be subsetted
......
...@@ -62,9 +62,6 @@ public: ...@@ -62,9 +62,6 @@ public:
static void DoFreeEmbedFontData( const void* pData, long nLen ); static void DoFreeEmbedFontData( const void* pData, long nLen );
// helper methods for sharing with X11SalGraphics // helper methods for sharing with X11SalGraphics
static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont,
const Ucs2OStrMap** pNonEncoded,
std::set<sal_Unicode> const** ppPriority);
static void DoGetGlyphWidths( psp::fontID aFont, static void DoGetGlyphWidths( psp::fontID aFont,
bool bVertical, bool bVertical,
std::vector< sal_Int32 >& rWidths, std::vector< sal_Int32 >& rWidths,
......
...@@ -182,7 +182,6 @@ private: ...@@ -182,7 +182,6 @@ private:
glyph in one of the subfonts, the mapping from unicode to the glyph in one of the subfonts, the mapping from unicode to the
glyph has to be remembered */ glyph has to be remembered */
std::vector< sal_Int32 > maPS1Font;
std::list< GlyphSet > maPS3Font; std::list< GlyphSet > maPS3Font;
sal_Int32 mnFontID; sal_Int32 mnFontID;
...@@ -233,7 +232,6 @@ public: ...@@ -233,7 +232,6 @@ public:
void PSSetColor (const PrinterColor& rColor) void PSSetColor (const PrinterColor& rColor)
{ maVirtualStatus.maColor = rColor; } { maVirtualStatus.maColor = rColor; }
void PSUploadPS1Font (sal_Int32 nFontID);
void PSSetFont (const OString& rName, void PSSetFont (const OString& rName,
rtl_TextEncoding nEncoding) rtl_TextEncoding nEncoding)
{ maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; } { maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; }
......
%language=C++
%global-table
%null-strings
%struct-type
struct hash_entry { const char* name; enum parseKey eKey; };
%%
Ascender,ASCENDER
Ascent,ASCENT
B,CHARBBOX
C,CODE
CC,COMPCHAR
CH,CODEHEX
CapHeight,CAPHEIGHT
CharWidth,CHARWIDTH
CharacterSet,CHARACTERSET
Characters,CHARACTERS
Comment,COMMENT
Descender,DESCENDER
Descent,DESCENT
Em,EM
EncodingScheme,ENCODINGSCHEME
EndCharMetrics,ENDCHARMETRICS
EndComposites,ENDCOMPOSITES
EndDirection,ENDDIRECTION
EndFontMetrics,ENDFONTMETRICS
EndKernData,ENDKERNDATA
EndKernPairs,ENDKERNPAIRS
EndTrackKern,ENDTRACKKERN
FamilyName,FAMILYNAME
FontBBox,FONTBBOX
FontName,FONTNAME
FullName,FULLNAME
IsBaseFont,ISBASEFONT
IsFixedPitch,ISFIXEDPITCH
ItalicAngle,ITALICANGLE
KP,KERNPAIR
KPX,KERNPAIRXAMT
L,LIGATURE
MappingScheme,MAPPINGSCHEME
MetricsSets,METRICSSETS
N,CHARNAME
Notice,NOTICE
PCC,COMPCHARPIECE
StartCharMetrics,STARTCHARMETRICS
StartComposites,STARTCOMPOSITES
StartDirection,STARTDIRECTION
StartFontMetrics,STARTFONTMETRICS
StartKernData,STARTKERNDATA
StartKernPairs,STARTKERNPAIRS
StartTrackKern,STARTTRACKKERN
StdHW,STDHW
StdVW,STDVW
TrackKern,TRACKKERN
UnderlinePosition,UNDERLINEPOSITION
UnderlineThickness,UNDERLINETHICKNESS
V,VVECTOR
Version,VERSION
W,XYWIDTH
W0X,X0WIDTH
WX,XWIDTH
Weight,WEIGHT
XHeight,XHEIGHT
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <cstdio> #include <cstdio>
#endif #endif
#define CACHE_MAGIC "LibreOffice PspFontCacheFile format 6" #define CACHE_MAGIC "LibreOffice PspFontCacheFile format 7"
using namespace std; using namespace std;
using namespace psp; using namespace psp;
...@@ -203,10 +203,6 @@ void FontCache::flush() ...@@ -203,10 +203,6 @@ void FontCache::flush()
switch( (*it)->m_eType ) switch( (*it)->m_eType )
{ {
case fonttype::Type1:
aLine.append(';');
aLine.append(static_cast<const PrintFontManager::Type1FontFile*>(*it)->m_aMetricFile);
break;
case fonttype::TrueType: case fonttype::TrueType:
aLine.append(';'); aLine.append(';');
aLine.append(static_cast<sal_Int32>(static_cast<const PrintFontManager::TrueTypeFontFile*>(*it)->m_nTypeFlags)); aLine.append(static_cast<sal_Int32>(static_cast<const PrintFontManager::TrueTypeFontFile*>(*it)->m_nTypeFlags));
...@@ -313,8 +309,7 @@ void FontCache::read() ...@@ -313,8 +309,7 @@ void FontCache::read()
const char* pLine = aLine.getStr(); const char* pLine = aLine.getStr();
fonttype::type eType = (fonttype::type)atoi( pLine ); fonttype::type eType = (fonttype::type)atoi( pLine );
if( eType != fonttype::TrueType && if( eType != fonttype::TrueType )
eType != fonttype::Type1 )
continue; continue;
while( *pLine && *pLine != ';' ) while( *pLine && *pLine != ';' )
pLine++; pLine++;
...@@ -335,9 +330,6 @@ void FontCache::read() ...@@ -335,9 +330,6 @@ void FontCache::read()
case fonttype::TrueType: case fonttype::TrueType:
pFont = new PrintFontManager::TrueTypeFontFile(); pFont = new PrintFontManager::TrueTypeFontFile();
break; break;
case fonttype::Type1:
pFont = new PrintFontManager::Type1FontFile();
break;
default: break; default: break;
} }
...@@ -414,14 +406,6 @@ void FontCache::read() ...@@ -414,14 +406,6 @@ void FontCache::read()
static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_aFontFile = aFile; static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_aFontFile = aFile;
nStyleTokenNr++; nStyleTokenNr++;
break; break;
case fonttype::Type1:
{
int nTokLen = (nTokens > 19 ) ? nTokenPos[19]-nTokenPos[18]-1 : nLen - nTokenPos[18];
static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_aMetricFile = OString( pLine + nTokenPos[18], nTokLen );
static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_nDirectory = nDir;
static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_aFontFile = aFile;
nStyleTokenNr++;
}
break; break;
default: break; default: break;
} }
...@@ -485,11 +469,6 @@ void FontCache::copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFo ...@@ -485,11 +469,6 @@ void FontCache::copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFo
static_cast<PrintFontManager::TrueTypeFontFile*>(pTo)->m_nCollectionEntry = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFrom)->m_nCollectionEntry; static_cast<PrintFontManager::TrueTypeFontFile*>(pTo)->m_nCollectionEntry = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFrom)->m_nCollectionEntry;
static_cast<PrintFontManager::TrueTypeFontFile*>(pTo)->m_nTypeFlags = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFrom)->m_nTypeFlags; static_cast<PrintFontManager::TrueTypeFontFile*>(pTo)->m_nTypeFlags = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFrom)->m_nTypeFlags;
break; break;
case fonttype::Type1:
static_cast<PrintFontManager::Type1FontFile*>(pTo)->m_nDirectory = static_cast<const PrintFontManager::Type1FontFile*>(pFrom)->m_nDirectory;
static_cast<PrintFontManager::Type1FontFile*>(pTo)->m_aFontFile = static_cast<const PrintFontManager::Type1FontFile*>(pFrom)->m_aFontFile;
static_cast<PrintFontManager::Type1FontFile*>(pTo)->m_aMetricFile = static_cast<const PrintFontManager::Type1FontFile*>(pFrom)->m_aMetricFile;
break;
default: break; default: break;
} }
pTo->m_nFamilyName = pFrom->m_nFamilyName; pTo->m_nFamilyName = pFrom->m_nFamilyName;
...@@ -534,16 +513,6 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print ...@@ -534,16 +513,6 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print
return false; return false;
} }
break; break;
case fonttype::Type1:
{
const PrintFontManager::Type1FontFile* pLT = static_cast<const PrintFontManager::Type1FontFile*>(pLeft);
const PrintFontManager::Type1FontFile* pRT = static_cast<const PrintFontManager::Type1FontFile*>(pRight);
if( pRT->m_nDirectory != pLT->m_nDirectory ||
pRT->m_aFontFile != pLT->m_aFontFile ||
pRT->m_aMetricFile != pLT->m_aMetricFile )
return false;
}
break;
default: break; default: break;
} }
if( pRight->m_nFamilyName != pLeft->m_nFamilyName || if( pRight->m_nFamilyName != pLeft->m_nFamilyName ||
...@@ -586,9 +555,6 @@ PrintFontManager::PrintFont* FontCache::clonePrintFont( const PrintFontManager:: ...@@ -586,9 +555,6 @@ PrintFontManager::PrintFont* FontCache::clonePrintFont( const PrintFontManager::
case fonttype::TrueType: case fonttype::TrueType:
pFont = new PrintFontManager::TrueTypeFontFile(); pFont = new PrintFontManager::TrueTypeFontFile();
break; break;
case fonttype::Type1:
pFont = new PrintFontManager::Type1FontFile();
break;
default: break; default: break;
} }
if( pFont ) if( pFont )
...@@ -635,10 +601,6 @@ void FontCache::updateFontCacheEntry( const PrintFontManager::PrintFont* pFont, ...@@ -635,10 +601,6 @@ void FontCache::updateFontCacheEntry( const PrintFontManager::PrintFont* pFont,
nDirID = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFont)->m_nDirectory; nDirID = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFont)->m_nDirectory;
aFile = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFont)->m_aFontFile; aFile = static_cast<const PrintFontManager::TrueTypeFontFile*>(pFont)->m_aFontFile;
break; break;
case fonttype::Type1:
nDirID = static_cast<const PrintFontManager::Type1FontFile*>(pFont)->m_nDirectory;
aFile = static_cast<const PrintFontManager::Type1FontFile*>(pFont)->m_aFontFile;
break;
default: default:
return; return;
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -558,15 +558,9 @@ void CairoTextRender::FreeEmbedFontData( const void* pData, long nLen ) ...@@ -558,15 +558,9 @@ void CairoTextRender::FreeEmbedFontData( const void* pData, long nLen )
GenPspGraphics::DoFreeEmbedFontData( pData, nLen ); GenPspGraphics::DoFreeEmbedFontData( pData, nLen );
} }
const Ucs2SIntMap* CairoTextRender::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority) const Ucs2SIntMap* CairoTextRender::GetFontEncodingVector(const PhysicalFontFace*, const Ucs2OStrMap**, std::set<sal_Unicode> const**)
{ {
// in this context the pFont->GetFontId() is a valid PSP return nullptr;
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
// be to have the GlyphCache search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
return GenPspGraphics::DoGetFontEncodingVector(aFont, pNonEncoded, ppPriority);
} }
void CairoTextRender::GetGlyphWidths( const PhysicalFontFace* pFont, void CairoTextRender::GetGlyphWidths( const PhysicalFontFace* pFont,
......
...@@ -948,11 +948,7 @@ bool GenPspGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, ...@@ -948,11 +948,7 @@ bool GenPspGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
{ {
// workaround for printers not handling glyph indexing for non-TT fonts if( nFallbackLevel > 0 )
int nFontId = m_pPrinterGfx->GetFontID();
if( psp::fonttype::TrueType != psp::PrintFontManager::get().getFontType( nFontId ) )
rArgs.mnFlags |= SalLayoutFlags::DisableGlyphProcessing;
else if( nFallbackLevel > 0 )
rArgs.mnFlags &= ~SalLayoutFlags::DisableGlyphProcessing; rArgs.mnFlags &= ~SalLayoutFlags::DisableGlyphProcessing;
GenericSalLayout* pLayout = nullptr; GenericSalLayout* pLayout = nullptr;
...@@ -996,15 +992,9 @@ bool GenPspGraphics::CreateFontSubset( ...@@ -996,15 +992,9 @@ bool GenPspGraphics::CreateFontSubset(
return bSuccess; return bSuccess;
} }
const Ucs2SIntMap* GenPspGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority) const Ucs2SIntMap* GenPspGraphics::GetFontEncodingVector(const PhysicalFontFace*, const Ucs2OStrMap**, std::set<sal_Unicode> const**)
{ {
// in this context the pFont->GetFontId() is a valid PSP return nullptr;
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
// be to have the GlyphCache search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded, ppPriority );
} }
void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
...@@ -1021,21 +1011,6 @@ void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, ...@@ -1021,21 +1011,6 @@ void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
} }
const Ucs2SIntMap* GenPspGraphics::DoGetFontEncodingVector( fontID aFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
psp::PrintFontInfo aFontInfo;
if( ! rMgr.getFontInfo( aFont, aFontInfo ) )
{
if( pNonEncoded )
*pNonEncoded = nullptr;
return nullptr;
}
return rMgr.getEncodingMap( aFont, pNonEncoded, ppPriority );
}
void GenPspGraphics::DoGetGlyphWidths( psp::fontID aFont, void GenPspGraphics::DoGetGlyphWidths( psp::fontID aFont,
bool bVertical, bool bVertical,
std::vector< sal_Int32 >& rWidths, std::vector< sal_Int32 >& rWidths,
...@@ -1057,7 +1032,7 @@ FontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo ...@@ -1057,7 +1032,7 @@ FontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo
aDFA.SetPitch( rInfo.m_ePitch ); aDFA.SetPitch( rInfo.m_ePitch );
aDFA.SetSymbolFlag( (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL) ); aDFA.SetSymbolFlag( (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL) );
aDFA.SetSubsettableFlag( rInfo.m_bSubsettable ); aDFA.SetSubsettableFlag( rInfo.m_bSubsettable );
aDFA.SetEmbeddableFlag( rInfo.m_bEmbeddable ); aDFA.SetEmbeddableFlag(false);
switch( rInfo.m_eType ) switch( rInfo.m_eType )
{ {
...@@ -1065,10 +1040,6 @@ FontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo ...@@ -1065,10 +1040,6 @@ FontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo
aDFA.SetQuality( 512 ); aDFA.SetQuality( 512 );
aDFA.SetBuiltInFontFlag( false ); aDFA.SetBuiltInFontFlag( false );
break; break;
case psp::fonttype::Type1:
aDFA.SetQuality( 0 );
aDFA.SetBuiltInFontFlag( false );
break;
default: default:
aDFA.SetQuality( 0 ); aDFA.SetQuality( 0 );
aDFA.SetBuiltInFontFlag( false ); aDFA.SetBuiltInFontFlag( false );
...@@ -1249,13 +1220,6 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs ...@@ -1249,13 +1220,6 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs
rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax );
std::vector<psp::CharacterMetric> aMetrics(nLen); std::vector<psp::CharacterMetric> aMetrics(nLen);
sal_Ucs aUnicodes[nLen];
if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 )
{
for (size_t i = 0; i < nLen; ++i)
aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i];
pUnicodes = aUnicodes;
}
if (!rMgr.getMetrics(aFont, pUnicodes, nLen, aMetrics.data())) if (!rMgr.getMetrics(aFont, pUnicodes, nLen, aMetrics.data()))
return nullptr; return nullptr;
...@@ -1287,11 +1251,6 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs ...@@ -1287,11 +1251,6 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs
case psp::fonttype::TrueType: case psp::fonttype::TrueType:
rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
break; break;
case psp::fonttype::Type1: {
const bool bPFA = *static_cast<unsigned char*>(pFile) < 0x80;
rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
}
break;
default: default:
DoFreeEmbedFontData( pFile, *pDataLen ); DoFreeEmbedFontData( pFile, *pDataLen );
return nullptr; return nullptr;
......
...@@ -53,7 +53,6 @@ GlyphSet::GlyphSet (sal_Int32 nFontID, bool bVertical) ...@@ -53,7 +53,6 @@ GlyphSet::GlyphSet (sal_Int32 nFontID, bool bVertical)
maBaseName = OUStringToOString (rMgr.getPSName(mnFontID), maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US); RTL_TEXTENCODING_ASCII_US);
mnBaseEncoding = rMgr.getFontEncoding(mnFontID); mnBaseEncoding = rMgr.getFontEncoding(mnFontID);
mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID);
} }
GlyphSet::~GlyphSet () GlyphSet::~GlyphSet ()
...@@ -386,31 +385,6 @@ GlyphSet::GetGlyphSetEncodingName (sal_Int32 nGlyphSetID) ...@@ -386,31 +385,6 @@ GlyphSet::GetGlyphSetEncodingName (sal_Int32 nGlyphSetID)
return GetGlyphSetEncodingName (GetGlyphSetEncoding(nGlyphSetID), maBaseName); return GetGlyphSetEncodingName (GetGlyphSetEncoding(nGlyphSetID), maBaseName);
} }
void
GlyphSet::PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID)
{
// only for ps fonts
if (meBaseType != fonttype::Type1)
return;
sal_Char pEncodingVector [256];
sal_Int32 nSize = 0;
nSize += psp::appendStr ("(", pEncodingVector + nSize);
nSize += psp::appendStr (GetReencodedFontName(GetGlyphSetEncoding(nGlyphSetID), maBaseName).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn (", pEncodingVector + nSize);
nSize += psp::appendStr (maBaseName.getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn ", pEncodingVector + nSize);
nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (" psp_definefont\n",
pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector, nSize);
}
OString OString
GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName) GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName)
{ {
...@@ -529,15 +503,6 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, ...@@ -529,15 +503,6 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
{ {
rGfx.PSMoveTo (rPoint); rGfx.PSMoveTo (rPoint);
if( mbUseFontEncoding )
{
OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) );
OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) );
rGfx.PSSetFont( aPSName, mnBaseEncoding );
rGfx.PSShowText( reinterpret_cast<const unsigned char*>(aBytes.getStr()), nLen, aBytes.getLength() );
return;
}
int nChar; int nChar;
unsigned char *pGlyphID = static_cast<unsigned char*>(alloca (nLen * sizeof(unsigned char))); unsigned char *pGlyphID = static_cast<unsigned char*>(alloca (nLen * sizeof(unsigned char)));
sal_Int32 *pGlyphSetID = static_cast<sal_Int32*>(alloca (nLen * sizeof(sal_Int32))); sal_Int32 *pGlyphSetID = static_cast<sal_Int32*>(alloca (nLen * sizeof(sal_Int32)));
...@@ -573,105 +538,9 @@ void ...@@ -573,105 +538,9 @@ void
GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray) const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray)
{ {
if( mbUseFontEncoding )
{
OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) );
OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) );
rGfx.PSMoveTo( rPoint );
rGfx.PSSetFont( aPSName, mnBaseEncoding );
rGfx.PSShowText( reinterpret_cast<const unsigned char*>(aBytes.getStr()), nLen, aBytes.getLength(), pDeltaArray );
return;
}
DrawGlyphs( rGfx, rPoint, nullptr, pStr, nLen, pDeltaArray, false); DrawGlyphs( rGfx, rPoint, nullptr, pStr, nLen, pDeltaArray, false);
} }
void
GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
{
// only for ps fonts
if (meBaseType != fonttype::Type1)
return;
if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL)
return;
PrintFontManager &rMgr = rGfx.GetFontMgr();
// loop through all the font subsets
sal_Int32 nGlyphSetID = 0;
char_list_t::iterator aGlyphSet;
for (aGlyphSet = maCharList.begin(); aGlyphSet != maCharList.end(); ++aGlyphSet)
{
++nGlyphSetID;
if (nGlyphSetID == 1) // latin1 page uses global reencoding table
{
PSDefineReencodedFont (pOutFile, nGlyphSetID);
continue;
}
if ((*aGlyphSet).empty()) // empty set, doesn't need reencoding
{
continue;
}
// create reencoding table
sal_Char pEncodingVector [256];
sal_Int32 nSize = 0;
nSize += psp::appendStr ("/",
pEncodingVector + nSize);
nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (" [ ",
pEncodingVector + nSize);
// need a list of glyphs, sorted by glyphid
typedef std::map< sal_uInt8, sal_Unicode > ps_mapping_t;
typedef ps_mapping_t::value_type ps_value_t;
ps_mapping_t aSortedGlyphSet;
char_map_t::const_iterator aUnsortedGlyph;
for (aUnsortedGlyph = (*aGlyphSet).begin();
aUnsortedGlyph != (*aGlyphSet).end();
++aUnsortedGlyph)
{
aSortedGlyphSet.insert(ps_value_t((*aUnsortedGlyph).second,
(*aUnsortedGlyph).first));
}
ps_mapping_t::const_iterator aSortedGlyph;
// loop through all the glyphs in the subset
for (aSortedGlyph = (aSortedGlyphSet).begin();
aSortedGlyph != (aSortedGlyphSet).end();
++aSortedGlyph)
{
nSize += psp::appendStr ("/",
pEncodingVector + nSize);
std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) );
if( !aName.empty() )
nSize += psp::appendStr ( aName.front().getStr(), pEncodingVector + nSize);
else
nSize += psp::appendStr (".notdef", pEncodingVector + nSize );
nSize += psp::appendStr (" ", pEncodingVector + nSize);
// flush line
if (nSize >= 70)
{
psp::appendStr ("\n", pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector);
nSize = 0;
}
}
nSize += psp::appendStr ("] def\n", pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector, nSize);
PSDefineReencodedFont (pOutFile, nGlyphSetID);
}
}
struct EncEntry struct EncEntry
{ {
unsigned char aEnc; unsigned char aEnc;
......
...@@ -45,7 +45,6 @@ private: ...@@ -45,7 +45,6 @@ private:
OString maBaseName; OString maBaseName;
fonttype::type meBaseType; fonttype::type meBaseType;
rtl_TextEncoding mnBaseEncoding; rtl_TextEncoding mnBaseEncoding;
bool mbUseFontEncoding;
typedef std::unordered_map< sal_Unicode, sal_uInt8 > char_map_t; typedef std::unordered_map< sal_Unicode, sal_uInt8 > char_map_t;
typedef std::list< char_map_t > char_list_t; typedef std::list< char_map_t > char_list_t;
...@@ -60,9 +59,6 @@ private: ...@@ -60,9 +59,6 @@ private:
sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID); sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID);
OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID); OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID);
void PSDefineReencodedFont (osl::File* pOutFile,
sal_Int32 nGlyphSetID);
bool GetCharID (sal_Unicode nChar, bool GetCharID (sal_Unicode nChar,
unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID);
bool LookupCharID (sal_Unicode nChar, bool LookupCharID (sal_Unicode nChar,
...@@ -113,7 +109,6 @@ public: ...@@ -113,7 +109,6 @@ public:
sal_Int16 nLen, sal_Int16 nLen,
const sal_Int32* pDeltaArray, const sal_Int32* pDeltaArray,
bool bUseGlyphs=true); bool bUseGlyphs=true);
void PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx);
void PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< OString >& rSuppliedFonts ); void PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< OString >& rSuppliedFonts );
}; };
......
...@@ -82,19 +82,6 @@ static int getVerticalDeltaAngle( sal_Unicode nChar ) ...@@ -82,19 +82,6 @@ static int getVerticalDeltaAngle( sal_Unicode nChar )
return 0; return 0;
} }
void
PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID)
{
// already in the document header ?
for ( int i : maPS1Font )
if( nFontID == i )
return;
// no occurrence yet, mark for download
// add the fontid to the list
maPS1Font.push_back (nFontID);
}
/* /*
* implement text handling printer routines, * implement text handling printer routines,
*/ */
...@@ -167,12 +154,6 @@ void PrinterGfx::DrawGlyphs( ...@@ -167,12 +154,6 @@ void PrinterGfx::DrawGlyphs(
return; return;
} }
if( mrFontMgr.getFontType( mnFontID ) != fonttype::TrueType )
{
DrawText( rPoint, pUnicodes, nLen, pDeltaArray );
return;
}
// move and rotate the user coordinate system // move and rotate the user coordinate system
// avoid the gsave/grestore for the simple cases since it allows // avoid the gsave/grestore for the simple cases since it allows
// reuse of the current font if it hasn't changed // reuse of the current font if it hasn't changed
...@@ -559,9 +540,6 @@ PrinterGfx::drawText( ...@@ -559,9 +540,6 @@ PrinterGfx::drawText(
fonttype::type eType = mrFontMgr.getFontType (mnFontID); fonttype::type eType = mrFontMgr.getFontType (mnFontID);
if (eType == fonttype::Type1)
PSUploadPS1Font (mnFontID);
if ( eType == fonttype::TrueType if ( eType == fonttype::TrueType
&& !mrFontMgr.isFontDownloadingAllowedForPrinting(mnFontID)) && !mrFontMgr.isFontDownloadingAllowedForPrinting(mnFontID))
{ {
...@@ -569,13 +547,6 @@ PrinterGfx::drawText( ...@@ -569,13 +547,6 @@ PrinterGfx::drawText(
return; return;
} }
if( mrFontMgr.getUseOnlyFontEncoding( mnFontID ) )
{
GlyphSet aGSet( mnFontID, mbTextVertical );
aGSet.DrawText( *this, rPoint, pStr, nLen, pDeltaArray );
return;
}
// search for a glyph set matching the set font // search for a glyph set matching the set font
std::list< GlyphSet >::iterator aIter; std::list< GlyphSet >::iterator aIter;
for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter) for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter)
...@@ -656,51 +627,11 @@ void ...@@ -656,51 +627,11 @@ void
PrinterGfx::OnEndJob () PrinterGfx::OnEndJob ()
{ {
maPS3Font.clear(); maPS3Font.clear();
maPS1Font.clear();
} }
void void
PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFonts ) PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFonts )
{ {
// write all type 1 fonts
// already in the document header ?
for (int aFont : maPS1Font)
{
const OString& rSysPath (mrFontMgr.getFontFileSysPath(aFont) );
OUString aUNCPath;
osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath);
osl::File aFontFile (aUNCPath);
// provide the pfb or pfa font as a (pfa-)font resource
OString aPostScriptName =
OUStringToOString ( mrFontMgr.getPSName(aFont),
RTL_TEXTENCODING_ASCII_US );
WritePS (pFile, "%%BeginResource: font ");
WritePS (pFile, aPostScriptName.getStr());
WritePS (pFile, "\n");
osl::File::RC nError = aFontFile.open(osl_File_OpenFlag_Read);
if (nError == osl::File::E_None)
{
convertPfbToPfa (aFontFile, *pFile);
aFontFile.close ();
char lastchar = '\n';
if (pFile->setPos(osl_Pos_Current, -1) == osl::FileBase::E_None)
{
sal_uInt64 uBytes(1);
pFile->read(static_cast<void *>(&lastchar), uBytes, uBytes);
}
if (lastchar != '\n')
WritePS (pFile, "\n");
}
WritePS (pFile, "%%EndResource\n");
rSuppliedFonts.push_back( aPostScriptName );
}
// write glyphsets and reencodings // write glyphsets and reencodings
std::list< GlyphSet >::iterator aIter; std::list< GlyphSet >::iterator aIter;
for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter) for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter)
...@@ -709,10 +640,6 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFon ...@@ -709,10 +640,6 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFon
{ {
aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts, rSuppliedFonts ); aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts, rSuppliedFonts );
} }
else
{
aIter->PSUploadEncoding (pFile, *this);
}
} }
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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