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 .
19 #ifndef __com_sun_star_rendering_FontMetrics_idl__
20 #define __com_sun_star_rendering_FontMetrics_idl__
22 module com
{ module sun
{ module star
{ module rendering
{
24 /** Metrics global to the font, i.e. not specific to single
25 glyphs. The font height is defined as
26 ascent+descent+internalLeading, and therefore not explicitly
29 Please note that when querying FontMetrics from an XCanvasFont
30 interface, all values here are given relative to the font cell
31 size. That means, the referenceCharWidth and/or
32 ascent+descent+internalLeading will approximately (rounded to
33 integer device resolution, or exactly, if fractional font
34 rendering is enabled) match the referenceAdvancement/cellSize
35 members of the FontRequest for which the XCanvasFont was
36 queried. Please be aware that the values returned in this
37 structure only map one-to-one to device pixel, if the combined
38 rendering transformation for text output equals the identity
39 transformation. Otherwise, the text output (and thus the resulting
40 metrics) will be subject to that transformation. Depending on the
41 underlying font technology, actual device output might be off by
42 up to one device pixel from the transformed metrics.
48 /// Ascent (above the baseline) part of the font.
52 /// Descent (below the baseline) part of the font.
56 /// Extra space above ascent
57 double InternalLeading
;
60 /** Extra space outside the font cells.<p>
62 It should not contain ink marks and is typically used
63 by the font designer to modify the line distance.<p>
65 double ExternalLeading
;
68 /** This value specifies the reference character width of the
71 It's roughly equivalent to the average width of all
72 characters, and if one needs a font with double character
73 width, the referenceCharSize should be doubled.<p>
75 double ReferenceCharSize
;
78 /** Specifies the offset to be added to the baseline when drawing
81 double UnderlineOffset
;
84 /** Specifies the offset to be added to the baseline when striking
87 double StrikeThroughOffset
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */