1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_INC_IMPFONTMETRIC_HXX
21 #define INCLUDED_VCL_INC_IMPFONTMETRIC_HXX
23 class ImplFontCharMap
;
24 typedef tools::SvRef
<ImplFontCharMap
> ImplFontCharMapRef
;
26 class ImplFontMetric
: public SvRefBase
29 explicit ImplFontMetric();
31 long GetAscent() const { return mnAscent
; }
32 long GetDescent() const { return mnDescent
; }
33 long GetInternalLeading() const { return mnIntLeading
; }
34 long GetExternalLeading() const { return mnExtLeading
; }
35 long GetLineHeight() const { return mnLineHeight
; } // TODO this is ascent + descnt
36 long GetSlant() const { return mnSlant
; }
37 long GetBulletOffset() const { return mnBulletOffset
; }
39 void SetAscent( long nAscent
) { mnAscent
= nAscent
; }
40 void SetDescent( long nDescent
) { mnDescent
= nDescent
; }
41 void SetInternalLeading( long nIntLeading
) { mnIntLeading
= nIntLeading
; }
42 void SetExternalLeading( long nExtLeading
) { mnExtLeading
= nExtLeading
; }
43 void SetLineHeight( long nHeight
) { mnLineHeight
= nHeight
; } // TODO this is ascent + descent
44 void SetSlant( long nSlant
) { mnSlant
= nSlant
; }
45 void SetBulletOffset( long nOffset
) { mnBulletOffset
= nOffset
; }
47 bool IsFullstopCentered() const { return mbFullstopCentered
; }
49 void SetFullstopCenteredFlag( bool bCentered
) { mbFullstopCentered
= bCentered
; }
51 bool operator==( const ImplFontMetric
& ) const;
54 friend class FontMetric
;
56 long mnAscent
; // Ascent
57 long mnDescent
; // Descent
58 long mnIntLeading
; // Internal Leading
59 long mnExtLeading
; // External Leading
60 long mnLineHeight
; // Ascent+Descent+EmphasisMark
61 long mnSlant
; // Slant
62 long mnBulletOffset
; // Offset for non-printing character
64 bool mbFullstopCentered
;
68 #endif // INCLUDED_VCL_INC_IMPFONTMETRIC_HXX
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */