summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Duerr <hdu@openoffice.org>2001-07-25 16:11:16 +0000
committerHerbert Duerr <hdu@openoffice.org>2001-07-25 16:11:16 +0000
commit6cd1172ed2c8bee00f1f697432b6e565190f07eb (patch)
tree51b1697945c28c21ff86d651864adf16cdaac213 /vcl
parent5a751cf0faed2407fc5624db5e505120f1c07d82 (diff)
#89114# GetGlyphBoundRect() no longer relative to lineheight but to ascent
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index e3b33d380aba..a67237225fd6 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdi3.cxx,v $
*
- * $Revision: 1.63 $
+ * $Revision: 1.64 $
*
- * last change: $Author: pl $ $Date: 2001-07-20 08:24:30 $
+ * last change: $Author: hdu $ $Date: 2001-07-25 17:11:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1971,8 +1971,7 @@ SalGraphics::GetFontMetric( ImplFontMetricData *pMetric )
if( maGraphicsData.mpServerSideFont != NULL )
{
long rDummyFactor;
- maGraphicsData.mpServerSideFont->FetchFontMetric( *pMetric,
- rDummyFactor );
+ maGraphicsData.mpServerSideFont->FetchFontMetric( *pMetric, rDummyFactor );
return;
}
#endif //USE_BUILTIN_RASTERIZER
@@ -2178,6 +2177,7 @@ SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
PairKernData* pPKD = pXpPKD->pkd;
for( i = 0, nCurPair=0; i < pXpPKD->numOfPairs; i++ )
+
{
unsigned char c1 = TranslateCharName( pPKD[i].name1 );
unsigned char c2 = TranslateCharName( pPKD[i].name2 );
@@ -2222,9 +2222,12 @@ SalGraphics::GetGlyphBoundRect( xub_Unicode cChar,
const int nGlyphIndex = rSF.GetGlyphIndex( cChar );
const GlyphMetric& rGM = rSF.GetGlyphMetric( nGlyphIndex );
- int nHeight = maGraphicsData.mpServerSideFont->GetFontSelData().mnHeight;
+ long rFactor;
+ ImplFontMetricData rTo;
+ rSF.FetchFontMetric( rTo, rFactor );
+
*pX = rGM.GetOffset().X();
- *pY = nHeight - rGM.GetOffset().Y();
+ *pY = rTo.mnAscent + rGM.GetOffset().Y();
*pDX = rGM.GetSize().Width();
*pDY = rGM.GetSize().Height();