1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
32 rtl::Reference
<FreetypeFontInstance
>
33 mpFreetypeFont
[ MAX_FALLBACK
];
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
,
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
*,
63 std::vector
< sal_Int32
>& rWidths
,
64 Ucs2UIntMap
& rUnicodeEnc
) override
;
66 virtual std::unique_ptr
<GenericSalLayout
>
67 GetTextLayout(int nFallbackLevel
) override
;
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */