Font.h
1 //////////////////////////////////////////////////////////////////////////
2 // Copyright 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
7 //////////////////////////////////////////////////////////////////////////
8 #pragma once
9 
10 
11 #include <system/string.h>
12 #include <system/shared_ptr.h>
13 #include <system/object.h>
14 #include <system/enum_helpers.h>
15 #include <system/collections/sorted_list.h>
16 #include <drawing/font_style.h>
17 #include <drawing/color.h>
18 #include <cstdint>
19 
20 #include "Aspose.Words.Cpp/Model/Text/Underline.h"
21 #include "Aspose.Words.Cpp/Model/Text/TextEffect.h"
22 #include "Aspose.Words.Cpp/Model/Text/TextDmlEffect.h"
23 #include "Aspose.Words.Cpp/Model/Styles/StyleIdentifier.h"
24 #include "Aspose.Words.Cpp/Model/Formatting/IShadingAttrSource.h"
25 #include "Aspose.Words.Cpp/Model/Formatting/IBorderAttrSource.h"
26 #include "Aspose.Words.Cpp/aspose_words_api_defs.h"
27 
28 namespace Aspose { namespace Words { namespace Fields { class IndexAndTablesEntryAttributeModifier; } } }
29 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Dml { namespace TextEffects { class DmlTextEffectsPostApplier; } } } } }
30 namespace Aspose { namespace Words { namespace RW { namespace Html { class HtmlFontNameResolver; } } } }
31 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class FontFormatterHtmlRules; } } } } } }
32 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class FontFormatter; } } } } } }
33 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class DocumentFormatter; } } } } } }
34 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class FontFormatterWordRules; } } } } } }
35 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class StyleFormatterWordRules; } } } } } }
36 namespace Aspose { namespace Words { namespace Fonts { class EmbeddedFontCollector; } } }
37 namespace Aspose { namespace Words { namespace Replacing { class FindReplaceOptions; } } }
38 namespace Aspose { namespace Words { namespace Drawing { namespace Charts { class ChartTitle; } } } }
39 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Dml { class DmlShapeRenderer; } } } }
40 namespace Aspose { namespace Words { namespace Fields { class FieldIndexAndTablesUtil; } } }
41 namespace Aspose { namespace Words { namespace RW { namespace Html { class HtmlListWrapper; } } } }
42 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlRevisionWriter; } } } } }
43 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlStyleWriter; } } } } }
44 namespace Aspose { namespace Words { class AttrBoolEx; } }
45 namespace Aspose { namespace Words { namespace Markup { class StructuredDocumentTag; } } }
46 namespace Aspose { namespace Words { namespace Layout { namespace Core { class LprSpan; } } } }
47 namespace Aspose { namespace Words { namespace Layout { class FontProps; } } }
48 namespace Aspose { namespace Words { namespace Lists { class ListLabel; } } }
49 namespace Aspose { namespace Words { class Style; } }
50 namespace Aspose { namespace Words { class ConditionalStyle; } }
51 namespace Aspose { namespace Words { class DocumentBuilder; } }
52 namespace Aspose { namespace Words { namespace Drawing { class ShapeBase; } } }
53 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Spans { class LineApsBuilder; } } } }
54 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Underlines { class UnderlineApsBuilder; } } } }
55 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Underlines { class UnderlineMetrics; } } } }
56 namespace Aspose { namespace Words { namespace RW { namespace Html { class ListProps; } } } }
57 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlCommonBorderSpanWriter; } } } } }
58 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlCoreWriter; } } } } }
59 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlI18nWriter; } } } } }
60 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlSpanWriter; } } } } }
61 namespace Aspose { namespace Words { class InlineStory; } }
62 namespace Aspose { namespace Words { namespace Lists { class ListLevel; } } }
63 namespace Aspose { namespace Words { class StyleCollection; } }
64 namespace Aspose { namespace Words { namespace TableLayout { class ParagraphMeasurer; } } }
65 namespace Aspose { namespace Words { class Inline; } }
66 namespace Aspose { namespace Words { class Paragraph; } }
67 namespace Aspose { namespace Words { namespace RW { class RunWriter; } } }
68 namespace Aspose { namespace Words { namespace RW { namespace Txt { namespace Reader { class TxtReader; } } } } }
69 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtReader; } } } } }
70 namespace Aspose { namespace Words { class WordUtil; } }
71 namespace Aspose { namespace Words { namespace RW { namespace Html { class CssFont; } } } }
72 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlListReader; } } } } }
73 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlReader; } } } } }
74 namespace Aspose { namespace Words { namespace RW { namespace Xaml { namespace Writer { class XamlRunWriter; } } } } }
75 namespace Aspose { namespace Words { namespace RW { namespace Xaml { namespace Writer { class XamlAttributesWriter; } } } } }
76 namespace Aspose { namespace Words { namespace RW { namespace Xaml { namespace Writer { class XamlListWriter; } } } } }
77 namespace Aspose { namespace Words { enum class CharacterCategory; } }
78 namespace Aspose { namespace Words { enum class RunVerticalAlignment; } }
79 namespace Aspose { namespace Drawing { class DrColor; } }
80 namespace Aspose { namespace Words { class Border; } }
81 namespace Aspose { namespace Words { class Shading; } }
82 namespace Aspose { namespace Words { class IRunAttrSource; } }
83 namespace Aspose { namespace Words { class Run; } }
84 namespace Aspose { namespace Words { namespace Layout { namespace Core { class PrinterMetrics; } } } }
85 namespace Aspose { namespace Words { enum class BorderType; } }
86 namespace Aspose { namespace Words { namespace Themes { class Theme; } } }
87 namespace Aspose { namespace Words { namespace Fonts { class DocumentFontProvider; } } }
88 namespace Aspose { namespace Words { class DocumentBase; } }
89 
90 namespace Aspose {
91 
92 namespace Words {
93 
94 
95 /// <summary>
96 /// Contains font attributes (font name, font size, color, and so on) for an object.
97 /// </summary>
98 /// <remarks>
99 /// <p>You do not create instances of the <see cref="Aspose::Words::Font" /> class directly. You just use
100 /// <see cref="Aspose::Words::Font" /> to access the font properties of the various objects such as <see cref="Aspose::Words::Run" />,
101 /// <see cref="Aspose::Words::Paragraph" />, <see cref="Aspose::Words::Style" />, <see cref="Aspose::Words::DocumentBuilder" />.</p>
102 /// </remarks>
103 class Font : public Aspose::Words::IBorderAttrSource, public Aspose::Words::IShadingAttrSource
104 {
105  typedef Font ThisType;
106  typedef Aspose::Words::IBorderAttrSource BaseType;
107  typedef Aspose::Words::IShadingAttrSource BaseType1;
108 
109  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
110  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
111 
113  friend class Aspose::Words::Fields::IndexAndTablesEntryAttributeModifier;
114  friend class Aspose::Words::ApsBuilder::Dml::TextEffects::DmlTextEffectsPostApplier;
115  friend class Aspose::Words::RW::Html::HtmlFontNameResolver;
116  friend class Aspose::Words::RW::Html::Css::New::FontFormatterHtmlRules;
117  friend class Aspose::Words::RW::Html::Css::New::FontFormatter;
118  friend class Aspose::Words::RW::Html::Css::New::DocumentFormatter;
119  friend class Aspose::Words::RW::Html::Css::New::FontFormatterWordRules;
120  friend class Aspose::Words::RW::Html::Css::New::StyleFormatterWordRules;
121  friend class Aspose::Words::Fonts::EmbeddedFontCollector;
122  friend class Aspose::Words::Replacing::FindReplaceOptions;
123  friend class Aspose::Words::Drawing::Charts::ChartTitle;
124  friend class Aspose::Words::ApsBuilder::Dml::DmlShapeRenderer;
125  friend class Aspose::Words::Fields::FieldIndexAndTablesUtil;
126  friend class Aspose::Words::RW::Html::HtmlListWrapper;
127  friend class Aspose::Words::RW::Html::Writer::HtmlRevisionWriter;
128  friend class Aspose::Words::RW::Html::Writer::HtmlStyleWriter;
129  friend class Aspose::Words::AttrBoolEx;
130  friend class Aspose::Words::Markup::StructuredDocumentTag;
131  friend class Aspose::Words::Layout::Core::LprSpan;
132  friend class Aspose::Words::Layout::FontProps;
133  friend class Aspose::Words::Lists::ListLabel;
134  friend class Aspose::Words::Style;
135  friend class Aspose::Words::ConditionalStyle;
136  friend class Aspose::Words::DocumentBuilder;
137  friend class Aspose::Words::Drawing::ShapeBase;
138  friend class Aspose::Words::ApsBuilder::Spans::LineApsBuilder;
139  friend class Aspose::Words::ApsBuilder::Underlines::UnderlineApsBuilder;
140  friend class Aspose::Words::ApsBuilder::Underlines::UnderlineMetrics;
141  friend class Aspose::Words::RW::Html::ListProps;
142  friend class Aspose::Words::RW::Html::Writer::HtmlCommonBorderSpanWriter;
143  friend class Aspose::Words::RW::Html::Writer::HtmlCoreWriter;
144  friend class Aspose::Words::RW::Html::Writer::HtmlI18nWriter;
145  friend class Aspose::Words::RW::Html::Writer::HtmlSpanWriter;
146  friend class Aspose::Words::InlineStory;
147  friend class Aspose::Words::Lists::ListLevel;
148  friend class Aspose::Words::StyleCollection;
149  friend class Aspose::Words::TableLayout::ParagraphMeasurer;
150  friend class Aspose::Words::Inline;
151  friend class Aspose::Words::Paragraph;
152  friend class Aspose::Words::RW::RunWriter;
153  friend class Aspose::Words::RW::Txt::Reader::TxtReader;
154  friend class Aspose::Words::RW::Odt::Reader::OdtReader;
155  friend class Aspose::Words::WordUtil;
156  friend class Aspose::Words::RW::Html::CssFont;
157  friend class Aspose::Words::RW::Html::Reader::HtmlListReader;
158  friend class Aspose::Words::RW::Html::Reader::HtmlReader;
159  friend class Aspose::Words::RW::Xaml::Writer::XamlRunWriter;
160  friend class Aspose::Words::RW::Xaml::Writer::XamlAttributesWriter;
161  friend class Aspose::Words::RW::Xaml::Writer::XamlListWriter;
162 
163 public:
164 
165  /// <summary>
166  /// Gets or sets the name of the font.
167  /// </summary>
168  /// <remarks>
169  /// <p>When getting, returns <see cref="Aspose::Words::Font::get_NameAscii" />.</p>
170  /// <p>When setting, sets <see cref="Aspose::Words::Font::get_NameAscii" />, <see cref="Aspose::Words::Font::get_NameBi" />, <see cref="Aspose::Words::Font::get_NameFarEast" />
171  /// and <see cref="Aspose::Words::Font::get_NameOther" /> to the specified value.</p>
172  /// </remarks>
173  ASPOSE_WORDS_SHARED_API System::String get_Name();
174  /// Setter for Aspose::Words::Font::get_Name
175  ASPOSE_WORDS_SHARED_API void set_Name(System::String value);
176  /// <summary>
177  /// Returns or sets the font used for Latin text (characters with character codes from 0 (zero) through 127).
178  /// </summary>
179  /// <remarks>
180  /// <seealso cref="Aspose::Words::Font::get_Name" />
181  /// </remarks>
182  ASPOSE_WORDS_SHARED_API System::String get_NameAscii();
183  /// Setter for Aspose::Words::Font::get_NameAscii
184  ASPOSE_WORDS_SHARED_API void set_NameAscii(System::String value);
185  /// <summary>
186  /// Returns or sets the name of the font in a right-to-left language document.
187  /// </summary>
188  /// <remarks>
189  /// <seealso cref="Aspose::Words::Font::get_Name" />
190  /// </remarks>
191  ASPOSE_WORDS_SHARED_API System::String get_NameBi();
192  /// Setter for Aspose::Words::Font::get_NameBi
193  ASPOSE_WORDS_SHARED_API void set_NameBi(System::String value);
194  /// <summary>
195  /// Returns or sets an East Asian font name.
196  /// </summary>
197  /// <remarks>
198  /// <seealso cref="Aspose::Words::Font::get_Name" />
199  /// </remarks>
200  ASPOSE_WORDS_SHARED_API System::String get_NameFarEast();
201  /// Setter for Aspose::Words::Font::get_NameFarEast
202  ASPOSE_WORDS_SHARED_API void set_NameFarEast(System::String value);
203  /// <summary>
204  /// Returns or sets the font used for characters with character codes from 128 through 255.
205  /// </summary>
206  /// <remarks>
207  /// <seealso cref="Aspose::Words::Font::get_Name" />
208  /// </remarks>
209  ASPOSE_WORDS_SHARED_API System::String get_NameOther();
210  /// Setter for Aspose::Words::Font::get_NameOther
211  ASPOSE_WORDS_SHARED_API void set_NameOther(System::String value);
212  /// <summary>
213  /// Gets or sets the font size in points.
214  /// </summary>
215  ASPOSE_WORDS_SHARED_API double get_Size();
216  /// Setter for Aspose::Words::Font::get_Size
217  ASPOSE_WORDS_SHARED_API void set_Size(double value);
218  /// <summary>
219  /// Gets or sets the font size in points used in a right-to-left document.
220  /// </summary>
221  ASPOSE_WORDS_SHARED_API double get_SizeBi();
222  /// Setter for Aspose::Words::Font::get_SizeBi
223  ASPOSE_WORDS_SHARED_API void set_SizeBi(double value);
224  /// <summary>
225  /// True if the font is formatted as bold.
226  /// </summary>
227  ASPOSE_WORDS_SHARED_API bool get_Bold();
228  /// Setter for Aspose::Words::Font::get_Bold
229  ASPOSE_WORDS_SHARED_API void set_Bold(bool value);
230  /// <summary>
231  /// True if the right-to-left text is formatted as bold.
232  /// </summary>
233  ASPOSE_WORDS_SHARED_API bool get_BoldBi();
234  /// Setter for Aspose::Words::Font::get_BoldBi
235  ASPOSE_WORDS_SHARED_API void set_BoldBi(bool value);
236  /// <summary>
237  /// True if the font is formatted as italic.
238  /// </summary>
239  ASPOSE_WORDS_SHARED_API bool get_Italic();
240  /// Setter for Aspose::Words::Font::get_Italic
241  ASPOSE_WORDS_SHARED_API void set_Italic(bool value);
242  /// <summary>
243  /// True if the right-to-left text is formatted as italic.
244  /// </summary>
245  ASPOSE_WORDS_SHARED_API bool get_ItalicBi();
246  /// Setter for Aspose::Words::Font::get_ItalicBi
247  ASPOSE_WORDS_SHARED_API void set_ItalicBi(bool value);
248  /// <summary>
249  /// Gets or sets the color of the font.
250  /// </summary>
251  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_Color();
252  /// Setter for Aspose::Words::Font::get_Color
253  ASPOSE_WORDS_SHARED_API void set_Color(System::Drawing::Color value);
254  /// <summary>
255  /// Returns the present calculated color of the text (black or white) to be used for 'auto color'.
256  /// If the color is not 'auto' then returns <see cref="Aspose::Words::Font::get_Color" />.
257  /// </summary>
258  /// <remarks>
259  /// <p>
260  /// When text has 'automatic color', the actual color of text is calculated automatically
261  /// so that it is readable against the background color. As you change the background color,
262  /// the text color will automatically switch to black or white in MS Word to maximize legibility.</p>
263  /// </remarks>
264  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_AutoColor();
265  /// <summary>
266  /// True if the font is formatted as strikethrough text.
267  /// </summary>
268  ASPOSE_WORDS_SHARED_API bool get_StrikeThrough();
269  /// Setter for Aspose::Words::Font::get_StrikeThrough
270  ASPOSE_WORDS_SHARED_API void set_StrikeThrough(bool value);
271  /// <summary>
272  /// True if the font is formatted as double strikethrough text.
273  /// </summary>
274  ASPOSE_WORDS_SHARED_API bool get_DoubleStrikeThrough();
275  /// Setter for Aspose::Words::Font::get_DoubleStrikeThrough
276  ASPOSE_WORDS_SHARED_API void set_DoubleStrikeThrough(bool value);
277  /// <summary>
278  /// True if the font is formatted as shadowed.
279  /// </summary>
280  ASPOSE_WORDS_SHARED_API bool get_Shadow();
281  /// Setter for Aspose::Words::Font::get_Shadow
282  ASPOSE_WORDS_SHARED_API void set_Shadow(bool value);
283  /// <summary>
284  /// True if the font is formatted as outline.
285  /// </summary>
286  ASPOSE_WORDS_SHARED_API bool get_Outline();
287  /// Setter for Aspose::Words::Font::get_Outline
288  ASPOSE_WORDS_SHARED_API void set_Outline(bool value);
289  /// <summary>
290  /// True if the font is formatted as embossed.
291  /// </summary>
292  ASPOSE_WORDS_SHARED_API bool get_Emboss();
293  /// Setter for Aspose::Words::Font::get_Emboss
294  ASPOSE_WORDS_SHARED_API void set_Emboss(bool value);
295  /// <summary>
296  /// True if the font is formatted as engraved.
297  /// </summary>
298  ASPOSE_WORDS_SHARED_API bool get_Engrave();
299  /// Setter for Aspose::Words::Font::get_Engrave
300  ASPOSE_WORDS_SHARED_API void set_Engrave(bool value);
301  /// <summary>
302  /// True if the font is formatted as superscript.
303  /// </summary>
304  ASPOSE_WORDS_SHARED_API bool get_Superscript();
305  /// Setter for Aspose::Words::Font::get_Superscript
306  ASPOSE_WORDS_SHARED_API void set_Superscript(bool value);
307  /// <summary>
308  /// True if the font is formatted as subscript.
309  /// </summary>
310  ASPOSE_WORDS_SHARED_API bool get_Subscript();
311  /// Setter for Aspose::Words::Font::get_Subscript
312  ASPOSE_WORDS_SHARED_API void set_Subscript(bool value);
313  /// <summary>
314  /// True if the font is formatted as small capital letters.
315  /// </summary>
316  ASPOSE_WORDS_SHARED_API bool get_SmallCaps();
317  /// Setter for Aspose::Words::Font::get_SmallCaps
318  ASPOSE_WORDS_SHARED_API void set_SmallCaps(bool value);
319  /// <summary>
320  /// True if the font is formatted as all capital letters.
321  /// </summary>
322  ASPOSE_WORDS_SHARED_API bool get_AllCaps();
323  /// Setter for Aspose::Words::Font::get_AllCaps
324  ASPOSE_WORDS_SHARED_API void set_AllCaps(bool value);
325  /// <summary>
326  /// True if the font is formatted as hidden text.
327  /// </summary>
328  ASPOSE_WORDS_SHARED_API bool get_Hidden();
329  /// Setter for Aspose::Words::Font::get_Hidden
330  ASPOSE_WORDS_SHARED_API void set_Hidden(bool value);
331  /// <summary>
332  /// Gets or sets the type of underline applied to the font.
333  /// </summary>
334  ASPOSE_WORDS_SHARED_API Aspose::Words::Underline get_Underline();
335  /// Setter for Aspose::Words::Font::get_Underline
336  ASPOSE_WORDS_SHARED_API void set_Underline(Aspose::Words::Underline value);
337  /// <summary>
338  /// Gets or sets the color of the underline applied to the font.
339  /// </summary>
340  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_UnderlineColor();
341  /// Setter for Aspose::Words::Font::get_UnderlineColor
342  ASPOSE_WORDS_SHARED_API void set_UnderlineColor(System::Drawing::Color value);
343  /// <summary>
344  /// Gets or sets character width scaling in percent.
345  /// </summary>
346  ASPOSE_WORDS_SHARED_API int32_t get_Scaling();
347  /// Setter for Aspose::Words::Font::get_Scaling
348  ASPOSE_WORDS_SHARED_API void set_Scaling(int32_t value);
349  /// <summary>
350  /// Returns or sets the spacing (in points) between characters .
351  /// </summary>
352  ASPOSE_WORDS_SHARED_API double get_Spacing();
353  /// Setter for Aspose::Words::Font::get_Spacing
354  ASPOSE_WORDS_SHARED_API void set_Spacing(double value);
355  /// <summary>
356  /// Returns line spacing of this font (in points).
357  /// </summary>
358  ASPOSE_WORDS_SHARED_API double get_LineSpacing();
359  /// <summary>
360  /// Gets or sets the position of text (in points) relative to the base line.
361  /// A positive number raises the text, and a negative number lowers it.
362  /// </summary>
363  ASPOSE_WORDS_SHARED_API double get_Position();
364  /// Setter for Aspose::Words::Font::get_Position
365  ASPOSE_WORDS_SHARED_API void set_Position(double value);
366  /// <summary>
367  /// Gets or sets the font size at which kerning starts.
368  /// </summary>
369  ASPOSE_WORDS_SHARED_API double get_Kerning();
370  /// Setter for Aspose::Words::Font::get_Kerning
371  ASPOSE_WORDS_SHARED_API void set_Kerning(double value);
372  /// <summary>
373  /// Gets or sets the highlight (marker) color.
374  /// </summary>
375  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_HighlightColor();
376  /// Setter for Aspose::Words::Font::get_HighlightColor
377  ASPOSE_WORDS_SHARED_API void set_HighlightColor(System::Drawing::Color value);
378  /// <summary>
379  /// Gets or sets the font animation effect.
380  /// </summary>
381  ASPOSE_WORDS_SHARED_API Aspose::Words::TextEffect get_TextEffect();
382  /// Setter for Aspose::Words::Font::get_TextEffect
383  ASPOSE_WORDS_SHARED_API void set_TextEffect(Aspose::Words::TextEffect value);
384  /// <summary>
385  /// Specifies whether the contents of this run shall have right-to-left characteristics.
386  /// </summary>
387  /// <remarks>
388  /// <para>This property, when on, shall not be used with strongly left-to-right text. Any behavior under that condition is unspecified.
389  /// This property, when off, shall not be used with strong right-to-left text. Any behavior under that condition is unspecified.</para>
390  ///
391  /// <para>When the contents of this run are displayed, all characters shall be treated as complex script characters for formatting
392  /// purposes. This means that <see cref="Aspose::Words::Font::get_BoldBi" />, <see cref="Aspose::Words::Font::get_ItalicBi" />, <see cref="Aspose::Words::Font::get_SizeBi" /> and a corresponding font name
393  /// will be used when rendering this run.</para>
394  ///
395  /// <para>Also, when the contents of this run are displayed, this property acts as a right-to-left override for characters
396  /// which are classified as "weak types" and "neutral types".</para>
397  /// </remarks>
398  ASPOSE_WORDS_SHARED_API bool get_Bidi();
399  /// Setter for Aspose::Words::Font::get_Bidi
400  ASPOSE_WORDS_SHARED_API void set_Bidi(bool value);
401  /// <summary>
402  /// Specifies whether the contents of this run shall be treated as complex script text regardless
403  /// of their Unicode character values when determining the formatting for this run.
404  /// </summary>
405  ASPOSE_WORDS_SHARED_API bool get_ComplexScript();
406  /// Setter for Aspose::Words::Font::get_ComplexScript
407  ASPOSE_WORDS_SHARED_API void set_ComplexScript(bool value);
408  /// <summary>
409  /// True when the formatted characters are not to be spell checked.
410  /// </summary>
411  ASPOSE_WORDS_SHARED_API bool get_NoProofing();
412  /// Setter for Aspose::Words::Font::get_NoProofing
413  ASPOSE_WORDS_SHARED_API void set_NoProofing(bool value);
414  /// <summary>
415  /// Gets or sets the locale identifier (language) of the formatted characters.
416  /// </summary>
417  /// <remarks>
418  /// For the list of locale identifiers see https://msdn.microsoft.com/en-us/library/cc233965.aspx
419  /// </remarks>
420  ASPOSE_WORDS_SHARED_API int32_t get_LocaleId();
421  /// Setter for Aspose::Words::Font::get_LocaleId
422  ASPOSE_WORDS_SHARED_API void set_LocaleId(int32_t value);
423  /// <summary>
424  /// Gets or sets the locale identifier (language) of the formatted right-to-left characters.
425  /// </summary>
426  /// <remarks>
427  /// For the list of locale identifiers see https://msdn.microsoft.com/en-us/library/cc233965.aspx
428  /// </remarks>
429  ASPOSE_WORDS_SHARED_API int32_t get_LocaleIdBi();
430  /// Setter for Aspose::Words::Font::get_LocaleIdBi
431  ASPOSE_WORDS_SHARED_API void set_LocaleIdBi(int32_t value);
432  /// <summary>
433  /// Gets or sets the locale identifier (language) of the formatted Asian characters.
434  /// </summary>
435  /// <remarks>
436  /// For the list of locale identifiers see https://msdn.microsoft.com/en-us/library/cc233965.aspx
437  /// </remarks>
438  ASPOSE_WORDS_SHARED_API int32_t get_LocaleIdFarEast();
439  /// Setter for Aspose::Words::Font::get_LocaleIdFarEast
440  ASPOSE_WORDS_SHARED_API void set_LocaleIdFarEast(int32_t value);
441  /// <summary>
442  /// Returns a Border object that specifies border for the font.
443  /// </summary>
444  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Border> get_Border();
445  /// <summary>
446  /// Returns a Shading object that refers to the shading formatting for the font.
447  /// </summary>
448  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Shading> get_Shading();
449  /// <summary>
450  /// Gets or sets the character style applied to this formatting.
451  /// </summary>
452  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Style> get_Style();
453  /// Setter for Aspose::Words::Font::get_Style
454  ASPOSE_WORDS_SHARED_API void set_Style(System::SharedPtr<Aspose::Words::Style> value);
455  /// <summary>
456  /// Gets or sets the name of the character style applied to this formatting.
457  /// </summary>
458  ASPOSE_WORDS_SHARED_API System::String get_StyleName();
459  /// Setter for Aspose::Words::Font::get_StyleName
460  ASPOSE_WORDS_SHARED_API void set_StyleName(System::String value);
461  /// <summary>
462  /// Gets or sets the locale independent style identifier of the character style applied to this formatting.
463  /// </summary>
464  ASPOSE_WORDS_SHARED_API Aspose::Words::StyleIdentifier get_StyleIdentifier();
465  /// Setter for Aspose::Words::Font::get_StyleIdentifier
466  ASPOSE_WORDS_SHARED_API void set_StyleIdentifier(Aspose::Words::StyleIdentifier value);
467  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Collections::Generic::SortedList<Aspose::Words::BorderType, int32_t>> get_PossibleBorderKeys();
468 
469  /// <summary>
470  /// Resets to default font formatting.
471  /// </summary>
472  /// <remarks>
473  /// <p>Removes all font formatting specified explicitly on the object from which
474  /// <b>Font</b> was obtained so the font formatting will be inherited from
475  /// the appropriate parent.</p>
476  /// </remarks>
477  ASPOSE_WORDS_SHARED_API void ClearFormatting();
478  /// <summary>
479  /// Checks if particular DrawingML text effect is applied.
480  /// </summary>
481  /// <param name="dmlEffectType">DrawingML text effect type.</param>
482  /// <returns>True if particular DrawingML text effect is applied.</returns>
483  ASPOSE_WORDS_SHARED_API bool HasDmlEffect(Aspose::Words::TextDmlEffect dmlEffectType);
484  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> GetDirectBorderAttr(int32_t key);
485  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedBorderAttr(int32_t key);
486  ASPOSE_WORDS_SHARED_API void SetBorderAttr(int32_t key, System::SharedPtr<System::Object> value);
487  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedShadingAttr(int32_t key);
488 
489 protected:
490 
491  Aspose::Words::CharacterCategory get_CharacterCategoryHint();
492  System::Drawing::FontStyle get_FontStyle();
493  System::SharedPtr<Aspose::Drawing::DrColor> get_ColorInternal();
494  void set_ColorInternal(System::SharedPtr<Aspose::Drawing::DrColor> value);
495  System::SharedPtr<Aspose::Drawing::DrColor> get_UnderlineColorInternal();
496  void set_UnderlineColorInternal(System::SharedPtr<Aspose::Drawing::DrColor> value);
497  int32_t get_SpacingRaw();
498  void set_SpacingRaw(int32_t value);
499  System::SharedPtr<Aspose::Drawing::DrColor> get_HighlightColorInternal();
500  void set_HighlightColorInternal(System::SharedPtr<Aspose::Drawing::DrColor> value);
501  int32_t get_Istd();
502  void set_Istd(int32_t value);
503  Aspose::Words::RunVerticalAlignment get_VerticalAlignment();
504  void set_VerticalAlignment(Aspose::Words::RunVerticalAlignment value);
505  bool get_HasCharacterCategoryHint();
506  System::SharedPtr<Aspose::Words::IRunAttrSource> get_Parent() const;
507 
508  static const float SmallCapsSizeFactor;
509  static const float SubscriptSizeFactor;
510  static const float SubscriptPositionFactor;
511  static const float SuperscriptPositionFactor;
512 
513  Font(System::SharedPtr<Aspose::Words::IRunAttrSource> parent, System::SharedPtr<Aspose::Words::DocumentBase> doc);
514  Font();
515 
516  System::String GetFontName(Aspose::Words::CharacterCategory category);
517  int32_t GetLocaleId(Aspose::Words::CharacterCategory category);
518  float GetActualSize(bool isIgnoreSmallCaps);
519  System::SharedPtr<System::Object> FetchAttr(int32_t key);
520  bool HasDirectAttr(int32_t key);
521  System::Drawing::FontStyle GetFontStyle(Aspose::Words::CharacterCategory charCategory);
522  void KeepParentAsSharedPtr();
523 
524  virtual ASPOSE_WORDS_SHARED_API ~Font();
525 
526  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
527 
528 private:
529 
530  System::SharedPtr<Aspose::Words::Run> get_ParentRun();
531  System::SharedPtr<Aspose::Words::Layout::Core::PrinterMetrics> get_PrinterMetrics();
532 
533  System::WeakPtr<Aspose::Words::IRunAttrSource> mParent;
534  System::WeakPtr<Aspose::Words::StyleCollection> mStyles;
535  System::WeakPtr<Aspose::Words::Themes::Theme> mTheme;
536  System::SharedPtr<Aspose::Words::Fonts::DocumentFontProvider> mFontProvider;
537  System::SharedPtr<Aspose::Words::Layout::Core::PrinterMetrics> mPrinterMetrics;
538 
539  bool GetBool(int32_t key);
540  void SetBool(int32_t key, bool value);
541  Aspose::Words::CharacterCategory GetCharacterCategory();
542 
543 };
544 
545 }
546 }
Definition: IFontData.h:20
Definition: Hyphenation.h:18
A collection of Style objects that represent both the built-in and user-defined styles in a document.
Definition: StyleCollection.h:121
@ InsertLineBreaks
Insert line breaks after every 76th character.
virtual System::String GetText()
Gets the text of the run.
Definition: ShapeBase.h:51
Definition: Border.h:65
#define FRIEND_FUNCTION_System_MakeObject
Macro to befriend MakeObject function.
Definition: smart_ptr.h:1366
BorderType
Specifies sides of a border.
Definition: BorderType.h:23