[Libreoffice-commits] .: 2 commits - vcl/win
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Feb 9 20:10:55 PST 2011
vcl/win/inc/salgdi.h | 3 +++
vcl/win/source/gdi/salgdi3.cxx | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 33627b90c9ba8015a2c37bf1b59105c790c1b13d
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 9 21:22:28 2011 -0500
Perhaps the font layout capabilities should be read only once per font?
Or else the boolean data member makes no sense. The mac code does it
that way too.
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 7ba5fda..82b0305 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1321,6 +1321,10 @@ void ImplWinFontData::ReadCmapTable( HDC hDC ) const
void ImplWinFontData::GetFontLayoutCapabilities( HDC hDC ) const
{
+ // read this only once per font
+ if( mbFontLayoutCapabilitiesRead )
+ return;
+
mbFontLayoutCapabilitiesRead = true;
// check the existence of a GSUB table
commit 797c363346185bf84a19950c2299d682e0ffc4d9
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 9 21:17:13 2011 -0500
Fixed a build breakage on Windows re FontLayoutCapabilities change.
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index 46c841c..e90f197 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -117,6 +117,7 @@ private:
bool mbAliasSymbolsLow;
private:
void ReadCmapTable( HDC ) const;
+ void GetFontLayoutCapabilities( HDC hDC ) const;
void ReadOs2Table( HDC ) const;
#ifdef GNG_VERT_HACK
@@ -292,6 +293,8 @@ public:
virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const;
+ // get the layout capabilities of the current font
+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const;
// graphics must fill supplied font list
virtual void GetDevFontList( ImplDevFontList* );
// graphics should call ImplAddDevFontSubstitute on supplied
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 6b4af9e..7ba5fda 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1107,7 +1107,7 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
mbHasGraphiteSupport( false ),
#endif
mbHasArabicSupport ( false ),
- mbFontLayoutCapabilities( false ),
+ mbFontLayoutCapabilitiesRead( false ),
mbAliasSymbolsLow( false ),
mbAliasSymbolsHigh( false ),
mnId( 0 ),
@@ -1330,7 +1330,7 @@ void ImplWinFontData::GetFontLayoutCapabilities( HDC hDC ) const
return;
std::vector<unsigned char> aTable( nLength );
- unsigned char* pTable = &Table[0];
+ unsigned char* pTable = &aTable[0];
::GetFontData( hDC, GsubTag, 0, pTable, nLength );
vcl::getTTFontLayoutCapabilities(maFontLayoutCapabilities, pTable);
More information about the Libreoffice-commits
mailing list