summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-11-18 13:30:50 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-11-18 13:30:50 +0000
commit50a140e0a75b7c6ab1adab39f532d6bf0a320f17 (patch)
treef5e83b4dec55f0ba35e2e40bc2a955054ca5ed0b /vcl/win/source
parent15e932d171734aa98b2c312945ee98cdc8cc43de (diff)
#104930# workaround windows glyph id bug
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx14
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx8
2 files changed, 15 insertions, 7 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index b87998a12821..ada5db2a6ce5 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdi3.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: hdu $ $Date: 2002-11-06 16:59:03 $
+ * last change: $Author: pl $ $Date: 2002-11-18 14:30:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2005,7 +2005,6 @@ BOOL SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// subset glyphs and get their properties
// take care that subset fonts require the NotDef glyph in pos 0
int nOrigCount = nGlyphs;
- DBG_ASSERT( nGlyphs < 256, "too many glyphs for subsetting" );
USHORT aShortIDs[ 256 ];
sal_uInt8 aTempEncs[ 256 ];
@@ -2013,9 +2012,13 @@ BOOL SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
for( i = 0; i < nGlyphs; ++i )
{
aTempEncs[i] = pEncoding[i];
- aShortIDs[i] = static_cast<USHORT>(pGlyphIDs[i]);
+ int nGFlags = pGlyphIDs[i] & GF_FLAGMASK;
+ if( nGFlags & GF_ISCHAR )
+ aShortIDs[i] = MapChar( aSftTTF.get(), pGlyphIDs[i] & GF_IDXMASK, 1 );
+ else
+ aShortIDs[i] = static_cast<USHORT>(pGlyphIDs[i] & GF_IDXMASK);
// find NotDef glyph
- if( !pGlyphIDs[i] )
+ if( !aShortIDs[i] )
nNotDef = i;
}
@@ -2031,6 +2034,7 @@ BOOL SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
aShortIDs[0] = 0;
aTempEncs[0] = 0;
}
+ DBG_ASSERT( nGlyphs < 257, "too many glyphs for subsetting" );
// fill pWidth array
TTSimpleGlyphMetrics* pMetrics =
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 1b1dffe0778a..e35e5e809a03 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: winlayout.cxx,v $
*
- * $Revision: 1.53 $
+ * $Revision: 1.54 $
*
- * last change: $Author: hdu $ $Date: 2002-11-13 15:59:02 $
+ * last change: $Author: pl $ $Date: 2002-11-18 14:30:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -522,7 +522,11 @@ int SimpleWinLayout::GetNextGlyphs( int nLen, long* pGlyphs, Point& rPos, int& n
// update returned values
long nGlyphIndex = mpOutGlyphs[ nStart ];
if( mnLayoutFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING )
+ {
+ if( mnLayoutFlags & SAL_LAYOUT_VERTICAL )
+ nGlyphIndex |= GetVerticalFlags( (sal_Unicode)(nGlyphIndex & GF_IDXMASK) );
nGlyphIndex |= GF_ISCHAR;
+ }
*(pGlyphs++) = nGlyphIndex;
if( pGlyphAdvances )
*(pGlyphAdvances++) = mpGlyphAdvances[ nStart ];