import * as em from "./Enums"; import * as ds from "./Types"; import { ObjectManager } from "./ObjectManager"; import { ObjectBase } from "./ObjectBase"; import { type Font } from "./Font"; import { type Pen } from "./Pen"; import { type Brush } from "./Brush"; /** * Represents a text format. **/ export declare class Format extends ObjectBase { /** * Creates a new {@link Format} object with specified properties. * @param formatProperties Text formatting attributes such as font, colors, decorations and so on. **/ constructor(formatProperties: ds.FormatProperties); /** * Creates a new Format based on properties of an existing {@link Format}. * @param baseFormat The {@link Format} used as the base for the new Format. * @param formatProperties The settings overriding properties of the base Format. **/ constructor(baseFormat: Format, formatProperties: ds.FormatProperties); /** * Creates a new {@link Format} object with specified properties. * @param om An object manager that controls the lifetime of the {@link Format} object. * @param formatProperties Text formatting attributes such as font, colors, decorations and so on. **/ constructor(om: ObjectManager, formatProperties: ds.FormatProperties); /** * Gets the {@link Font} used by this {@link Format}. **/ get font(): Font | null; /** * Gets the index of a palette used for drawing color fonts. **/ get paletteIndex(): number | null; /** * Gets the font family name. **/ get fontFamily(): string; /** * Gets a value indicating whether the font should be bolded. **/ get bold(): boolean; /** * Gets a value indicating whether the font should be italicized. **/ get italic(): boolean; /** * Gets the logical font size, in graphic units. **/ get fontSize(): number; /** * Gets a value indicating whether the size of a fallback font should be coerced to the size of original font. **/ get recalcFontSizeForFallbackFonts(): boolean; /** * Gets a value indicating if the glyphs should be displayed as subscript. **/ get subscript(): boolean; /** * Gets a value indicating if the glyphs should be displayed as superscript. **/ get superscript(): boolean; /** * Gets a value indicating if the text is underlined. **/ get underline(): boolean; /** * Gets a value indicating if the text is double underlined. **/ get doubleUnderline(): boolean; /** * Gets a value indicating if the strikethrough style is applied to the text. **/ get strikethrough(): boolean; /** * Gets the text foreground color. **/ get foreColor(): ds.Color; /** * Gets the text background color. **/ get backColor(): ds.Color; /** * Gets a value indicating if the embedded bitmaps from the EBDT font table can be used. **/ get allowFontSbits(): boolean; /** * Gets a value indicating if the glyphs are hollow (outlined), otherwise they are solid. **/ get hollow(): boolean; /** * Gets the pen to draw glyph outlines. **/ get strokePen(): Pen | null; /** * Gets the brush to fill the glyphs. **/ get fillBrush(): Brush | null; /** * Gets the array of assigned Microsoft OpenType typography properties. **/ get fontFeatures(): ds.FontFeature[] | null; /** * Gets a value indicating whether the typographical font metrics should be applied instead of Windows-specific and Apple-specific font metrics. **/ get useTypoMetrics(): boolean; /** * Gets the preferred glyph widths (generally used in CJKV fonts). **/ get glyphWidths(): em.GlyphWidths; /** * Gets the Neutral Culture string, if assigned. **/ get language(): string; /** * Gets a value indicating whether the whole text run should be considered as a single Grapheme Cluster. **/ get textRunAsCluster(): boolean; /** * Gets a value indicating if the normally sideways characters should be drawn upright in vertical text. **/ get uprightInVerticalText(): boolean; /** * Gets a value indicating if all characters should appear as rotated 90 or -90 degrees in vertical text. **/ get sidewaysInVerticalText(): boolean; /** * Gets a value indicating if ASCII characters should be transformed into fullwidth characters. **/ get transformToFullWidth(): boolean; /** * Gets a value indicating whether the canonical decomposition, reordering, and composition stages should be omitted. **/ get skipNormalization(): boolean; /** * Gets a value indicating whether to apply normalization to Singleton Decompositions and Post Composition Version precomposed characters. **/ get strictCanonicalDecomposition(): boolean; /** * Gets a value indicating whether the character 'HYPHEN-MINUS' (U+002D) is treated as the character 'HYPHEN' (U+2010) by the Unicode line breaking algorithm. **/ get treatHyphenMinusAsHyphen(): boolean; /** * Gets the character width scale factor. Values are between 0.1 and 10.0. **/ get charWidthFactor(): number; /** * Gets the scaling factor for the glyph advance value relative to font's Average Character Width. Values are from 0.5 up. **/ get glyphAdvanceFactor(): number; /** * Gets the absolute increment (delta) for the glyph advance value, in graphic units. **/ get glyphAdvanceOffset(): number; /** * Gets the offset of the text in the orthogonal direction, in graphic units. **/ get transverseOffset(): number; /** * Gets the explicit line gap (if not null), in graphic units. **/ get lineGap(): number | null; /** * Gets a value indicating that for sideways text in vertical flow, line gap will be set according to {@link Font.verticalLineGap}. * If false, line gap for lines containing sideways text is set according to {@link Font.horizontalLineGap}, * which can lead to different gaps between columns that contain sideways text runs and those that do not. **/ get useVerticalLineGapForSideways(): boolean; /** * Gets a value indicating if the horizontal ascending, descending, and line gap settings should be applied to vertical text. **/ get useHorizontalMetricsForVerticalText(): boolean; }