- measure(comment, renderer): {
height: number;
itemWidth: number[][];
lineWidth: number[];
width: number;
} Parameters
- comment: {
charSize: number;
content: ({
char: string;
charWidth: number;
count: number;
font?: "defont" | "gulim" | "simsun";
isButton?: boolean;
type: "spacer";
} | {
content: string;
font?: "defont" | "gulim" | "simsun";
isButton?: boolean;
slicedContent: string[];
type: "text";
width?: number[];
})[];
font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
lineCount: number;
lineHeight: number;
}charSize: number
content: ({
char: string;
charWidth: number;
count: number;
font?: "defont" | "gulim" | "simsun";
isButton?: boolean;
type: "spacer";
} | {
content: string;
font?: "defont" | "gulim" | "simsun";
isButton?: boolean;
slicedContent: string[];
type: "text";
width?: number[];
})[]
font: "defont" | "mincho" | "gothic" | "gulim" | "simsun"
lineCount: number
lineHeight: number
- renderer: IRenderer
Returns {
height: number;
itemWidth: number[][];
lineWidth: number[];
width: number;
}
計測結果
height: number
itemWidth: number[][]
lineWidth: number[]
width: number
コメントのサイズを計測する