import { TextStyle, ViewStyle } from "./types"; /** * Extracts text style from a style object */ export declare function extractTextStyle(style: any): TextStyle; /** * Extracts view/layout style from a style object */ export declare function extractViewStyle(style: any): ViewStyle; /** * Determines if text should be bold */ export declare function isBold(style: TextStyle): boolean; /** * Maps fontSize to ESC/POS character size (width x height multipliers) * * Font size mapping using ESC ! command (limited to 2x2 maximum): * - 8-12px → 1x1 (normal) * - 13-18px → 1x2 (normal width, double height) * - 19-24px → 2x1 (double width, normal height) * - 25+px → 2x2 (double width, double height) * * Note: ESC ! command only supports up to 2x2 character size. * Larger sizes (3x, 4x, etc.) would require GS ! command which may not * be supported on all thermal printers (e.g., Bematech MP-4200 TH). * * PDF uses zoom factor (default 0.46), so actual sizes are smaller: * - 16 * 0.46 = 7.36 (normal text) * - 18 * 0.46 = 8.28 (medium text) * - 20 * 0.46 = 9.2 (title text) * * We use raw fontSize values (ignoring zoom) for better differentiation */ export declare function mapFontSizeToESCPOS(fontSize?: number | string): { width: number; height: number; }; /** * Maps textAlign to ESC/POS alignment */ export declare function mapTextAlign(textAlign?: string): "left" | "center" | "right"; /** * Calculates spacing (margin/padding) in lines * Approximates pixels to line feeds */ export declare function calculateSpacing(value?: number): number; /** * Determines if a border is dashed */ export declare function isDashedBorder(border?: string): boolean; /** * Generates a divider line based on border style */ export declare function generateDividerLine(width: number, dashed?: boolean): string; /** * Merges multiple style objects (handles spread syntax) */ export declare function mergeStyles(...styles: any[]): any; /** * Parses width percentage to column width in characters * Uses Math.round() to minimize rounding errors */ export declare function parseWidth(width: string | number | undefined, totalWidth: number): number; /** * Aligns text within a column width (using CP860 byte length for accurate padding) */ export declare function alignTextInColumn(text: string, width: number, align: "left" | "center" | "right"): string; /** * Splits text into multiple lines if it exceeds width */ export declare function wrapText(text: string, width: number): string[]; //# sourceMappingURL=styles.d.ts.map