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 <tools/long.hxx>
26 #include <vcl/dllapi.h>
27 #include <vcl/fontcharmap.hxx>
28 
29 #include "fontattributes.hxx"
30 
32 struct FontMatchStatus;
33 class FontSelectPattern;
34 class PhysicalFontFamily;
35 
36 namespace vcl
37 {
38 struct FontCapabilities;
39 }
40 
42 {
43 public:
47  const OUString* mpTargetStyleName;
48 };
49 
50 
51 // TODO: no more direct access to members
52 // TODO: get rid of height/width for scalable fonts
53 // TODO: make cloning cheaper
54 
62 {
63 public:
64  virtual rtl::Reference<LogicalFontInstance> CreateFontInstance(const FontSelectPattern&) const = 0;
65 
66  int GetHeight() const { return mnHeight; }
67  int GetWidth() const { return mnWidth; }
68  virtual sal_IntPtr GetFontId() const = 0;
69  virtual FontCharMapRef GetFontCharMap() const = 0;
70  virtual bool GetFontCapabilities(vcl::FontCapabilities&) const = 0;
71 
72  bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const;
73  sal_Int32 CompareWithSize( const PhysicalFontFace& ) const;
74  sal_Int32 CompareIgnoreSize( const PhysicalFontFace& ) const;
75 
76 protected:
77  explicit PhysicalFontFace(const FontAttributes&);
78  void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; }
79 
80  tools::Long mnWidth; // Width (in pixels)
81  tools::Long mnHeight; // Height (in pixels)
82 };
83 
84 #endif // INCLUDED_VCL_INC_PHYSICALFONTFACE_HXX
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
87 
double mnHeight
int GetHeight() const
long Long
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