LibreOffice Module vcl (master)  1
freetypetextrender.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_UNX_FREETYPETEXTRENDER_HXX
21 #define INCLUDED_VCL_INC_UNX_FREETYPETEXTRENDER_HXX
22 
23 #include <textrender.hxx>
24 
26 
27 // Generic implementation that uses freetype, but DrawTextLayout()
28 // still needs implementing (e.g. by Cairo or Skia).
30 {
31 protected:
33  mpFreetypeFont[ MAX_FALLBACK ];
34 
36 
37 public:
39  virtual ~FreeTypeTextRenderImpl() override;
40 
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;
57 
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;
65 
66  virtual std::unique_ptr<GenericSalLayout>
67  GetTextLayout(int nFallbackLevel) override;
68 };
69 
70 #endif
71 
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel)=0
virtual void GetGlyphWidths(const PhysicalFontFace *, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc)=0
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
#define MAX_FALLBACK
Definition: sallayout.hxx:42
long Long
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen)=0
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:28
virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const =0
abstract base class for physical font faces
virtual const void * GetEmbedFontData(const PhysicalFontFace *, tools::Long *pDataLen)=0
virtual void SetTextColor(Color nColor)=0
unsigned char sal_uInt8
virtual void GetDevFontList(PhysicalFontCollection *)=0
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName)=0
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel)=0
virtual FontCharMapRef GetFontCharMap() const =0
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel)=0
virtual void ClearDevFontCache()=0
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:64
virtual bool CreateFontSubset(const OUString &rToFile, const PhysicalFontFace *, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo)=0