Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / inc / textrender.hxx
blob12c47c3ac715d3a162a564838652f1fdffe0e28b
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_CAIROFONTIMPL_HXX
21 #define INCLUDED_VCL_INC_UNX_CAIROFONTIMPL_HXX
23 #include <sal/types.h>
24 #include <vcl/salgtype.hxx>
25 #include <vcl/vclenum.hxx>
26 #include <vcl/metric.hxx>
27 #include <basebmp/bitmapdevice.hxx>
28 #include "salgdi.hxx"
29 #include "salglyphid.hxx"
30 #include "fontsubset.hxx"
32 class PspSalPrinter;
33 class PspSalInfoPrinter;
34 class ServerFont;
35 class ImplLayoutArgs;
36 class ServerFontLayout;
37 class PhysicalFontCollection;
38 class PhysicalFontFace;
40 class TextRenderImpl
42 public:
43 virtual ~TextRenderImpl() {}
45 virtual void setDevice(basebmp::BitmapDeviceSharedPtr& /*rDevice*/) {}
47 virtual void SetTextColor( SalColor nSalColor ) = 0;
48 virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ) = 0;
49 virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ) = 0;
50 virtual const FontCharMapPtr GetFontCharMap() const = 0;
51 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const = 0;
52 virtual void GetDevFontList( PhysicalFontCollection* ) = 0;
53 virtual void ClearDevFontCache() = 0;
54 virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) = 0;
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) = 0;
64 virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const** ppPriority) = 0;
65 virtual const void* GetEmbedFontData(
66 const PhysicalFontFace*,
67 const sal_Ucs* pUnicodes,
68 sal_Int32* pWidths,
69 size_t nLen,
70 FontSubsetInfo& rInfo,
71 long* pDataLen ) = 0;
73 virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
74 virtual void GetGlyphWidths(
75 const PhysicalFontFace*,
76 bool bVertical,
77 Int32Vector& rWidths,
78 Ucs2UIntMap& rUnicodeEnc ) = 0;
80 virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) = 0;
81 virtual bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& ) = 0;
82 virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
83 virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0;
84 virtual SystemFontData GetSysFontData( int nFallbackLevel ) const = 0;
87 #endif
89 /* vim:set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */