| 
    CFx SDK Documentation 2024 SP0
    
   | 
 
#include <GiTextStyle.h>
Public Types | |
| enum | {  kShape = 0x01 , kUpsideDown = 0x02 , kVertical = 0x04 , kUnderlined = 0x08 , kOverlined = 0x10 , kShxFont = 0x20 , kPreLoaded = 0x40 , kBackward = 0x80 , kShapeLoaded = 0x100 , kStriked = 0x200 , kUseIntercharSpacing = 0x400 , kFixedIntercharSpacing = 0x800 , kNoUsePreferableFont = 0x1000 }  | 
This class provides an interface to the display attributes of text.
<group OdGi_Classes>
Definition at line 50 of file GiTextStyle.h.
| anonymous enum | 
| Enumerator | |
|---|---|
| kShape | |
| kUpsideDown | |
| kVertical | |
| kUnderlined | |
| kOverlined | |
| kShxFont | |
| kPreLoaded | |
| kBackward | |
| kShapeLoaded | |
| kStriked | |
| kUseIntercharSpacing | |
| kFixedIntercharSpacing | |
| kNoUsePreferableFont | |
Definition at line 78 of file GiTextStyle.h.
| OdGiTextStyle::OdGiTextStyle | ( | ) | 
Default constructor for the OdGiTextStyle class. Sets the following data members:
Value Description m_pFont default shx font* Default .shx font that is defined in the font table (default font is assigned only if the system registry contains a dictionary that stores a name of properly initialized font service object). m_dXScale 1.0 Scale of text by the x-axis. m_dTrackingPercent 1.0 Multiplier for the spacing between characters as defined in the font file. m_dTextSize 0.2 Fixed text size in drawing units. m_dObliquingAngle 0.0 Oblique (skew) angle for the text. m_flags 0 Various text style flags (for example, upside down characters, backward characters, etc.). m_Codepage CP_UNDEFINED Font codepage. m_dIntercharSpacing 0 Inter-character spacing.
| OdGiTextStyle::~OdGiTextStyle | ( | ) | 
Destructor for the OdGiTextStyle class.
      
  | 
  inline | 
Returns the BigFont filename for this TextStyle.
Definition at line 487 of file GiTextStyle.h.
| void OdGiTextStyle::font | ( | OdString & | typeface, | 
| bool & | bold, | ||
| bool & | italic, | ||
| int & | charset, | ||
| int & | pitchAndFamily | ||
| ) | const | 
Returns the Windows font characteristics for this TextStyle.
| typeface | [out] Typeface name of the font. | 
| bold | [out] True if and only if bold. | 
| italic | [out] True if and only if italic. | 
| charset | [out] Windows character set identifier. | 
| pitchAndFamily | [out] Windows pitch and character family identifier. | 
      
  | 
  inline | 
Returns the OdFont associated with the BigFont for this TextStyle.
Definition at line 470 of file GiTextStyle.h.
| OdString OdGiTextStyle::getBigFontFilePath | ( | OdDbBaseDatabase * | pDb | ) | const | 
Returns the fully qualified BigFont file path associated with this TextStyle.
| pDb | [in] Pointer to the database whose OdDbHostAppServices object will be used. | 
      
  | 
  inline | 
Returns the CodePage associated with this TextStyle.
Definition at line 538 of file GiTextStyle.h.
      
  | 
  inline | 
Returns the OdFont associated with this TextStyle.
Definition at line 465 of file GiTextStyle.h.
| OdString OdGiTextStyle::getFontFilePath | ( | OdDbBaseDatabase * | pDb | ) | const | 
Returns the fully qualified font file path associated with this TextStyle.
| pDb | [in] Pointer to the database whose OdDbHostAppServices object will be used. | 
| double OdGiTextStyle::getIntercharSpacing | ( | ) | const | 
Returns the interchar spacing for this TextStyle.
      
  | 
  inline | 
Checks whether text is drawn backwards with this TextStyle.
Definition at line 336 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether interchar spacing is fixed.
Definition at line 595 of file GiTextStyle.h.
      
  | 
  inline | 
Checks using preferable font during loadStyleRec.
Definition at line 624 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether text is drawn overlined with this TextStyle.
Definition at line 364 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether this text style has a pre-loaded font. For internal use.
Definition at line 380 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether the font file for this TextStyle is treated as a shape file.
Definition at line 408 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether the text font for this text style is loaded.
Definition at line 108 of file GiTextStyle.h.
      
  | 
  inline | 
Specifies whether the set font is shx font. For internal use.
Definition at line 387 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether text is drawn striked with this TextStyle.
Definition at line 371 of file GiTextStyle.h.
      
  | 
  inline | 
Specifies whether the set font is ttf font. For internal use.
Definition at line 394 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether text is drawn underlined with this TextStyle.
Definition at line 357 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether text is drawn upside down with this TextStyle.
Definition at line 343 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether interchar spacing is used.
Definition at line 581 of file GiTextStyle.h.
      
  | 
  inline | 
Checks whether text is drawn vertical with this TextStyle.
Definition at line 350 of file GiTextStyle.h.
| void OdGiTextStyle::loadStyleRec | ( | OdDbBaseDatabase * | pDb | ) | const | 
Loads the font file(s) associated with this TextStyle.
| pDb | [in] Pointer to the database whose OdDbHostAppServices object will be used. | 
      
  | 
  inline | 
Returns the obliquing angle for this TextStyle.
Definition at line 516 of file GiTextStyle.h.
| void OdGiTextStyle::set | ( | const OdString & | fontName, | 
| const OdString & | bigFontName, | ||
| const double | textSize, | ||
| const double | xScale, | ||
| const double | obliquingAngle, | ||
| const double | trackingPercent, | ||
| const bool | isBackward, | ||
| const bool | isUpsideDown, | ||
| const bool | isVertical, | ||
| const bool | isOverlined, | ||
| const bool | isUnderlined | ||
| ) | 
Sets the parameters of this TextStyle object according to its parameters.
| fontName | [in] Font filename. | 
| bigFontName | [in] BigFont filename. | 
| textSize | [in] Fixed text size. | 
| xScale | [in] X-scale (width) factor of text. | 
| obliquingAngle | [in] Obliquing angle of text. | 
| trackingPercent | [in] Tracking percent of text. | 
| isBackward | [in] Controls backwards drawing of text. | 
| isUpsideDown | [in] Controls upside down drawing of text. | 
| isVertical | [in] Controls vertical drawing of text. | 
| isOverlined | [in] Controls overlined drawing of text. | 
| isUnderlined | [in] Controls overlined drawing of text. | 
| void OdGiTextStyle::setBackward | ( | bool | isBackward | ) | 
Controls the backwards drawing of text with this TextStyle.
| isBackwards | [in] Controls backwards drawing. | 
Sets this TextStyle to use the specified OdFont as the BigFont.
| pBigFont | [in] Pointer to the BigFont. | 
Definition at line 442 of file GiTextStyle.h.
Sets the name of the BigFont file associated with this TextStyle.
| bigFontFileName | [in] Filename. | 
Sets the fully qualified BigFont file path associated with this TextStyle.
| bigFontFilePath | [in] BigFont file path. | 
Definition at line 209 of file GiTextStyle.h.
      
  | 
  inline | 
Sets the CodePage associated with this TextStyle.
| codePage | [in] CodePage. | 
Definition at line 547 of file GiTextStyle.h.
Sets the name of the font file associated with this TextStyle.
| fontFileName | [in] Filename. | 
| void OdGiTextStyle::setFont | ( | const OdString & | typeface, | 
| bool | bold, | ||
| bool | italic, | ||
| int | charset, | ||
| int | pitchAndFamily | ||
| ) | 
Sets this TextStyle to use the specified Windows font characteristics.
| typeface | [in] Typeface name of the font. | 
| bold | [in] Bold if and only if true. | 
| italic | [in] Italic if and only if true. | 
| charset | [in] Windows character set identifier. | 
| pitchAndFamily | [in] Windows pitch and character family identifier. | 
Sets this TextStyle to use the specified OdFont characteristics.
| pFont | [in] Pointer to the font. | 
Definition at line 434 of file GiTextStyle.h.
Sets the fully qualified font file path associated with this TextStyle.
| fontFilePath | [in] Font file path. | 
Definition at line 199 of file GiTextStyle.h.
| void OdGiTextStyle::setIntercharSpacing | ( | double | dSpacing | ) | 
Sets interchar spacing for this TextStyle.
| dSpacing | [in] Interchar spacing value. | 
      
  | 
  inline | 
Specifies whether interchar spacing is fixed.
| isUseIntercharSpacing | [in] Controls setting. | 
Definition at line 587 of file GiTextStyle.h.
      
  | 
  inline | 
Controls if the font file for this TextStyle is treated as a shape file.
| isShape | [in] Controls setting. | 
Definition at line 400 of file GiTextStyle.h.
      
  | 
  inline | 
Specifies whether to use interchar spacing.
| isUseIntercharSpacing | [in] Controls setting. | 
Definition at line 573 of file GiTextStyle.h.
      
  | 
  inline | 
Specifies no using preferable font during loadStyleRec.
| isUsePreferableFont | [in] Controls setting. | 
Definition at line 617 of file GiTextStyle.h.
| void OdGiTextStyle::setObliquingAngle | ( | double | obliquingAngle | ) | 
Sets the obliquing angle for this TextStyle.
| obliquingAngle | [in] Obliquing angle. | 
| void OdGiTextStyle::setOverlined | ( | bool | isOverlined | ) | 
Controls the overlined drawing of text with this TextStyle.
| overlined | [in] Controls overlined drawing. | 
| void OdGiTextStyle::setPreLoaded | ( | bool | value | ) | const | 
Specifies whether this text style has a pre-loaded font. For internal use.
| value | [in] Flag that specifies whether an associated font is pre-loaded. | 
| void OdGiTextStyle::setShapeLoaded | ( | bool | shapeLoaded | ) | const | 
Controls if the text font file for this TextStyle marked as loaded.
| shapeLoaded | [in] Controls shape loaded. | 
| void OdGiTextStyle::setShxFont | ( | bool | value | ) | const | 
Specifies whether the set font is shx font. For internal use.
| value | [in] Flag that specifies whether an associated font is shx font. | 
| void OdGiTextStyle::setStriked | ( | bool | isStriked | ) | 
Controls the strike drawing of text with this TextStyle.
| overlined | [in] Controls strike drawing. | 
Sets the style name for this TextStyle.
| name | [in] Style name. | 
Definition at line 564 of file GiTextStyle.h.
| void OdGiTextStyle::setTextSize | ( | double | textSize | ) | 
Sets the fixed text size for this TextStyle.
| textSize | [in] Fixed text size. | 
| void OdGiTextStyle::setTrackingPercent | ( | double | trackingPercent | ) | 
Sets the tracking percent for this TextStyle.
| trackingPercent | [in] TrackingPercent [0.75, 4.0]. | 
| void OdGiTextStyle::setUnderlined | ( | bool | isUnderlined | ) | 
Controls the underlined drawing of text with this TextStyle.
| underlined | [in] Controls underlined drawing. | 
| void OdGiTextStyle::setUpsideDown | ( | bool | isUpsideDown | ) | 
Controls the upside down drawing of text with this TextStyle.
| isUpsideDown | [in] Controls upside down drawing. | 
| void OdGiTextStyle::setVertical | ( | bool | isVertical | ) | 
Controls the vertical drawing of text with this TextStyle.
| isVertical | [in] Controls vertical drawing. | 
| void OdGiTextStyle::setXScale | ( | double | xScale | ) | 
Sets the X-scale (width) factor for this TextStyle.
| xScale | [in] X-scale factor. | 
      
  | 
  inline | 
Returns the style name for this TextStyle.
Definition at line 555 of file GiTextStyle.h.
      
  | 
  inline | 
Returns the fixed text size for this TextStyle.
Definition at line 494 of file GiTextStyle.h.
      
  | 
  inline | 
Returns the tracking percent for this TextStyle.
trackingPercent() has a range of [0.75..4].
Definition at line 528 of file GiTextStyle.h.
      
  | 
  inline | 
Returns a reference to the TTF descriptor for this TextStyle.
Definition at line 475 of file GiTextStyle.h.
      
  | 
  inline | 
Definition at line 479 of file GiTextStyle.h.
      
  | 
  inline | 
Returns the X-scale (width) factor for this TextStyle.
Definition at line 502 of file GiTextStyle.h.