diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:53:31 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:53:31 +0000 |
commit | 79557b73578b3d0f5c551f951d64688dc81a30e6 (patch) | |
tree | d3872b0ed70d6581fbc06364635df600a6db95af /vcl/source/glyphs | |
parent | abb93c957ee20b7478286d6d1165e08e01a89db0 (diff) |
INTEGRATION: CWS vcl27 (1.105.46); FILE MERGED
2004/09/17 15:08:57 pl 1.105.46.2: RESYNC: (1.105-1.107); FILE MERGED
2004/09/15 11:56:28 hdu 1.105.46.1: #110416# fix GetGlyphOutline for rotated text by disabling bitmap optimized rotation in that case
Diffstat (limited to 'vcl/source/glyphs')
-rw-r--r-- | vcl/source/glyphs/gcach_ftyp.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index bcd5ba8c91ec..7e8cd13809d8 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gcach_ftyp.cxx,v $ * - * $Revision: 1.107 $ + * $Revision: 1.108 $ * - * last change: $Author: rt $ $Date: 2004-09-08 15:08:00 $ + * last change: $Author: hr $ $Date: 2004-10-13 08:53:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -947,7 +947,8 @@ static inline void SplitGlyphFlags( const FreetypeServerFont& rFont, int& nGlyph // ----------------------------------------------------------------------- -int FreetypeServerFont::ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* pGlyphFT ) const +int FreetypeServerFont::ApplyGlyphTransform( int nGlyphFlags, + FT_GlyphRec_* pGlyphFT, bool bForBitmapProcessing ) const { int nAngle = GetFontSelData().mnOrientation; // shortcut most common case @@ -1000,10 +1001,10 @@ int FreetypeServerFont::ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* pGly { FT_Glyph_Transform( pGlyphFT, NULL, &aVector ); - // orthogonal transforms are handled by bitmap operations - // apply non-orthogonal or stretch transformations here - if( (nAngle % 900) != 0 || bStretched ) + // orthogonal transforms are better handled by bitmap operations + if( bStretched || (bForBitmapProcessing && (nAngle % 900) != 0) ) { + // apply non-orthogonal or stretch transformations FT_Glyph_Transform( pGlyphFT, &aMatrix, NULL ); nAngle = 0; } @@ -1184,7 +1185,7 @@ void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const FT_Glyph pGlyphFT; rc = FT_Get_Glyph( maFaceFT->glyph, &pGlyphFT ); - int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT ); + int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT, false ); rGD.SetDelta( (pGlyphFT->advance.x + 0x8000) >> 16, -((pGlyphFT->advance.y + 0x8000) >> 16) ); FT_BBox aBbox; @@ -1255,7 +1256,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap if( rc != FT_Err_Ok ) return false; - int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT ); + int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT, true ); if( pGlyphFT->format != ft_glyph_format_bitmap ) { @@ -1356,7 +1357,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap if( rc != FT_Err_Ok ) return false; - int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT ); + int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT, true ); if( pGlyphFT->format == ft_glyph_format_outline ) ((FT_OutlineGlyph)pGlyphFT)->outline.flags |= ft_outline_high_precision; @@ -1970,7 +1971,7 @@ bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPol long nMaxPoints = 1 + rOutline.n_points * 3; PolyArgs aPolyArg( rPolyPoly, nMaxPoints ); - int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT ); + int nAngle = ApplyGlyphTransform( nGlyphFlags, pGlyphFT, false ); FT_Outline_Funcs aFuncs; aFuncs.move_to = &FT_move_to; |