summaryrefslogtreecommitdiff
path: root/vcl/source/glyphs/gcach_ftyp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/glyphs/gcach_ftyp.cxx')
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 712c2334b35c..b92bea929c51 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -43,6 +43,7 @@
#include "tools/poly.hxx"
#include "basegfx/matrix/b2dhommatrix.hxx"
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include "basegfx/polygon/b2dpolypolygon.hxx"
#include "osl/file.hxx"
@@ -135,7 +136,8 @@ static int nFTVERSION = 0;
static FT_Error (*pFTNewSize)(FT_Face,FT_Size*);
static FT_Error (*pFTActivateSize)(FT_Size);
static FT_Error (*pFTDoneSize)(FT_Size);
-static FT_Error (*pFTEmbolden)(FT_GlyphSlot);
+FT_Error (*pFTEmbolden)(FT_GlyphSlot);
+FT_Error (*pFTOblique)(FT_GlyphSlot);
static bool bEnableSizeFT = false;
struct EqStr{ bool operator()(const char* a, const char* b) const { return !strcmp(a,b); } };
@@ -472,6 +474,7 @@ FreetypeManager::FreetypeManager()
pFTActivateSize = (FT_Error(*)(FT_Size))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_Activate_Size" );
pFTDoneSize = (FT_Error(*)(FT_Size))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_Done_Size" );
pFTEmbolden = (FT_Error(*)(FT_GlyphSlot))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_GlyphSlot_Embolden" );
+ pFTOblique = (FT_Error(*)(FT_GlyphSlot))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_GlyphSlot_Oblique" );
bEnableSizeFT = (pFTNewSize!=NULL) && (pFTActivateSize!=NULL) && (pFTDoneSize!=NULL);
@@ -2280,9 +2283,7 @@ bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex,
// convert to basegfx polypolygon
// TODO: get rid of the intermediate tools polypolygon
rB2DPolyPoly = aToolPolyPolygon.getB2DPolyPolygon();
- ::basegfx::B2DHomMatrix aMatrix;
- aMatrix.scale( +1.0/(1<<6), -1.0/(1<<6) );
- rB2DPolyPoly.transform( aMatrix );
+ rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( +1.0/(1<<6), -1.0/(1<<6) ));
return true;
}
@@ -2487,10 +2488,12 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
{
const USHORT nGlyph0 = GetUShort( pCoverage+0 );
const USHORT nGlyph1 = GetUShort( pCoverage+2 );
- const USHORT nCovIdx = GetUShort( pCoverage+4 );
+ const USHORT nStartCoverageIndex = GetUShort( pCoverage+4 );
+ DBG_ASSERT( aSubstVector.size() == nStartCoverageIndex, "coverage index mismatch");
+ (void)nStartCoverageIndex;
pCoverage += 6;
for( USHORT j = nGlyph0; j <= nGlyph1; ++j )
- aSubstVector.push_back( GlyphSubst( j + nCovIdx, 0 ) );
+ aSubstVector.push_back( GlyphSubst( j, 0 ) );
}
}
break;