Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / headless / svptext.cxx
blob3751a0f217e773e6aba042acc207fb346b708994
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 #include <sal/types.h>
21 #include <vcl/fontcharmap.hxx>
22 #include <basegfx/range/b2ibox.hxx>
23 #include "headless/svpgdi.hxx"
24 #include <config_cairo_canvas.h>
25 #include "impfontmetricdata.hxx"
26 #include "CommonSalLayout.hxx"
28 void SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel )
30 m_aTextRenderImpl.SetFont(pIFSD, nFallbackLevel);
33 void SvpSalGraphics::GetFontMetric( ImplFontMetricDataRef& xFontMetric, int nFallbackLevel )
35 m_aTextRenderImpl.GetFontMetric(xFontMetric, nFallbackLevel);
38 const FontCharMapRef SvpSalGraphics::GetFontCharMap() const
40 return m_aTextRenderImpl.GetFontCharMap();
43 bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
45 return m_aTextRenderImpl.GetFontCapabilities(rFontCapabilities);
48 void SvpSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
50 m_aTextRenderImpl.GetDevFontList(pFontCollection);
53 void SvpSalGraphics::ClearDevFontCache()
55 m_aTextRenderImpl.ClearDevFontCache();
58 bool SvpSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
59 const OUString& rFileURL, const OUString& rFontName)
61 return m_aTextRenderImpl.AddTempDevFont(pFontCollection, rFileURL, rFontName);
64 bool SvpSalGraphics::CreateFontSubset(
65 const OUString& rToFile,
66 const PhysicalFontFace* pFont,
67 const sal_GlyphId* pGlyphIds,
68 const sal_uInt8* pEncoding,
69 sal_Int32* pWidths,
70 int nGlyphCount,
71 FontSubsetInfo& rInfo)
73 return m_aTextRenderImpl.CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
76 const void* SvpSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
78 return m_aTextRenderImpl.GetEmbedFontData(pFont, pDataLen);
81 void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
83 m_aTextRenderImpl.FreeEmbedFontData(pData, nLen);
86 void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
87 bool bVertical,
88 std::vector< sal_Int32 >& rWidths,
89 Ucs2UIntMap& rUnicodeEnc )
91 m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
94 bool SvpSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
96 return m_aTextRenderImpl.GetGlyphBoundRect(rGlyph, rRect);
99 bool SvpSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon& rPolyPoly)
101 return m_aTextRenderImpl.GetGlyphOutline(rGlyph, rPolyPoly);
104 SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
106 return m_aTextRenderImpl.GetTextLayout(rArgs, nFallbackLevel);
109 void SvpSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
111 m_aTextRenderImpl.DrawTextLayout(rLayout);
114 void SvpSalGraphics::SetTextColor( SalColor nSalColor )
116 m_aTextRenderImpl.SetTextColor(nSalColor);
119 #if ENABLE_CAIRO_CANVAS
121 SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
123 return m_aTextRenderImpl.GetSysFontData(nFallbacklevel);
126 #endif // ENABLE_CAIRO_CANVAS
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */