bump product version to 7.2.5.1
[LibreOffice.git] / vcl / inc / unx / freetypetextrender.hxx
blob2ac558eafaed699fa9b0575739a657ad4bd67444
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_FREETYPETEXTRENDER_HXX
21 #define INCLUDED_VCL_INC_UNX_FREETYPETEXTRENDER_HXX
23 #include <textrender.hxx>
25 class FreetypeFontInstance;
27 // Generic implementation that uses freetype, but DrawTextLayout()
28 // still needs implementing (e.g. by Cairo or Skia).
29 class VCL_DLLPUBLIC FreeTypeTextRenderImpl : public TextRenderImpl
31 protected:
32 rtl::Reference<FreetypeFontInstance>
33 mpFreetypeFont[ MAX_FALLBACK ];
35 Color mnTextColor;
37 public:
38 FreeTypeTextRenderImpl();
39 virtual ~FreeTypeTextRenderImpl() override;
41 virtual void SetTextColor( Color nColor ) override;
42 virtual void SetFont(LogicalFontInstance*, int nFallbackLevel) override;
43 virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
44 virtual FontCharMapRef GetFontCharMap() const override;
45 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
46 virtual void GetDevFontList( PhysicalFontCollection* ) override;
47 virtual void ClearDevFontCache() override;
48 virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
49 virtual bool CreateFontSubset(
50 const OUString& rToFile,
51 const PhysicalFontFace*,
52 const sal_GlyphId* pGlyphIDs,
53 const sal_uInt8* pEncoding,
54 sal_Int32* pWidths,
55 int nGlyphs,
56 FontSubsetInfo& rInfo) override;
58 virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
59 virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
60 virtual void GetGlyphWidths(
61 const PhysicalFontFace*,
62 bool bVertical,
63 std::vector< sal_Int32 >& rWidths,
64 Ucs2UIntMap& rUnicodeEnc ) override;
66 virtual std::unique_ptr<GenericSalLayout>
67 GetTextLayout(int nFallbackLevel) override;
70 #endif
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */