bump product version to 6.4.0.3
[LibreOffice.git] / vcl / inc / unx / cairotextrender.hxx
blobc0882bc35f86c375d35fa060a780ab70d013ed7b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_UNX_CAIROTEXTRENDER_HXX
21 #define INCLUDED_VCL_INC_UNX_CAIROTEXTRENDER_HXX
23 #include <textrender.hxx>
25 class FreetypeFont;
26 class GlyphCache;
27 typedef struct _cairo cairo_t;
29 class VCL_DLLPUBLIC CairoTextRender : public TextRenderImpl
31 FreetypeFont* mpFreetypeFont[ MAX_FALLBACK ];
33 Color mnTextColor;
35 protected:
36 virtual GlyphCache& getPlatformGlyphCache() = 0;
37 virtual cairo_t* getCairoContext() = 0;
38 virtual void getSurfaceOffset(double& nDX, double& nDY) = 0;
39 virtual void releaseCairoContext(cairo_t* cr) = 0;
41 virtual void clipRegion(cairo_t* cr) = 0;
43 public:
44 CairoTextRender();
45 virtual ~CairoTextRender() override;
47 virtual void SetTextColor( Color nColor ) override;
48 virtual void SetFont(LogicalFontInstance*, int nFallbackLevel) override;
49 virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
50 virtual FontCharMapRef GetFontCharMap() const override;
51 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
52 virtual void GetDevFontList( PhysicalFontCollection* ) override;
53 virtual void ClearDevFontCache() override;
54 virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
55 virtual bool CreateFontSubset(
56 const OUString& rToFile,
57 const PhysicalFontFace*,
58 const sal_GlyphId* pGlyphIDs,
59 const sal_uInt8* pEncoding,
60 sal_Int32* pWidths,
61 int nGlyphs,
62 FontSubsetInfo& rInfo) override;
64 virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
65 virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
66 virtual void GetGlyphWidths(
67 const PhysicalFontFace*,
68 bool bVertical,
69 std::vector< sal_Int32 >& rWidths,
70 Ucs2UIntMap& rUnicodeEnc ) override;
72 virtual std::unique_ptr<GenericSalLayout>
73 GetTextLayout(int nFallbackLevel) override;
74 virtual void DrawTextLayout(const GenericSalLayout&, const SalGraphics&) override;
75 #if ENABLE_CAIRO_CANVAS
76 virtual SystemFontData GetSysFontData( int nFallbackLevel ) const override;
77 #endif
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */