diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-12-26 15:14:31 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-08 00:55:27 +0200 |
commit | bdccb7e9991d83029eb2f2f11327b54534a00db8 (patch) | |
tree | c32e95c49849647dc72c1071f375f3d2b67d8d7a /vcl/inc/win/winlayout.hxx | |
parent | 9615e45d2e2bac79c252a018846e4f20012cfa34 (diff) |
Refactor CommonSalLayout font handling
Moves all platform specific code from CommonSalLayout into the
platform specific plugins. This way the vcl library won't depend
on the Qt5 libraries and the Qt5Font header can be moved into the
qt5 VCL plugin.
While at it, switch the CommonSalLayouts font reference from the
FontSelectPattern to the LogicalFontInstance and also add the
harfbuzz font handling to the instance.
Change-Id: Ida910b8d88837ea949a2f84394ccc0cfae153060
Reviewed-on: https://gerrit.libreoffice.org/47408
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/inc/win/winlayout.hxx')
-rw-r--r-- | vcl/inc/win/winlayout.hxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 600817d8e2b8..ca0945949265 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -25,6 +25,7 @@ #include <sallayout.hxx> #include <svsys.h> #include <win/salgdi.h> +#include <CommonSalLayout.hxx> #include <opengl/PackedTextureAtlas.hxx> @@ -150,14 +151,20 @@ class WinFontInstance : public LogicalFontInstance public: virtual ~WinFontInstance() override; -public: bool CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, SalGraphics& rGraphics); GlyphCache& GetGlyphCache() { return maGlyphCache; } + bool hasHScale() const; + + void SetHDC(const HDC); + HFONT GetHFONT() const { return m_hFont; } private: explicit WinFontInstance(const PhysicalFontFace&, const FontSelectPattern&); - // TODO: also add HFONT??? Watch out for issues with too many active fonts... + virtual hb_font_t* ImplInitHbFont() override; + + HDC m_hDC; + HFONT m_hFont; GlyphCache maGlyphCache; }; |