LibreOffice Module vcl (master)  1
embeddedfontshelper.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 
10 #ifndef INCLUDED_VCL_EMBEDDEDFONTSHELPER_HXX
11 #define INCLUDED_VCL_EMBEDDEDFONTSHELPER_HXX
12 
13 #include <vcl/dllapi.h>
14 
15 #include <rtl/ustring.hxx>
16 #include <tools/fontenum.hxx>
17 #include <vector>
18 
19 namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } }
20 namespace com { namespace sun { namespace star { namespace uno { template <typename > class Reference; } } } }
21 
27 {
28 public:
30  enum class FontRights
31  {
32  ViewingAllowed,
33  EditingAllowed
34  };
35 
39  static OUString fontFileUrl( const OUString& familyName, FontFamily family, FontItalic italic,
40  FontWeight weight, FontPitch pitch, FontRights rights );
41 
50  static bool addEmbeddedFont( const css::uno::Reference< css::io::XInputStream >& stream,
51  const OUString& fontName, const char* extra,
52  std::vector< unsigned char > key, bool eot = false);
53 
62  static OUString fileUrlForTemporaryFont( const OUString& fontName, const char* extra );
63 
71  static void activateFont( const OUString& fontName, const OUString& fileUrl );
72 
80  static bool sufficientTTFRights( const void* data, long size, FontRights rights );
81 
86  static void clearTemporaryFontFiles();
87 };
88 
89 #endif
90 
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
Reference
FontRights
Specification of what kind of operation is allowed when embedding a font.
FontPitch
FontFamily
FontWeight
Helper functions for handling embedded fonts in documents.
FontItalic