summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorhdu <duerr@sun.com>2009-10-26 12:10:17 +0100
committerhdu <duerr@sun.com>2009-10-26 12:10:17 +0100
commit04c0a8dfe8e68ee04348206ba95872123d584e7e (patch)
treee4b3cf0bc296cacef1e167cda1c1d50a59628565 /vcl/source
parentee25c9743b281f7b94993ac274f158a71cc8ab80 (diff)
#i106087# inconsistent freetype tests/workaround for old versions
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx4
-rw-r--r--vcl/source/glyphs/graphite_adaptors.cxx10
-rw-r--r--vcl/source/glyphs/makefile.mk3
3 files changed, 9 insertions, 8 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 86feb0d31dae..18857b94af8f 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -135,7 +135,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 +473,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);
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx
index 9b16318fdc40..34e2f5f5bbe3 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -71,6 +71,8 @@ namespace
typedef std::hash_map<long,bool> SilfMap;
SilfMap sSilfMap;
}
+extern FT_Error (*pFTEmbolden)(FT_GlyphSlot);
+extern FT_Error (*pFTOblique)(FT_GlyphSlot);
// class CharacterRenderProperties implentation.
//
@@ -303,11 +305,11 @@ void GraphiteFontAdaptor::getGlyphMetrics(gr::gid16 nGlyphId, gr::Rect & aBoundi
return;
}
// check whether we need synthetic bold/italic otherwise metric is wrong
- if (mrFont.NeedsArtificialBold())
- FT_GlyphSlot_Embolden(aFace->glyph);
+ if (mrFont.NeedsArtificialBold() && pFTEmbolden)
+ (*pFTEmbolden)(aFace->glyph);
- if (mrFont.NeedsArtificialItalic())
- FT_GlyphSlot_Oblique(aFace->glyph);
+ if (mrFont.NeedsArtificialItalic() && pFTOblique)
+ (*pFTOblique)(aFace->glyph);
const FT_Glyph_Metrics &gm = aFace->glyph->metrics;
diff --git a/vcl/source/glyphs/makefile.mk b/vcl/source/glyphs/makefile.mk
index 3e79cdc63da2..e43daaeac2ee 100644
--- a/vcl/source/glyphs/makefile.mk
+++ b/vcl/source/glyphs/makefile.mk
@@ -42,9 +42,6 @@ ENABLE_EXCEPTIONS=true
.INCLUDE : $(PRJ)$/util$/makefile2.pmk
CFLAGS+= $(FREETYPE_CFLAGS)
-.IF "$(USE_FT_EMBOLDEN)" == "YES"
-CFLAGS+=-DUSE_FT_EMBOLDEN
-.ENDIF
# --- Files --------------------------------------------------------