InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SLCLineMetrics Class Reference

#include <SLCLineMetrics.h>

Public Member Functions

 SLCLineMetrics (void)
 
 SLCLineMetrics (const SLCLineMetrics &h)
 
SLCLineMetricsoperator= (const SLCLineMetrics &h)
 
void SetLeading (const PMReal &leading)
 
const PMRealGetLeading (void) const
 
void SetAscent (const PMReal &ascent)
 
const PMRealGetAscent (void) const
 
void SetCapHeight (const PMReal &capHeight)
 
const PMRealGetCapHeight (void) const
 
void SetXHeight (const PMReal &xHeight)
 
const PMRealGetXHeight (void) const
 
const PMRealGetValue (const Text::FirstLineOffsetMetric &metric) const
 
void Dump (const char *category, const char *msg)
 

Detailed Description

Tracks metrics during composition of the line. The maximum value in the line of metrics such as leading, ascent and cap height are tracked during composition.

The maximum value for leading is used to set the height of the line.

The maximum value of the appropriate metric is used to set the line height when the line falls at the top of a parcel. The offset of the first line of text in a parcel can be varied by a parameter called "first line offset", often abbreviated to FLO. This can take one of a number of metrics e.g. leading, ascent, cap height. Because of this the value of all of these matrics must be tracked as the line is composed.

kFLOFixedHeight note: We don't need to track the value of this metric as the line is composed. Fixed height is a property of the parcel that is not affected by the metrics of the text in the parcel. The tiler handles kFLOFixedHeight. All we need to ensure is that we pass in a non zero value for the top of frame height when asking for tiles. Fudge this by maintaining the kFLOFixedHeight to be the same as ascent.

Constructor & Destructor Documentation

SLCLineMetrics::SLCLineMetrics (void )
inline

Default Constructor.

SLCLineMetrics::SLCLineMetrics (const SLCLineMetricsh)
inline

Copy constructor.

Member Function Documentation

void SLCLineMetrics::Dump (const char * category,
const char * msg 
)
inline

Dump the object to Trace.

const PMReal& SLCLineMetrics::GetAscent (void ) const
inline

Gets the ascent value.

const PMReal& SLCLineMetrics::GetCapHeight (void ) const
inline

Gets the cap height

const PMReal& SLCLineMetrics::GetLeading (void ) const
inline

Gets the leading value

const PMReal& SLCLineMetrics::GetValue (const Text::FirstLineOffsetMetric & metric) const
inline

Get the value of the given metric.

Parameters
metricIN the desired metric (leading or whatever).
Returns
the value of the given metric.
const PMReal& SLCLineMetrics::GetXHeight (void ) const
inline

Gets the "X" height.

SLCLineMetrics& SLCLineMetrics::operator= (const SLCLineMetricsh)
inline

Assignment operator.

void SLCLineMetrics::SetAscent (const PMRealascent)
inline

The value stored here by the composer is the maximum value of all runs in the line.

void SLCLineMetrics::SetCapHeight (const PMRealcapHeight)
inline

The value stored here by the composer is the maximum value of all runs in the line.

void SLCLineMetrics::SetLeading (const PMRealleading)
inline

The value stored here by the composer is the maximum value of all runs in the line.

void SLCLineMetrics::SetXHeight (const PMRealxHeight)
inline

The value stored here by the composer is the maximum value of all runs in the line.