Class TextStyle
- Namespace
- BitMiracle.Docotic.Pdf.Layout
- Assembly
- BitMiracle.Docotic.Pdf.Layout.dll
The style of text.
public sealed class TextStyle
- Inheritance
-
TextStyle
- Inherited Members
Remarks
Text style objects are immutable. Every method does not modify the original object and returns a new style object.
There are following ways to get TextStyle objects:
- Use the Parent property.
- Use TextStyleWithFont methods.
- Use Typography class or derived classes.
- Use any method of existing TextStyle objects.
The Getting Started with Layout API article provides essential information on how to generate PDFs with the API.
Check out the other articles and code samples on the C# PDF generation library page.
Properties
- Parent
Gets the predefined text style for loading text properties from parent layout elements.
Methods
- BackgroundColor(PdfColor, int)
Sets the background color and opacity.
- DirectionAuto()
Sets the text direction depending on the first strong directional character.
- DirectionLeftToRight()
Sets the text direction to left-to-right.
- DirectionRightToLeft()
Sets the text direction to right-to-left.
- Equals(object?)
Determines whether the specified object is equal to this TextStyle instance.
- Fallback(TextStyle?)
Sets the fallback style.
- FontColor(PdfColor, int)
Sets the font color and opacity.
- FontSize(double)
Sets the font size.
- GetHashCode()
Returns a hash code for this TextStyle instance.
- LetterSpacing(double)
Sets a letter spacing.
- LineHeight(double)
Sets the line height.
- NormalPosition()
Sets the regular text style (neither subscript nor superscript).
- Strikethrough(bool)
Sets the strikethrough text style.
- Subscript()
Sets the subscript text style.
- Superscript()
Sets the superscript text style.
- Underline(bool)
Sets the underline text style.
- WrapAnywhere(bool)
Sets the wrapping.
Operators
- operator ==(TextStyle, TextStyle)
Determines whether the two specified styles are equal to each other.
- operator !=(TextStyle, TextStyle)
Determines whether the two specified styles are not equal to each other.