InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IJustificationStyle Class Referenceabstract

#include <IJustificationStyle.h>

Inheritance diagram for IJustificationStyle:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IJUSTIFICATIONSTYLE }
 
enum  JustificationMethod {
  kJustifMethodDefault = 0, kJustifMethodArabic, kJustifMethodNaskh, kJustifMethodTraditionalNaskhTatweel,
  kJustifMethodTraditionalNaskhKashida, kJustifMethodTraditionalNaskhTatweelFrac, kJustifMethodTraditionalNaskhKashidaFrac
}
 

Public Member Functions

virtual void SetKernAfter (PMReal kern)=0
 
virtual PMReal GetKernAfter () const =0
 
virtual JustificationMethod GetJustificationMethod () const =0
 
virtual void SetJustificationMethod (JustificationMethod justMethod)=0
 
virtual PMReal GetAlteredWordspace () const =0
 
virtual PMReal GetAlteredLetterspace (bool16 isVertical) const =0
 
virtual void SetMinWordspace (PMReal min)=0
 
virtual void SetMaxWordspace (PMReal max)=0
 
virtual void SetDesiredWordspace (PMReal desired)=0
 
virtual void SetMinLetterspace (PMReal min)=0
 
virtual void SetMaxLetterspace (PMReal max)=0
 
virtual void SetDesiredLetterspace (PMReal desired)=0
 
virtual void SetMinGlyphscale (PMReal min)=0
 
virtual void SetMaxGlyphscale (PMReal max)=0
 
virtual void SetDesiredGlyphscale (PMReal desired)=0
 
virtual void GetWordspace (PMReal *min, PMReal *des, PMReal *max) const =0
 
virtual void GetLetterspace (PMReal *min, PMReal *des, PMReal *max) const =0
 
virtual void GetGlyphscale (PMReal *min, PMReal *des, PMReal *max) const =0
 
virtual bool16 GetAutoQuadding () const =0
 
virtual void SetAutoQuadding (bool16 b)=0
 
virtual void SetLigaturesBreakBelow (PMReal below)=0
 
virtual void SetLigaturesBreakAbove (PMReal above)=0
 
virtual PMReal GetLigaturesBreakBelow () const =0
 
virtual PMReal GetLigaturesBreakAbove () const =0
 
virtual bool16 LigaturesAllowed (bool16 isVertical) const =0
 
virtual double GetLastLineLengthPenalty (double width, double target) const =0
 
virtual double GetLineConsistencyPenalty (IWaxLine::LineTightness prevLine, IWaxLine::LineTightness thisLine, double capheight) const =0
 
virtual PMReal GetKashidaWidth () const =0
 
virtual void SetKashidaWidth (PMReal width)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Justification style contains mostly Roman justification related data from text attributes. Part of the kComposeStyleBoss.

See Also
IDrawingStyle.

Member Enumeration Documentation

Enumerator
kJustifMethodDefault 

Standard - latin like justification letter and word spacing, glyph scaling, as is it done for Roman; letter spacing is only used between non-connection letters

kJustifMethodArabic 

Arabic (Legacy) put kashidas in every connecting place, with an even fractional width. This is a mode for compatibility with InDesign ME 1.5 and even earlier PageMaker ME versions.

kJustifMethodNaskh 

Naskh kashida width: value from GetKashidaWidth is used to determine how much kashida to add connection stretching: OpenType feature strl/r if available justification alternates: if available in the font

kJustifMethodTraditionalNaskhTatweel 

Naskh with Kashida insertion only kashida width: value from GetKashidaWidth is used to determine how much kashida to add connection stretching: OpenType feature strl/r is not applied justification alternates: none

kJustifMethodTraditionalNaskhKashida 

Naskh with Kashida insertion and Stretched Connections kashida width: value from GetKashidaWidth is used to determine how much kashida to add connection stretching: OpenType feature strl/r if available justification alternates: none

kJustifMethodTraditionalNaskhTatweelFrac 

Naskh with Kashida insertion only. Uses fractional widths based on space left to justify kashida width: value from GetKashidaWidth is used to determine how much kashida to add connection stretching: OpenType feature strl/r is not applied justification alternates: none

kJustifMethodTraditionalNaskhKashidaFrac 

Naskh with Kashida insertion and Stretched Connections. Uses fractional widths based on space left to justify kashida width: value from GetKashidaWidth is used to determine how much kashida to add connection stretching: OpenType feature strl/r if available justification alternates: none

Member Function Documentation

virtual PMReal IJustificationStyle::GetAlteredLetterspace (bool16 isVertical) const
pure virtual

What is the desired letterspacing? This is desired letterspacing + tracking.

virtual PMReal IJustificationStyle::GetAlteredWordspace () const
pure virtual

What is the desired width of a word space?

virtual void IJustificationStyle::GetGlyphscale (PMRealmin,
PMRealdes,
PMRealmax 
) const
pure virtual
Get glyphscaling values.

How much scaling should be applied to the text? Values are percentages. Normal setting for "desired" would be 1.0

virtual JustificationMethod IJustificationStyle::GetJustificationMethod () const
pure virtual

Get justification method. Only used by world ready composer.

Returns
JustificationMethod
virtual PMReal IJustificationStyle::GetKashidaWidth () const
pure virtual

Get width of kashida to be used in naskh justifications.

Returns
PMReal is how many kashidas to use when justifying text. 1 means width of 1 kashida in font. 0 means no kashida is added when justifying.
virtual PMReal IJustificationStyle::GetKernAfter () const
pure virtual

This returns the "range kerning" value – know as tracking to non-PageMaker users.

virtual double IJustificationStyle::GetLastLineLengthPenalty (double width,
double target 
) const
pure virtual

Calculate a penalty for the width of the last line in a paragraph.

Parameters
widthis the width of the last line.
targetis the desired width (frame width) of the last line.
Returns
is a penalty associated with a very long or very short last line.
virtual void IJustificationStyle::GetLetterspace (PMRealmin,
PMRealdes,
PMRealmax 
) const
pure virtual
Get letterspacing.

How much space should be added between letters? Values are fractions of a default space width. Normal setting for "desired" would be 0.0

virtual PMReal IJustificationStyle::GetLigaturesBreakAbove () const
pure virtual

At what looseness should ligatures be disabled?

virtual PMReal IJustificationStyle::GetLigaturesBreakBelow () const
pure virtual

At what tightness should ligatures be disabled?

virtual double IJustificationStyle::GetLineConsistencyPenalty (IWaxLine::LineTightness prevLine,
IWaxLine::LineTightness thisLine,
double capheight 
) const
pure virtual

Calculate a penalty factor for adjacent lines to favor consistent tightnesses.

Parameters
prevLineis the tightness of the previous line.
thieLineis the tightness of the current line.
capheightis the maximum cap height for the line, which scales the penalty.
Returns
is a penalty associated with a inconsistent justification.
virtual void IJustificationStyle::GetWordspace (PMRealmin,
PMRealdes,
PMRealmax 
) const
pure virtual
Get wordspacing values.

How big should the spaces be? Values are specified in fractions: Normal setting for "desired" would be 1.0

virtual bool16 IJustificationStyle::LigaturesAllowed (bool16 isVertical) const
pure virtual
Should ligatures be applied to the text?

Turn them off in text that is too tight or too loose.

virtual void IJustificationStyle::SetDesiredGlyphscale (PMReal desired)
pure virtual
Set the desired glyphscale value.

Specified as a scale. desired = 1.0 means leave the glyphs unscaled.

virtual void IJustificationStyle::SetDesiredLetterspace (PMReal desired)
pure virtual
Set the desired letterspace value.

Specified as a fraction of a space's width. I.e. min = -0.01 means add 1% of the width of the space to every character's width.

virtual void IJustificationStyle::SetDesiredWordspace (PMReal desired)
pure virtual
Set the desired wordspace value.

Value is expressed as fraction of the original space width. I.e. desired = 1.0 means the spaces should be unchanged.

virtual void IJustificationStyle::SetJustificationMethod (JustificationMethod justMethod)
pure virtual

Set justification method. Only used by world ready composer.

Parameters
justMethod
virtual void IJustificationStyle::SetKashidaWidth (PMReal width)
pure virtual

Set width of kashida to be used in naskh justifications.

Parameters
widthis how many kashidas to use when justifying text. 1 means width of 1 kashida in font. 0 means no kashida is added when justifying.
virtual void IJustificationStyle::SetKernAfter (PMReal kern)
pure virtual

This sets the "range kerning" value – know as tracking to non-PageMaker users.

virtual void IJustificationStyle::SetLigaturesBreakAbove (PMReal above)
pure virtual
Should ligatures be applied to the text?

Parameters
aboveis a kerning measurement above which ligatures should be turned off.
virtual void IJustificationStyle::SetLigaturesBreakBelow (PMReal below)
pure virtual
Should ligatures be applied to the text?

Parameters
belowis a kerning measurement below which ligatures should be turned off.
virtual void IJustificationStyle::SetMaxGlyphscale (PMReal max)
pure virtual
Set the recommended maximum glyphscale value.

Specified as a scale. Min = 1.05 means glyphs can be scaled up by 5%.

virtual void IJustificationStyle::SetMaxLetterspace (PMReal max)
pure virtual
Set the recommended maximum letterspace value.

Specified as a fraction of a space's width. I.e. max = 0.05 means allow 5% of the width of the space to be added to every character's width.

virtual void IJustificationStyle::SetMaxWordspace (PMReal max)
pure virtual
Set the recommended maximum wordspace value.

Value is expressed as fraction of the original space width. I.e. max = 1.33 means allow the spaces to be up to 33% wider

virtual void IJustificationStyle::SetMinGlyphscale (PMReal min)
pure virtual
Set the recommended minimum glyphscale value.

Specified as a scale. Min = 0.95 means glyphs can be scaled to 95% of their original width.

virtual void IJustificationStyle::SetMinLetterspace (PMReal min)
pure virtual
Set the recommended minimum letterspace value.

Specified as a fraction of a space's width. I.e. min = -0.02 means allow 2% of the width of the space to be removed from every character's width.

virtual void IJustificationStyle::SetMinWordspace (PMReal min)
pure virtual
Set the recommended minimum wordspace value.

Value is expressed as fraction of the original space width. I.e. min = 0.80 means allow the spaces to be up to 20% narrower.