![]() | InDesign SDK 20.5 |
#include <IDrawingStyle.h>

Public Types | |
| enum | { kDefaultIID = IID_IDRAWINGSTYLE } |
| enum | CapitalizeMode { kCapNormal = 0, kCapSmallLowercase, kCapAll, kCapSmallEverything, kCapLowercase } |
| enum | PositionMode { kPosNormal = 0, kPosSuperscript, kPosSubscript, kPosSuperior, kPosInferior, kPosNumerator, kPosDenominator } |
| enum | UnderlineMode { kUnderlineNone = 0, kUnderlineSingle } |
| enum | CharacterHang { kHangBaseline = 0, kHangEmCenter, kHangEmBottom, kHangEmTop, kHangICFBottom, kHangICFTop } |
| enum | PositionIndicator { kDataPosition_ThisPage = 0, kDataPosition_PreviousPage, kDataPosition_NextPage, kDataPosition_TextVariable } |
| enum | OTPositioningForm { kOTPosForm_Off, kOTPosForm_Auto, kOTPosForm_Initial, kOTPosForm_Medial, kOTPosForm_Final, kOTPosForm_Isolated } |
Public Member Functions | |
| virtual IFontInstance * | QueryFontInstance (bool16 vertical) const =0 |
| virtual IPMFont * | QueryFont () const =0 |
| virtual bool16 | IsFontMissing () const =0 |
| virtual bool16 | HasMMOpticalSize () const =0 |
| virtual void | SetSpecialGlyph (const char *name, Text::GlyphID glyph=kInvalidGlyphID)=0 |
| virtual Text::GlyphID | GetSpecialGlyph () const =0 |
| virtual void | SetPointSize (PMReal p)=0 |
| virtual PMReal | GetPointSize () const =0 |
| virtual void | SetSkewAngle (PMReal p)=0 |
| virtual PMReal | GetSkewAngle () const =0 |
| virtual void | GetScaledFontMatrix (PMMatrix *fontMatrix) const =0 |
| virtual void | GetUnScaledFinalFontMatrix (PMMatrix *fontMatrix, bool16 vertical) const =0 |
| virtual void | GetFinalFontMatrix (PMMatrix *fontMatrix, bool16 vertical) const =0 |
| virtual void | SetFontUID (UID u)=0 |
| virtual UID | GetFontUID () const =0 |
| virtual void | SetFontStyleName (const PMString &name)=0 |
| virtual const PMString & | GetFontStyleName () const =0 |
| virtual const PMString & | GetPostscriptFontName () const =0 |
| virtual void | SetMMAxes (int32 num, const Fixed *buffer)=0 |
| virtual const Fixed * | GetMMAxes () const =0 |
| virtual void | SetGlyphScaleX (PMReal scale)=0 |
| virtual void | SetGlyphScaleY (PMReal scale)=0 |
| virtual void | SetDesiredGlyphScale (PMReal xscale)=0 |
| virtual PMReal | GetXScale () const =0 |
| virtual PMReal | GetYScale () const =0 |
| virtual PMReal | GetXScaleOnly () const =0 |
| virtual void | SetLeading (PMReal abs)=0 |
| virtual void | SetAutoLead (PMReal factor)=0 |
| virtual PMReal | GetLeading () const =0 |
| virtual PMReal | GetAutoLead () const =0 |
| virtual bool16 | UseAutoLeading () const =0 |
| virtual PMReal | GetBaseLineShift () const =0 |
| virtual void | SetBaseLineShift (PMReal r)=0 |
| virtual CharacterHang | GetCharacterHang () const =0 |
| virtual void | SetCharacterHang (CharacterHang b)=0 |
| virtual OTPositioningForm | GetOTPositioningForm () const =0 |
| virtual void | SetOTPositioningForm (OTPositioningForm form)=0 |
| virtual PositionIndicator | GetPageNumberPosition () const =0 |
| virtual void | SetPageNumberPosition (PositionIndicator pi)=0 |
| virtual PMReal | GetEffectiveBaseline () const =0 |
| virtual UID | GetColorUID (bool16 stroke) const =0 |
| virtual void | SetColorUID (bool16 stroke, UID newColor)=0 |
| virtual void | SetTint (bool16 stroke, PMReal tint)=0 |
| virtual PMReal | GetTint (bool16 stroke) const =0 |
| virtual void | SetOverprint (bool16 stroke, bool16 over)=0 |
| virtual bool16 | GetOverprint (bool16 stroke) const =0 |
| virtual void | SetHiliteAngle (bool16 stroke, PMReal v)=0 |
| virtual PMReal | GetHiliteAngle (bool16 stroke) const =0 |
| virtual void | SetHiliteLength (bool16 stroke, PMReal v)=0 |
| virtual PMReal | GetHiliteLength (bool16 stroke) const =0 |
| virtual void | SetGradientAngle (bool16 stroke, PMReal angle)=0 |
| virtual PMReal | GetGradientAngle (bool16 stroke) const =0 |
| virtual void | SetGradientLength (bool16 stroke, PMReal length)=0 |
| virtual PMReal | GetGradientLength (bool16 stroke) const =0 |
| virtual void | SetGradientCenter (bool16 stroke, const PMPoint ¢er)=0 |
| virtual PMPoint | GetGradientCenter (bool16 stroke) const =0 |
| virtual void | SetDataBase (IDataBase *db)=0 |
| virtual IDataBase * | GetDataBase () const =0 |
| virtual bool16 | IsOutlined () const =0 |
| virtual void | SetOutlineWidth (PMReal width)=0 |
| virtual PMReal | GetOutlineWidth () const =0 |
| virtual void | SetMiterLimit (PMReal miterLimit)=0 |
| virtual PMReal | GetMiterLimit () const =0 |
| virtual void | SetStrokeAlignment (int32 align)=0 |
| virtual int32 | GetStrokeAlignment () const =0 |
| virtual void | SetOutlineJoin (int32 join)=0 |
| virtual int32 | GetOutlineJoin () const =0 |
| virtual void | SetUnderlineMode (UnderlineMode underlineMode)=0 |
| virtual UnderlineMode | GetUnderlineMode () const =0 |
| virtual void | SetPositionMode (PositionMode position)=0 |
| virtual PositionMode | GetPositionMode () const =0 |
| virtual void | SetStrikethruFlag (bool16 strikethru)=0 |
| virtual bool16 | GetStrikethruFlag () const =0 |
| virtual void | SetCapitalsMode (CapitalizeMode cm)=0 |
| virtual CapitalizeMode | GetCapitalsMode () const =0 |
| virtual Text::GlyphID | GetSpaceGlyph () const =0 |
| virtual PMReal | GetSpaceWidth () const =0 |
| virtual PMReal | GetEmSpaceWidth (bool16 vertical) const =0 |
| virtual PMReal | GetEnSpaceWidth (bool16 vertical) const =0 |
| virtual PMReal | GetHyphenWidth () const =0 |
| virtual bool16 | CanSimpleKernWith (const IDrawingStyle *other, bool16 vertical) const =0 |
| virtual bool16 | CanDoOpenTypeFeaturesAcross (const IDrawingStyle *other, bool16 vertical) const =0 |
| virtual bool16 | CanShareWaxRunWith (const IDrawingStyle *other) const =0 |
| virtual bool16 | GetForceVerticalGlyphs () const =0 |
| virtual void | SetForceVerticalGlyphs (bool16 b)=0 |
| virtual void | AddTextAdornment (ClassID attrID, ClassID adornmentID, ITextAdornmentData *data)=0 |
| virtual void | GetTextAdornment (ClassID attrID, ClassID *adornmentID, ITextAdornmentData **data)=0 |
| virtual void | GetTextAdornment (ClassID attrID, ClassID *adornmentID, const ITextAdornmentData **data) const =0 |
| virtual void | FillOutRenderData (IWaxRenderData *data, bool16 vertical) const =0 |
| virtual void | AddAdornments (IWaxRun *waxRun) const =0 |
| virtual PMReal | GetStyleEmBoxTop (bool16 verticalGlyphs, bool16 usePointSizeNotScale=kFalse) const =0 |
| virtual PMReal | GetStyleEmBoxBottom (bool16 verticalGlyphs, bool16 usePointSizeNotScale=kFalse) const =0 |
| virtual PMReal | GetStyleICFBoxTop (bool16 verticalGlyphs, bool16 usePointSizeNotScale=kFalse) const =0 |
| virtual PMReal | GetStyleICFBoxBottom (bool16 verticalGlyphs, bool16 usePointSizeNotScale=kFalse) const =0 |
| virtual int32 | GetWritingScript () const =0 |
| virtual void | SetForSymbolHack ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IDrawingStyle is the primary interface of character attribute summary data. Text attributes can be summarized into a kComposeStyleBoss object, which is a non-persistent summary of every text attribute applied to some text. IDrawingStyle lists most, but not all character attributes: font, pointsize, color, etc. IDrawingStyle should be considered a "read-only" interface because the set operations have no impact beyond this data interface. It does not apply through to the text that this interface derived from. The text attributes themselves are the primary setters of the data.
CapitalizeMode. Normal, lowercase->small uppercase mapping, lowercase->uppercase mapping, lowercase & uppercase -> small uppercase mapping.
CharacterHang. Used in Japanese to place different sized characters relative to each other.
OpenType Positioning Form. Ties to the opentype features that control position-dependent glyphs (especially for cursive scripts like Arabic). kOTPosForm_Off = no features. kOTPosForm_Auto = automatically generates the 4 positional features listed below based on the underlying text. kOTPosForm_Initial = beginning of word form. kOTPosForm_Medial = middle of word form. kOTPosForm_Final = end of word form. kOTPosForm_Isolated = by itself (one character word) form.
PositionIndicator. Used by some calculated text (page numbers, variables, bullets & numbering).
PositionMode. Mutually exclusive positioning of glyphs. kPosSuperior = opentype superscript feature. kPosInferior = opentype subscript feature. kPosNumerator, kPosDenominator are opentype features only.
UnderlineMode. May be extended in the future.
| pure virtual |
Add the adornments specified by the text attributes to the IWaxRun interface.
| pure virtual |
Add the adornment specified by the text attribute to this interface.
| pure virtual |
Do both of these IDrawingStyles share the drawing-specific data such that they can share the same opentype features?
For example, opentype features cannot cross pointsize and font changes. But we do allow changes to cross color and underline changes.
| other | is an adjacent IDrawingStyle that we are composing next to. |
| pure virtual |
Do both of these IDrawingStyles share the drawing-specific data such that they can share the same wax run?
For example, pointsize, color, and font will create new wax runs. Page number position will not.
| other | is an adjacent IDrawingStyle that we are building wax next to. |
| pure virtual |
Do both of these IDrawingStyles share the drawing-specific data such that they can be kerned?
For example, kerning cannot cross pointsize and font changes. But we do allow kerning to cross color changes.
| other | is an adjacent IDrawingStyle that we are kerning against. |
| pure virtual |
Copy text attribute information into IWaxRun interfaces. Wax is the term for composed text data.
| pure virtual |
Returns the auto leading scale factor.
| pure virtual |
Get the baseline shift.
| pure virtual |
Get the capitalization mode.
| pure virtual |
Character hang for Japanese composition.
kHangBaseline, kHangEmCenter, kHangEmBottom, kHangEmTop, kHangICFBottom, kHangICFTop.
| pure virtual |
Get color rendering object for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Get the database that these attributes came from.
| pure virtual |
Returns the calculated offset for the baseline (includes baseline shift, ILG shift, super/subscript, etc.)
| pure virtual |
Cached Em space width.
| pure virtual |
Cached En space width.
| pure virtual |
Returns final font matrix used to draw glyphs. NOTE: origin of matrix = glyph origin (left edge/Roman baseline), which means center-based calculations like free rotation and shatai must calculate the glyph center before and after these transformations to find out where to move the glyph location.
| fontMatrix | is set the the final font matrix. |
| pure virtual |
Get the font style name.
| pure virtual |
Get the font family UID.
| pure virtual |
Are the glyphs forced vertical?
| pure virtual |
Gradient angle for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient center for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient length for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient hilite angle for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient hilite length for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Cached width of the hyphen glyph.
| pure virtual |
Gets the specified leading value: either auto or fixed.
| pure virtual |
What is the text outline miter limit?
| pure virtual |
Get the vector of axis values. May be nil. The number of elements in the vector is from font->GetNumDesignAxes()
| pure virtual |
OpenType positioning form.
kOTPosForm_Off, kOTPosForm_Auto, kOTPosForm_Initial, kOTPosForm_Medial, kOTPosForm_Final, kOTPosForm_Isolated. corresponds to: 'init', 'medi', 'fina', 'isol'
| pure virtual |
What is the text outline join?
| pure virtual |
What is the text outline width?
| pure virtual |
Get overprint for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Get page number position.
kDataPosition_ThisPage = use the current page. kDataPosition_PreviousPage = previous page. kDataPosition_NextPage = next page.
| pure virtual |
Get the point size.
| pure virtual |
Get the position mode of the glyphs.
| pure virtual |
The font family UID and font style name are combined to refer to a specific font by postscript name.
| pure virtual |
Returns calculated font matrix (includes super/subscript, h/v scale only).
| fontMatrix | is set the the calculated font matrix. |
| pure virtual |
Get the skew angle.
| pure virtual |
Cached space glyph.
| pure virtual |
Cached width of the space glyph.
| pure virtual |
If the underlying character didn't have a unicode representation, this will return the expected glyph.
| pure virtual |
Is strike through enabled?
| pure virtual |
What is the text stroke alignment?
| pure virtual |
The EmBox and ICFBox are font metrics specific to japanese fonts.
| pure virtual |
The EmBox and ICFBox are font metrics specific to japanese fonts.
| pure virtual |
The EmBox and ICFBox are font metrics specific to japanese fonts. (ICF=Ideographic Character Face)
| pure virtual |
The EmBox and ICFBox are font metrics specific to japanese fonts. (ICF=Ideographic Character Face)
| pure virtual |
Get one text adornment's data for writing. This method assumes you will modify the data, which is much slower because it makes a copy.
| pure virtual |
Read one text adornment's data. This method assumes you won't modify the data, which is much more efficient because it won't make copies.
| pure virtual |
Get tint percent for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Get Underline mode.
| pure virtual |
Returns matrix you can concat with scaled font matrix to get final font matrix.
| fontMatrix | is set the the font matrix. |
| vertical | specifies the primary writing direction. |
| pure virtual |
Get the WritingScript()
| pure virtual |
Returns the product of both the user's x-scale and the desired glyph scale.
| pure virtual |
Returns only the user's x-scale and NOT the desired glyph scale.
| pure virtual |
Returns the specified y-scale.
| pure virtual |
Does the referred-to font have the multiple master optical size axis? This is only special because the optical size can be set to match the pointsize, giving the optimal font appearance.
| pure virtual |
Is the referred-to font considered missing?
| pure virtual |
Is the text outlined?
| pure virtual |
| pure virtual |
Query for the IFontInstance.
| vertical | specifies whether you wish the horizontal or vertical instance. |
| pure virtual |
Sets the auto-leading factor. Leading = factor * pointsize.
| pure virtual |
Set the baseline shift.
| pure virtual |
Set the capitalization mode.
| cm | can be: kCapNormal has no affect. kCapSmallLowercase draws lowercase letters as small capitals. kCapAll draws all letters as capitals. kCapLowercase draws all letters in lowercase. kCapSmallEverything will draw both uppercase and lowercase letters as small capitals, but is only supported by opentype fonts that have the 'c2sc' feature currently. |
| pure virtual |
Character hang for Japanese composition.
| pure virtual |
Set color rendering object for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
The system sets the database when creating the kComposeStyleBoss.
Don't call this method.
| pure virtual |
This is the desired glyph scale set in the justification dialog. The user may specify scaling in the x & y direction, but the user may also specify a desired glyph scale in the justification dialog.
| pure virtual |
In addition to the font family, fonts have style names. It would appear as "Bold" or "Roman" or "" or "Semibold Condensed" for example.
| name | is the font style name. |
| pure virtual |
Fonts are divided into families, and each family has a separate record in an InDesign document.
| u | is a font UID refering to one of these IFontFamily objects. |
| pure virtual |
Force the glyphs to be vertical.
| pure virtual |
The Macintosh has always supported a dozen or so mathematical symbols in every font by substituting the "Symbol" font behind the scenes. This reproduces that behavior. We do it on both platforms (starting in CS3) for consistency.
| pure virtual |
Sets the scale factor in the x direction
| pure virtual |
Sets the scale factor in the y direction. This is different from setting the pointsize larger because larger pointsizes affect a number of different calculations (leading, optical sizes, etc) but the y scale does not.
| pure virtual |
Gradient angle for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient center for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient length for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient hilite angle for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Gradient hilite length for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Sets the leading value. Values less than zero are considered "auto".
| pure virtual |
What is the text outline miter limit?
| miterLimit | - the miter limit of the text's outline. |
| pure virtual |
Multiple master fonts have a vector of 16/16 fixed point numbers that specify the values of each multiple master axis.
| num | is number of values in the buffer. is the array of fixed point axis values. |
| pure virtual |
enType positioning form.
| pure virtual |
What is the text outline join?
| join | - the text's outline join. |
| pure virtual |
What is the text outline width?
| width | is the line weight of the text's outline. |
| pure virtual |
Set overprint for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Set page number position.
| pi | can be kDataPosition_ThisPage, kDataPosition_PreviousPage, or kDataPosition_NextPage = next page. |
| pure virtual |
Set the point size.
| pure virtual |
Set the position mode of the glyphs.
kPosNormal has no affect. kPosSuperscript scales and shifts the glyphs up. kPosSubscript scales and shifts the glyphs down. kPosSuperior applies the opentype 'sups' feature. kPosInferior applies the opentype 'sinf' AND 'subs'. kPosNumerator applies opentype 'numr'. kPosDenominator applies opentype 'deno'
| pure virtual |
Set the skew angle.
| pure virtual |
Set the glyph-specific data for the non-representable character. Only used in special cases where the font has glyphs wanted without associated unicode character values.
| pure virtual |
Is strike through enabled?
| pure virtual |
What is the text stroke aglignment?
| align | - the text's stroke alignment. |
| pure virtual |
Set tint percent for stroke or fill.
| stroke | is kTrue from stroke, kFalse for fill. |
| pure virtual |
Set underline mode. This is only On/Off actually. the enum names is a historical misnomer.
Actually, the stroke style is specified in the kTextAttrCharUnderlineTypeBoss text attribute. Perhaps we will have the idea of skipping descenders specified here some day.
| pure virtual |
Is auto-leading specified?