1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_FontMetrics_idl__
28 #define __com_sun_star_rendering_FontMetrics_idl__
30 module com
{ module sun
{ module star
{ module rendering
{
32 /** Metrics global to the font, i.e. not specific to single
33 glyphs. The font height is defined as
34 ascent+descent+internalLeading, and therefore not explicitely
37 Please note that when querying FontMetrics from an XCanvasFont
38 interface, all values here are given relative to the font cell
39 size. That means, the referenceCharWidth and/or
40 ascent+descent+internalLeading will approximately (rounded to
41 integer device resolution, or exactly, if fractional font
42 rendering is enabled) match the referenceAdvancement/cellSize
43 members of the FontRequest for which the XCanvasFont was
44 queried. Please be aware that the values returned in this
45 structure only map one-to-one to device pixel, if the combined
46 rendering transformation for text output equals the identity
47 transformation. Otherwise, the text output (and thus the resulting
48 metrics) will be subject to that transformation. Depending on the
49 underlying font technology, actual device output might be off by
50 up to one device pixel from the transformed metrics.
56 /// Ascent (above the baseline) part of the font.
59 //-------------------------------------------------------------------------
61 /// Descent (below the baseline) part of the font.
64 //-------------------------------------------------------------------------
66 /// Extra space above ascent
67 double InternalLeading
;
69 //-------------------------------------------------------------------------
71 /** Extra space outside the font cells.<p>
73 It should not contain ink marks and is typically used
74 by the font designer to modify the line distance.<p>
76 double ExternalLeading
;
78 //-------------------------------------------------------------------------
80 /** This value specifies the reference character width of the
83 It's roughly equivalent to the average width of all
84 characters, and if one needs a font with double character
85 width, the referenceCharSize should be doubled.<p>
87 double ReferenceCharSize
;
89 //-------------------------------------------------------------------------
91 /** Specifies the offset to be added to the baseline when drawing
94 double UnderlineOffset
;
96 //-------------------------------------------------------------------------
98 /** Specifies the offset to be added to the baseline when striking
101 double StrikeThroughOffset
;