diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-07 19:53:02 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-08 10:22:17 +0200 |
commit | ee18059ed6402eb0725048b3dd406852120a9faf (patch) | |
tree | 4cd998be7703475227b19508d2dfc0abc82f8a06 /include | |
parent | 72549d97c220d63d5fd5f6f38ae14f13c3e3d919 (diff) |
tdf#136545 revert cairo canvas uses cairo for text rendering already
This was the fallback path, so the problem must already exist in the uncommon
fallback case. I think I know the best approach to take, but for the 7-0 case
be conservative and restore the historic state.
this reverts 770892a387361067d23ab08ed38690c50b8b9395 and associated
code removal
Change-Id: I0e61d934e4dae03442ca5910f802199a1d3d53f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102197
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/outdev.hxx | 15 | ||||
-rw-r--r-- | include/vcl/sysdata.hxx | 43 | ||||
-rw-r--r-- | include/vcl/vcllayout.hxx | 3 |
3 files changed, 60 insertions, 1 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 372d1a7e4830..26a2920b86e1 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -55,6 +55,8 @@ struct ImplOutDevData; class LogicalFontInstance; struct SystemGraphicsData; +struct SystemFontData; +struct SystemTextLayoutData; class ImplFontCache; class PhysicalFontCollection; class ImplDeviceFontList; @@ -1231,6 +1233,15 @@ public: bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const; + + /** Retrieve detailed font information in platform independent structure + + @param nFallbacklevel Fallback font level (0 = best matching font) + + @return SystemFontData + */ + SystemFontData GetSysFontData( int nFallbacklevel ) const; + SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight ); SAL_DLLPRIVATE static FontEmphasisMark @@ -1320,6 +1331,10 @@ private: public: + SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr, + sal_Int32 nIndex, sal_Int32 nLen, + const long* pDXAry ) const; + // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI SAL_DLLPRIVATE bool ImplIsAntiparallel() const ; SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const; diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 1be73fef8856..3152fa3bed56 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -185,6 +185,49 @@ struct SystemWindowData #endif }; +struct SystemGlyphData +{ + sal_uInt32 index; + double x; + double y; + int fallbacklevel; +}; + +#if ENABLE_CAIRO_CANVAS + +struct SystemFontData +{ +#if defined( UNX ) + void* nFontId; // native font id + int nFontFlags; // native font flags +#endif + bool bFakeBold; // Does this font need faking the bold style + bool bFakeItalic; // Does this font need faking the italic style + bool bAntialias; // Should this font be antialiased + bool bVerticalCharacterType; // Is the font using vertical character type + + SystemFontData() + : +#if defined( UNX ) + nFontId( nullptr ), + nFontFlags( 0 ), +#endif + bFakeBold( false ), + bFakeItalic( false ), + bAntialias( true ), + bVerticalCharacterType( false ) + { + } +}; + +#endif // ENABLE_CAIRO_CANVAS + +struct SystemTextLayoutData +{ + std::vector<SystemGlyphData> rGlyphData; // glyph data + int orientation; // Text orientation +}; + #endif // INCLUDED_VCL_SYSDATA_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx index 1d6aa9f174f5..99884011e928 100644 --- a/include/vcl/vcllayout.hxx +++ b/include/vcl/vcllayout.hxx @@ -89,7 +89,8 @@ public: // methods using glyph indexing virtual bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, - const PhysicalFontFace** pFallbackFont = nullptr) const = 0; + const PhysicalFontFace** pFallbackFont = nullptr, + int* const pFallbackLevel = nullptr) const = 0; virtual bool GetOutline(basegfx::B2DPolyPolygonVector&) const; bool GetBoundRect(tools::Rectangle&) const; |