nss: upgrade to release 3.73
[LibreOffice.git] / vcl / unx / generic / gdi / font.cxx
blobd744dc28effcab70accba5e045f9c7b119bb8dd1
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 <vcl/sysdata.hxx>
21 #include <vcl/fontcharmap.hxx>
23 #include <unx/salgdi.h>
24 #include <textrender.hxx>
25 #include <sallayout.hxx>
27 void X11SalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
29 mxTextRenderImpl->DrawTextLayout(rLayout, *this);
32 FontCharMapRef X11SalGraphics::GetFontCharMap() const
34 return mxTextRenderImpl->GetFontCharMap();
37 bool X11SalGraphics::GetFontCapabilities(vcl::FontCapabilities &rGetImplFontCapabilities) const
39 return mxTextRenderImpl->GetFontCapabilities(rGetImplFontCapabilities);
42 // SalGraphics
43 void X11SalGraphics::SetFont(LogicalFontInstance* pEntry, int nFallbackLevel)
45 mxTextRenderImpl->SetFont(pEntry, nFallbackLevel);
48 void
49 X11SalGraphics::SetTextColor( Color nColor )
51 mxTextRenderImpl->SetTextColor(nColor);
54 bool X11SalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
55 const OUString& rFileURL,
56 const OUString& rFontName )
58 return mxTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName);
61 void X11SalGraphics::ClearDevFontCache()
63 mxTextRenderImpl->ClearDevFontCache();
66 void X11SalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
68 mxTextRenderImpl->GetDevFontList(pFontCollection);
71 void
72 X11SalGraphics::GetFontMetric( ImplFontMetricDataRef &rxFontMetric, int nFallbackLevel )
74 mxTextRenderImpl->GetFontMetric(rxFontMetric, nFallbackLevel);
77 std::unique_ptr<GenericSalLayout> X11SalGraphics::GetTextLayout(int nFallbackLevel)
79 return mxTextRenderImpl->GetTextLayout(nFallbackLevel);
82 bool X11SalGraphics::CreateFontSubset(
83 const OUString& rToFile,
84 const PhysicalFontFace* pFont,
85 const sal_GlyphId* pGlyphIds,
86 const sal_uInt8* pEncoding,
87 sal_Int32* pWidths,
88 int nGlyphCount,
89 FontSubsetInfo& rInfo
92 return mxTextRenderImpl->CreateFontSubset(rToFile, pFont,
93 pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
96 const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
98 return mxTextRenderImpl->GetEmbedFontData(pFont, pDataLen);
101 void X11SalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
103 mxTextRenderImpl->FreeEmbedFontData(pData, nLen);
106 void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
107 bool bVertical,
108 std::vector< sal_Int32 >& rWidths,
109 Ucs2UIntMap& rUnicodeEnc )
111 mxTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */