/src/libreoffice/vcl/headless/svptext.cxx
Line | Count | Source |
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 | | #include <vcl/fontcharmap.hxx> |
21 | | #include <sal/config.h> |
22 | | #include <headless/svpgdi.hxx> |
23 | | #include <font/FontMetricData.hxx> |
24 | | #include <sallayout.hxx> |
25 | | |
26 | | void SvpSalGraphics::SetFont(LogicalFontInstance* pIFSD, int nFallbackLevel) |
27 | 5.79M | { |
28 | 5.79M | m_aTextRenderImpl.SetFont(pIFSD, nFallbackLevel); |
29 | 5.79M | } |
30 | | |
31 | | void SvpSalGraphics::GetFontMetric( FontMetricDataRef& xFontMetric, int nFallbackLevel ) |
32 | 210k | { |
33 | 210k | m_aTextRenderImpl.GetFontMetric(xFontMetric, nFallbackLevel); |
34 | 210k | } |
35 | | |
36 | | FontCharMapRef SvpSalGraphics::GetFontCharMap() const |
37 | 211k | { |
38 | 211k | return m_aTextRenderImpl.GetFontCharMap(); |
39 | 211k | } |
40 | | |
41 | | bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const |
42 | 67.8k | { |
43 | 67.8k | return m_aTextRenderImpl.GetFontCapabilities(rFontCapabilities); |
44 | 67.8k | } |
45 | | |
46 | | void SvpSalGraphics::GetDevFontList( vcl::font::PhysicalFontCollection* pFontCollection ) |
47 | 39 | { |
48 | 39 | m_aTextRenderImpl.GetDevFontList(pFontCollection); |
49 | 39 | } |
50 | | |
51 | | void SvpSalGraphics::ClearDevFontCache() |
52 | 0 | { |
53 | 0 | m_aTextRenderImpl.ClearDevFontCache(); |
54 | 0 | } |
55 | | |
56 | | bool SvpSalGraphics::AddTempDevFont( vcl::font::PhysicalFontCollection* pFontCollection, |
57 | | const OUString& rFileURL, const OUString& rFontName) |
58 | 0 | { |
59 | 0 | return m_aTextRenderImpl.AddTempDevFont(pFontCollection, rFileURL, rFontName); |
60 | 0 | } |
61 | | |
62 | | bool SvpSalGraphics::RemoveTempDevFont(const OUString& rFileURL, const OUString& rFontName) |
63 | 0 | { |
64 | 0 | return m_aTextRenderImpl.RemoveTempDevFont(rFileURL, rFontName); |
65 | 0 | } |
66 | | |
67 | | std::unique_ptr<GenericSalLayout> SvpSalGraphics::GetTextLayout(int nFallbackLevel) |
68 | 22.9M | { |
69 | 22.9M | return m_aTextRenderImpl.GetTextLayout(nFallbackLevel); |
70 | 22.9M | } |
71 | | |
72 | | void SvpSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout) |
73 | 45.0k | { |
74 | 45.0k | m_aTextRenderImpl.DrawTextLayout(rLayout, *this); |
75 | 45.0k | } |
76 | | |
77 | | void SvpSalGraphics::DrawSalLayout(const GenericSalLayout& rLayout, void* pSurface, const basegfx::BColor& rTextColor, bool bAntiAliased) const |
78 | 0 | { |
79 | 0 | CairoTextRender::ImplDrawTextLayout( |
80 | 0 | static_cast<cairo_t*>(pSurface), |
81 | 0 | Color(rTextColor), |
82 | 0 | rLayout, |
83 | 0 | nullptr, |
84 | 0 | bAntiAliased); |
85 | 0 | } |
86 | | |
87 | | void SvpSalGraphics::SetTextColor( Color nColor ) |
88 | 15.0k | { |
89 | 15.0k | m_aTextRenderImpl.SetTextColor(nColor); |
90 | 15.0k | } |
91 | | |
92 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |