LibreOffice Module vcl (master)  1
PhysicalFontFace.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  * 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 #ifndef INCLUDED_VCL_INC_PHYSICALFONTFACE_HXX
21 #define INCLUDED_VCL_INC_PHYSICALFONTFACE_HXX
22 
24 #include <rtl/ref.hxx>
25 #include <vcl/dllapi.h>
26 
27 #include "fontattributes.hxx"
28 
30 struct FontMatchStatus;
31 class FontSelectPattern;
32 class PhysicalFontFamily;
33 
35 {
36 public:
40  const OUString* mpTargetStyleName;
41 };
42 
43 
44 // TODO: no more direct access to members
45 // TODO: get rid of height/width for scalable fonts
46 // TODO: make cloning cheaper
47 
55 {
56 public:
57  virtual rtl::Reference<LogicalFontInstance> CreateFontInstance(const FontSelectPattern&) const = 0;
58 
59  int GetHeight() const { return mnHeight; }
60  int GetWidth() const { return mnWidth; }
61  virtual sal_IntPtr GetFontId() const = 0;
62 
63  bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const;
64  sal_Int32 CompareWithSize( const PhysicalFontFace& ) const;
65  sal_Int32 CompareIgnoreSize( const PhysicalFontFace& ) const;
66 
67 protected:
68  explicit PhysicalFontFace(const FontAttributes&);
69  void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; }
70 
71  long mnWidth; // Width (in pixels)
72  long mnHeight; // Height (in pixels)
73 };
74 
75 #endif // INCLUDED_VCL_INC_PHYSICALFONTFACE_HXX
76 
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
78 
double mnHeight
int GetHeight() const
int GetWidth() const
const OUString * mpTargetStyleName
abstract base class for physical font faces
void SetBitmapSize(int nW, int nH)
#define VCL_PLUGIN_PUBLIC
Definition: dllapi.h:40
double mnWidth