diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-03 11:00:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-03 11:16:09 +0000 |
commit | c7f3bf8c9eac84def2f5ae102dcfcad043583df0 (patch) | |
tree | 242ac0914ba5dc23d4113fde81295c136ab661b9 /vcl | |
parent | ff438bb4118916f5f12c9dadac0078812f783e48 (diff) |
Resolves: fdo#31243 glyph fallback for cairo-canvas
(cherry picked from commit cbd99e3bdd8a2bb887fb3eeb1e8d0a90f7576234)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/sysdata.hxx | 9 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx index 2fb67638e14e..2fd41c5df383 100644 --- a/vcl/inc/vcl/sysdata.hxx +++ b/vcl/inc/vcl/sysdata.hxx @@ -151,6 +151,7 @@ struct SystemGlyphData unsigned long index; double x; double y; + int fallbacklevel; }; @@ -179,12 +180,12 @@ struct SystemFontData // - SystemTextLayoutData - // -------------------- +typedef std::vector<SystemGlyphData> SystemGlyphDataVector; struct SystemTextLayoutData { - unsigned long nSize; // size in bytes of this structure - std::vector<SystemGlyphData> rGlyphData; // glyph data - int orientation; // Text orientation - SystemFontData aSysFontData; // Font data for the text layout + unsigned long nSize; // size in bytes of this structure + SystemGlyphDataVector rGlyphData; // glyph data + int orientation; // Text orientation }; #endif // _SV_SYSDATA_HXX diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index aa33704e02e0..21ce054e7df5 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -7339,7 +7339,6 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c // setup glyphs Point aPos; sal_GlyphId aGlyphId; - int nFallbacklevel = 0; for( int nStart = 0; rLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); ) { // NOTE: Windows backend is producing unicode chars (ucs4), so on windows, @@ -7349,15 +7348,12 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c aGlyph.index = static_cast<unsigned long> (aGlyphId & GF_IDXMASK); aGlyph.x = aPos.X(); aGlyph.y = aPos.Y(); - aSysLayoutData.rGlyphData.push_back(aGlyph); - int nLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT; - if (nLevel > nFallbacklevel && nLevel < MAX_FALLBACK) - nFallbacklevel = nLevel; + aGlyph.fallbacklevel = nLevel < MAX_FALLBACK ? nLevel : 0; + aSysLayoutData.rGlyphData.push_back(aGlyph); } // Get font data - aSysLayoutData.aSysFontData = GetSysFontData(nFallbacklevel); aSysLayoutData.orientation = rLayout->GetOrientation(); rLayout->Release(); |