ITextCharacterFormat
ITextCharacterFormat
ITextCharacterFormat
ITextCharacterFormat
Interface
Definition
Defines the default character formatting attributes of a document, or the current character formatting attributes of a text range.
public : interface ITextCharacterFormatpublic interface ITextCharacterFormatPublic Interface ITextCharacterFormat// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
AllCaps AllCaps AllCaps AllCaps
Gets or sets whether the characters are all uppercase.
public : FormatEffect AllCaps { get; set; }public FormatEffect AllCaps { get; set; }Public ReadWrite Property AllCaps As FormatEffect// This API is not available in Javascript.
The uppercase state.
Bold Bold Bold Bold
Gets or sets whether the characters are bold.
public : FormatEffect Bold { get; set; }public FormatEffect Bold { get; set; }Public ReadWrite Property Bold As FormatEffect// This API is not available in Javascript.
The bold state.
FontStretch FontStretch FontStretch FontStretch
Gets or sets the degree to which the font is stretched, compared to the normal aspect ratio of the font.
public : FontStretch FontStretch { get; set; }public FontStretch FontStretch { get; set; }Public ReadWrite Property FontStretch As FontStretch// This API is not available in Javascript.
The degree to which the font is stretched.
FontStyle FontStyle FontStyle FontStyle
Gets or sets the style of the font face, such as normal or italic.
public : FontStyle FontStyle { get; set; }public FontStyle FontStyle { get; set; }Public ReadWrite Property FontStyle As FontStyle// This API is not available in Javascript.
Hidden Hidden Hidden Hidden
Gets or sets whether characters are hidden.
public : FormatEffect Hidden { get; set; }public FormatEffect Hidden { get; set; }Public ReadWrite Property Hidden As FormatEffect// This API is not available in Javascript.
The hidden state.
Italic Italic Italic Italic
Gets or sets whether characters are in italics.
public : FormatEffect Italic { get; set; }public FormatEffect Italic { get; set; }Public ReadWrite Property Italic As FormatEffect// This API is not available in Javascript.
The italicized state.
Kerning Kerning Kerning Kerning
Gets or sets the minimum font size at which kerning occurs.
public : float Kerning { get; set; }public float Kerning { get; set; }Public ReadWrite Property Kerning As float// This API is not available in Javascript.
- Value
- float float float float
The kerning size, in floating-point points.
Remarks
If the value is zero, kerning is turned off. Positive values turn on pair kerning for font point sizes greater than or equal to the kerning value. For example, the value 1 turns on kerning for all legible sizes, whereas 16 turns on kerning only for font sizes of 16 points and larger.
LanguageTag LanguageTag LanguageTag LanguageTag
Gets or sets the Internet Engineering Task Force (IETF) language tag (BCP 47 standard) that identifies the language currently associated with the characters.
public : PlatForm::String LanguageTag { get; set; }public string LanguageTag { get; set; }Public ReadWrite Property LanguageTag As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
The language tag.
Name Name Name Name
Gets or sets the font name.
public : PlatForm::String Name { get; set; }public string Name { get; set; }Public ReadWrite Property Name As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
The font name.
Outline Outline Outline Outline
Gets or sets whether characters are displayed as outlined characters.
public : FormatEffect Outline { get; set; }public FormatEffect Outline { get; set; }Public ReadWrite Property Outline As FormatEffect// This API is not available in Javascript.
The outlined state.
Position Position Position Position
Gets or sets the character offset relative to the baseline.
public : float Position { get; set; }public float Position { get; set; }Public ReadWrite Property Position As float// This API is not available in Javascript.
- Value
- float float float float
The character offset, in floating-point points.
Remarks
Typically, the value of this property is zero. Positive values raise the characters relative to the baseline, and negative values lower them.
ProtectedText ProtectedText ProtectedText ProtectedText
Gets or sets whether the characters are protected against attempts to modify them.
public : FormatEffect ProtectedText { get; set; }public FormatEffect ProtectedText { get; set; }Public ReadWrite Property ProtectedText As FormatEffect// This API is not available in Javascript.
The protected state.
Remarks
In general, calling methods in the Windows.UI.Text namespace that attempt to change the formatting or content of a text range will fail if any part of the range is protected, or if the document is read-only. To change protected text, an app should attempt to turn off the protection of the text to be modified. The owner of the document might permit this to happen.
Size Size Size Size
Gets or sets the font size.
public : float Size { get; set; }public float Size { get; set; }Public ReadWrite Property Size As float// This API is not available in Javascript.
- Value
- float float float float
The font size, in floating-point points.
SmallCaps SmallCaps SmallCaps SmallCaps
Gets or sets whether characters are in small capital letters.
public : FormatEffect SmallCaps { get; set; }public FormatEffect SmallCaps { get; set; }Public ReadWrite Property SmallCaps As FormatEffect// This API is not available in Javascript.
The small capitals state.
Spacing Spacing Spacing Spacing
Gets or sets the amount of horizontal spacing between characters.
public : float Spacing { get; set; }public float Spacing { get; set; }Public ReadWrite Property Spacing As float// This API is not available in Javascript.
- Value
- float float float float
The amount of horizontal spacing, in floating-point points.
Remarks
Typically, the value of this property is zero. Positive values increase the horizontal spacing between characters, and negative values decrease it.
Strikethrough Strikethrough Strikethrough Strikethrough
Gets or sets whether characters are displayed with a horizontal line through the center.
public : FormatEffect Strikethrough { get; set; }public FormatEffect Strikethrough { get; set; }Public ReadWrite Property Strikethrough As FormatEffect// This API is not available in Javascript.
The strikethrough state.
Subscript Subscript Subscript Subscript
Gets or sets whether characters are displayed as subscript.
public : FormatEffect Subscript { get; set; }public FormatEffect Subscript { get; set; }Public ReadWrite Property Subscript As FormatEffect// This API is not available in Javascript.
The subscript state.
Superscript Superscript Superscript Superscript
Gets or sets whether characters are displayed as superscript.
public : FormatEffect Superscript { get; set; }public FormatEffect Superscript { get; set; }Public ReadWrite Property Superscript As FormatEffect// This API is not available in Javascript.
The superscript state.
TextScript TextScript TextScript TextScript
Gets or sets the character repertoire.
public : TextScript TextScript { get; set; }public TextScript TextScript { get; set; }Public ReadWrite Property TextScript As TextScript// This API is not available in Javascript.
The character repertoire.
Remarks
To learn more about character repertoires, see RichEdit Font Binding. Character repertoires are typically scripts like Arabic and Latin, but there are also character repertoires for symbols and Emoji.
Underline Underline Underline Underline
Gets or sets the type of underlining that the characters use.
public : UnderlineType Underline { get; set; }public UnderlineType Underline { get; set; }Public ReadWrite Property Underline As UnderlineType// This API is not available in Javascript.
The type of underlining.
Weight Weight Weight Weight
Gets or sets the font weight of the characters.
public : int Weight { get; set; }public int Weight { get; set; }Public ReadWrite Property Weight As int// This API is not available in Javascript.
- Value
- int int int int
The font weight expressed as a numeric value. See Remarks.
Remarks
In standard typography API, the weight of a font is typically expressed as a constant name, such as "Bold". Using constant names to set the Weight property is supported through type converter behaviors and by the FontWeights support class.
The FontWeights values correspond to the "usWeightClass" definition in the OpenType specification. The "usWeightClass" represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.
Methods
GetClone() GetClone() GetClone() GetClone()
Creates a new object that is identical to this character format object.
public : ITextCharacterFormat GetClone()public ITextCharacterFormat GetClone()Public Function GetClone() As ITextCharacterFormat// This API is not available in Javascript.
The duplicate character format object.
- See Also
IsEqual(ITextCharacterFormat) IsEqual(ITextCharacterFormat) IsEqual(ITextCharacterFormat) IsEqual(ITextCharacterFormat)
Determines whether this character format object has the same properties as the specified character format object.
public : PlatForm::Boolean IsEqual(ITextCharacterFormat format)public bool IsEqual(ITextCharacterFormat format)Public Function IsEqual(format As ITextCharacterFormat) As bool// This API is not available in Javascript.
The character format object to compare against.
True if the objects have the same properties, or false if they don't.
SetClone(ITextCharacterFormat) SetClone(ITextCharacterFormat) SetClone(ITextCharacterFormat) SetClone(ITextCharacterFormat)
Sets the character formatting by copying another text character formatting object.
public : void SetClone(ITextCharacterFormat value)public void SetClone(ITextCharacterFormat value)Public Function SetClone(value As ITextCharacterFormat) As void// This API is not available in Javascript.
The character formatting to apply.
Remarks
Any character formatting values that are undefined in value have no effect.
- See Also