Method function IGDIPlus.IGPFont.GetHeight(Single) : Single

From Mitov Wiki Doc
Revision as of 17:18, 18 October 2012 by David Alm (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.

Class: IGPFont

Contents

Syntax

Delphi:

function GetHeight( dpi : Single ) : Single;

C++ Builder:

float __fastcall GetHeight( float dpi );

Visual C++ (MFC):

GetHeight(  dpi );

Summary

Gets the line spacing, in pixels, of this font.

Description

Call this method to get the line spacing, in pixels, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself. Remarks If the font unit is set to anything other than UnitPixel, the height, in pixels, is calculated using the specified vertical resolution. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em height is 2048 and the line spacing is 2355. If the specified vertical resolution is 96 dots per inch, the height is calculated as follows:


2355*(0.3/2048)*96 = 33.1171875

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox