Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreTextCharFeatures.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TEXT_CHAR_FEATURES__
8 #define __HDI_CORE_TEXT_CHAR_FEATURES__
9 
10 #include <vector>
11 
12 #include "hdicorePathStyle.h"
13 #include "hdicoreTypes.h"
14 
15 namespace hdi
16 {
17  namespace plugin
18  {
19  class TextCharFeatures;
20  }
21 
22  namespace core
23  {
24  class Angle;
25  class ArtColor;
26  class Font;
27 
32  {
33  public:
34  typedef std::vector<double> DoubleVector;
35 
36  enum Language
37  {
38  UnknownLanguage = 0,
39  AlbanianLanguage = 10,
40  ArabicLanguage = 20,
41  BelarussianLanguage = 30,
42  BengaliLanguage = 40, // Illustrator 17 and above only
43  BokmalNorwegianLanguage = 50,
44  BulgarianLanguage = 60,
45  CatalanLanguage = 70,
46  ChineseLanguage = 80,
47  CroatianLanguage = 90,
48  CzechLanguage = 100,
49  DanishLanguage = 110,
50  DutchLanguage = 120,
51  EnglishLanguage = 130,
52  EnglishBritishLanguage = 140,
53  EnglishCanadianLanguage = 150,
54  EstonianLanguage = 160,
55  FarsiLanguage = 170,
56  FinnishLanguage = 180,
57  FrenchLanguage = 190,
58  FrenchCanadianLanguage = 200,
59  GermanLanguage = 210,
60  GermanSwissLanguage = 220,
61  GreekLanguage = 230,
62  GujaratiLanguage = 240, // Illustrator 17 and above only
63  HebrewLanguage = 250,
64  HindiLanguage = 260, // Illustrator 17 and above only
65  HungarianLanguage = 270,
66  IcelandicLanguage = 280,
67  ItalianLanguage = 290,
68  JapaneseLanguage = 300,
69  KannadaLanguage = 310, // Illustrator 17 and above only
70  LaoLanguage = 320,
71  LatvianLanguage = 330,
72  LithuanianLanguage = 340,
73  MalayalamLanguage = 350, // Illustrator 17 and above only
74  MarathiLanguage = 360, // Illustrator 17 and above only
75  NynorskNorwegianLanguage = 370,
76  OriyaLanguage = 380, // Illustrator 17 and above only
77  PolishLanguage = 390,
78  PortugueseLanguage = 400,
79  PortugueseBrazilianLanguage = 410,
80  PunjabiLanguage = 420, // Illustrator 17 and above only
81  RomanianLanguage = 430,
82  RussianLanguage = 440,
83  SerbianLanguage = 450,
84  SlovakianLanguage = 460,
85  SlovenianLanguage = 470,
86  SpanishLanguage = 480,
87  SwedishLanguage = 490,
88  TamilLanguage = 500, // Illustrator 17 and above only
89  TeluguLanguage = 510, // Illustrator 17 and above only
90  ThaiLanguage = 520,
91  TurkishLanguage = 530,
92  UkranianLanguage = 540,
93  VietnameseLanguage = 550
94  };
95 
106 
115 
121  virtual ~TextCharFeatures();
122 
128  virtual TextCharFeatures& operator=(const TextCharFeatures& rhs_);
129 
138  virtual bool operator==(const TextCharFeatures& rhs_) const;
139 
148  virtual bool operator!=(const TextCharFeatures& rhs_) const;
149 
161  virtual std::auto_ptr<ATE::ICharFeatures> ateCharFeatures() const;
162 
170  virtual bool isEmpty() const;
171 
179  virtual std::auto_ptr<TextCharFeatures> duplicate() const;
180 
189  virtual bool font(Font& font__) const;
190 
199  virtual bool fontSize(double& size__) const;
200 
209  virtual bool horizontalScale(double& scale__) const;
210 
219  virtual bool verticalScale(double& scale__) const;
220 
229  virtual bool autoLeading(bool& leading__) const;
230 
239  virtual bool leading(double& leading__) const;
240 
249  virtual bool tracking(int32_t& tracking__) const;
250 
259  virtual bool baselineShift(double& shift__) const;
260 
269  virtual bool characterRotation(Angle& rotate__) const;
270 
282  virtual bool autoKernType(AutoKernType& kerning__) const;
283 
292  virtual bool fontCapsOption(FontCapsType& caps__) const;
293 
302  virtual bool fontBaselineOption(FontBaseline& baseline__) const;
303 
312  virtual bool fontOpenTypePositionOption(FontOpenTypePosition& pos__) const;
313 
322  virtual bool strikethroughPosition(StrikethroughPosition& pos__) const;
323 
332  virtual bool underlinePosition(UnderlinePosition& pos__) const;
333 
342  virtual bool underlineOffset(double& offset__) const;
343 
352  virtual bool ligature(bool& lig__) const;
353 
362  virtual bool discretionaryLigatures(bool& lig__) const;
363 
372  virtual bool contextualLigatures(bool& lig__) const;
373 
382  virtual bool alternateLigatures(bool& lig__) const;
383 
392  virtual bool oldStyle(bool& old__) const;
393 
402  virtual bool fractions(bool& frac__) const;
403 
412  virtual bool ordinals(bool& ord__) const;
413 
422  virtual bool swash(bool& swash__) const;
423 
432  virtual bool titling(bool& titling__) const;
433 
442  virtual bool connectionForms(bool& connForms__) const;
443 
452  virtual bool stylisticAlternates(bool& styleAlt__) const;
453 
454  #if HDI_CORE_COMPILE_AI22_PLUS
455 
463  bool stylisticSets(int32_t& styleSets__) const;
464  #endif
465 
474  virtual bool ornaments(bool& orn__) const;
475 
484  virtual bool figureStyle(FigureStyle& style__) const;
485 
494  virtual bool noBreak(bool& noBr__) const;
495 
504  virtual bool fillColor(ArtColor& color__) const;
505 
514  virtual bool fill(bool& fill__) const;
515 
524  virtual bool fillVisible(bool& fillVis__) const;
525 
534  virtual bool strokeColor(ArtColor& color__) const;
535 
544  virtual bool stroke(bool& stroke__) const;
545 
554  virtual bool strokeVisible(bool& strokeVis__) const;
555 
564  virtual bool fillFirst(bool& fillFirst__) const;
565 
574  virtual bool fillOverPrint(bool& overprint__) const;
575 
584  virtual bool strokeOverPrint(bool& overprint__) const;
585 
594  virtual bool fillBackgroundColor(ArtColor& color__) const;
595 
604  virtual bool fillBackground(bool& fillBG__) const;
605 
614  virtual bool lineCap(StrokeStyle::CapStyle& cap__) const;
615 
624  virtual bool lineJoin(StrokeStyle::JoinStyle& join__) const;
625 
634  virtual bool lineWidth(double& width__) const;
635 
644  virtual bool miterLimit(double& limit__) const;
645 
654  virtual bool lineDashOffset(double& offset__) const;
655 
664  virtual bool lineDashArray(DoubleVector& dists__) const;
665 
674  virtual bool language(Language& lang__) const;
675 
683  virtual void setFont(const Font& font_);
684 
692  virtual void setFontSize(const double size_);
693 
701  virtual void setHorizontalScale(const double scale_);
702 
710  virtual void setVerticalScale(const double scale_);
711 
719  virtual void setAutoLeading(const bool leading_);
720 
728  virtual void setLeading(const double leading_);
729 
737  virtual void setTracking(const int32_t tracking_);
738 
746  virtual void setBaselineShift(const double shift_);
747 
755  virtual void setCharacterRotation(const Angle& rotation_);
756 
764  virtual void setAutoKernType(const AutoKernType kerning_);
765 
773  virtual void setFontCapsOption(const FontCapsType caps_);
774 
782  virtual void setFontBaselineOption(const FontBaseline baseline_);
783 
791  virtual void setFontOpenTypePositionOption(const FontOpenTypePosition pos_);
792 
800  virtual void setStrikethroughPosition(const StrikethroughPosition pos_);
801 
809  virtual void setUnderlinePosition(const UnderlinePosition pos_);
810 
818  virtual void setUnderlineOffset(const double offset_);
819 
827  virtual void setLigature(const bool lig_);
828 
836  virtual void setDiscretionaryLigatures(const bool lig_);
837 
845  virtual void setContextualLigatures(const bool lig_);
846 
854  virtual void setAlternateLigatures(const bool lig_);
855 
863  virtual void setOldStyle(const bool old_);
864 
872  virtual void setFractions(const bool frac_);
873 
881  virtual void setOrdinals(const bool ord_);
882 
890  virtual void setSwash(const bool swash_);
891 
899  virtual void setTitling(const bool titling_);
900 
908  virtual void setConnectionForms(const bool connForms_);
909 
917  virtual void setStylisticAlternates(const bool styleAlt_);
918 
919  #if HDI_CORE_COMPILE_AI22_PLUS
920 
927  void setStylisticSets(const int32_t styleSets_);
928  #endif
929 
937  virtual void setOrnaments(const bool orn_);
938 
946  virtual void setFigureStyle(const FigureStyle style_);
947 
955  virtual void setNoBreak(const bool noBr_);
956 
964  virtual void setFillColor(const ArtColor& color_);
965 
973  virtual void setFill(const bool fill_);
974 
982  virtual void setFillVisible(const bool fillVis_);
983 
991  virtual void setFillOverPrint(const bool overprint_);
992 
1000  virtual void setStrokeColor(const ArtColor& color_);
1001 
1009  virtual void setStroke(const bool stroke_);
1010 
1018  virtual void setStrokeVisible(const bool strokeVis_);
1019 
1027  virtual void setStrokeOverPrint(const bool overprint_);
1028 
1036  virtual void setFillFirst(const bool fillFirst_);
1037 
1045  virtual void setFillBackgroundColor(const ArtColor& color_);
1046 
1054  virtual void setFillBackground(const bool fillBG_);
1055 
1063  virtual void setLineCap(const StrokeStyle::CapStyle cap_);
1064 
1072  virtual void setLineJoin(const StrokeStyle::JoinStyle join_);
1073 
1081  virtual void setLineWidth(const double width_);
1082 
1090  virtual void setMiterLimit(const double limit_);
1091 
1099  virtual void setLineDashOffset(const double offset_);
1100 
1108  virtual void setLineDashArray(const DoubleVector& dists_);
1109 
1117  virtual void setLanguage(const Language lang_);
1118 
1124  virtual void clearFont();
1125 
1131  virtual void clearFontSize();
1132 
1138  virtual void clearHorizontalScale();
1139 
1145  virtual void clearVerticalScale();
1146 
1152  virtual void clearAutoLeading();
1153 
1159  virtual void clearLeading();
1160 
1166  virtual void clearTracking();
1167 
1173  virtual void clearBaselineShift();
1174 
1180  virtual void clearCharacterRotation();
1181 
1188  virtual void clearAutoKernType();
1189 
1195  virtual void clearFontCapsOption();
1196 
1202  virtual void clearFontBaselineOption();
1203 
1209  virtual void clearFontOpenTypePositionOption();
1210 
1216  virtual void clearStrikethroughPosition();
1217 
1223  virtual void clearUnderlinePosition();
1224 
1230  virtual void clearUnderlineOffset();
1231 
1237  virtual void clearLigature();
1238 
1244  virtual void clearDiscretionaryLigatures();
1245 
1251  virtual void clearContextualLigatures();
1252 
1258  virtual void clearAlternateLigatures();
1259 
1265  virtual void clearOldStyle();
1266 
1272  virtual void clearFractions();
1273 
1279  virtual void clearOrdinals();
1280 
1286  virtual void clearSwash();
1287 
1293  virtual void clearTitling();
1294 
1300  virtual void clearConnectionForms();
1301 
1307  virtual void clearStylisticAlternates();
1308 
1309  #if HDI_CORE_COMPILE_AI22_PLUS
1310 
1315  void clearStylisticSets();
1316  #endif
1317 
1323  virtual void clearOrnaments();
1324 
1330  virtual void clearFigureStyle();
1331 
1337  virtual void clearNoBreak();
1338 
1344  virtual void clearFillColor();
1345 
1351  virtual void clearStrokeColor();
1352 
1358  virtual void clearFill();
1359 
1365  virtual void clearFillVisible();
1366 
1372  virtual void clearStroke();
1373 
1379  virtual void clearStrokeVisible();
1380 
1386  virtual void clearFillFirst();
1387 
1393  virtual void clearFillOverPrint();
1394 
1400  virtual void clearStrokeOverPrint();
1401 
1407  virtual void clearFillBackgroundColor();
1408 
1414  virtual void clearFillBackground();
1415 
1421  virtual void clearLineCap();
1422 
1428  virtual void clearLineJoin();
1429 
1435  virtual void clearLineWidth();
1436 
1442  virtual void clearMiterLimit();
1443 
1449  virtual void clearLineDashOffset();
1450 
1456  virtual void clearLineDashArray();
1457 
1463  virtual void clearLanguage();
1464 
1465 
1466  private:
1467  friend plugin::TextCharFeatures* __accessImpl(const TextCharFeatures&);
1468  friend TextCharFeatures __accessCtor(const plugin::TextCharFeatures&);
1469 
1473  plugin::TextCharFeatures* __impl;
1474 
1480  TextCharFeatures(const plugin::TextCharFeatures&);
1481  };
1482 
1483  typedef std::auto_ptr<TextCharFeatures> TextCharFeaturesAP;
1484 
1485  extern plugin::TextCharFeatures* __accessImpl(const TextCharFeatures&);
1486  extern TextCharFeatures __accessCtor(const plugin::TextCharFeatures&);
1487  }
1488 }
1489 
1490 #endif
1491 // __HDI_CORE_TEXT_CHAR_FEATURES__
FontBaseline
Indicates the baseline of some text.
Definition: hdicoreTypes.h:462
StrikethroughPosition
Indicates the strikethrough position of some text.
Definition: hdicoreTypes.h:438
FontCapsType
Indicates the capitalization of some text.
Definition: hdicoreTypes.h:473
FigureStyle
Indicates the figure style of some text.
Definition: hdicoreTypes.h:414
void setLineWidth(const double width_)
Sets the line width used when drawing paths or unfilled objects.
Allows for easy manipulation of Illustrator text character features.
Definition: hdicoreTextCharFeatures.h:31
CapStyle
Indicates the type of cap for a given stroke style.
Definition: hdicorePathStyle.h:255
double lineWidth()
Gets the line width used when drawing paths or unfilled objects.
double fontSize()
Gets the current font size for annotation text art.
void setFontSize(const double size_)
Sets the current font size for annotation text art.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:170
Header file for path style-related classes.
std::auto_ptr< Font > font()
Gets the current font for annotation text art.
AutoKernType
Indicates the kerning type of some text.
Definition: hdicoreTypes.h:485
Definition: hdicoreaiArray.h:12
FontOpenTypePosition
Indicates the position of some OpenType text.
Definition: hdicoreTypes.h:449
void setFont(const Font &font_)
Sets the current font for annotation text art.
JoinStyle
Indicates the type of join for a given stroke style.
Definition: hdicorePathStyle.h:266
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:25
UnderlinePosition
Indicates the underline position of some text.
Definition: hdicoreTypes.h:427
Describes the color of art on the artboard.
Definition: hdicoreArtColor.h:32