update emoji autocorrect entries from po-files
[LibreOffice.git] / vcl / source / gdi / pdffontcache.hxx
blob88229e2933791db1145ff8917ef9b8514f29f598
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_SOURCE_GDI_PDFFONTCACHE_HXX
21 #define INCLUDED_VCL_SOURCE_GDI_PDFFONTCACHE_HXX
23 #include <sal/types.h>
25 #include <sallayout.hxx>
26 #include <salgdi.hxx>
28 namespace vcl
30 class PDFFontCache
32 struct FontIdentifier
34 sal_IntPtr m_nFontId;
35 int m_nMagic;
36 bool m_bVertical;
38 FontIdentifier( const PhysicalFontFace*, bool bVertical );
39 FontIdentifier() : m_nFontId(0), m_nMagic(0), m_bVertical( false ) {}
41 bool operator==( const FontIdentifier& rRight ) const
43 return m_nFontId == rRight.m_nFontId &&
44 m_nMagic == rRight.m_nMagic &&
45 m_bVertical == rRight.m_bVertical;
47 bool operator<( const FontIdentifier& rRight ) const
49 return m_nFontId < rRight.m_nFontId ||
50 m_nMagic < rRight.m_nMagic ||
51 m_bVertical < rRight.m_bVertical;
54 struct FontData
56 Int32Vector m_nWidths;
57 Ucs2UIntMap m_aGlyphIdToIndex;
59 typedef std::map< FontIdentifier, sal_uInt32 > FontToIndexMap;
61 std::vector< FontData > m_aFonts;
62 FontToIndexMap m_aFontToIndex;
64 FontData& getFont( const PhysicalFontFace*, bool bVertical );
65 public:
66 PDFFontCache() {}
67 ~PDFFontCache() {}
69 sal_Int32 getGlyphWidth( const PhysicalFontFace*, sal_GlyphId, bool bVertical, SalGraphics* );
73 #endif
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */