#include <IJustificationStyle.h>
Justification style contains mostly Roman justification related data from text attributes. Part of the kComposeStyleBoss.
- See Also
- IDrawingStyle.
| 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 |
| 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 | ( | PMReal * | min, | | | PMReal * | des, | | | PMReal * | max | | ) | | 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
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
| width | is the width of the last line. |
| target | is 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 | ( | PMReal * | min, | | | PMReal * | des, | | | PMReal * | max | | ) | | 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
| prevLine | is the tightness of the previous line. |
| thieLine | is the tightness of the current line. |
| capheight | is the maximum cap height for the line, which scales the penalty. |
- Returns
- is a penalty associated with a inconsistent justification.
| virtual void IJustificationStyle::GetWordspace | ( | PMReal * | min, | | | PMReal * | des, | | | PMReal * | max | | ) | | 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.
Set justification method. Only used by world ready composer.
- Parameters
| virtual void IJustificationStyle::SetKashidaWidth | ( | PMReal | width | ) | |
| pure virtual |
Set width of kashida to be used in naskh justifications.
- Parameters
| width | 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 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
| above | is 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
| below | is 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.