import { $Boolean } from "kryo/builtins/boolean"; import { $Uint16 } from "kryo/builtins/uint16"; import { CaseStyle } from "kryo/case-style"; import { ArrayType } from "kryo/types/array"; import { DocumentIoType, DocumentType } from "kryo/types/document"; import { LiteralType } from "kryo/types/literal"; import { Ucs2StringType } from "kryo/types/ucs2-string"; import { Uint16 } from "semantic-types"; import { $LanguageCode, LanguageCode } from "../language-code"; import { _Tag } from "../tags/_tag"; import { $TagType, TagType } from "../tags/_type"; export interface DefineFontInfo extends _Tag { readonly type: TagType.DefineFontInfo; readonly fontId: Uint16; readonly fontName: string; readonly isBold: boolean; readonly isItalic: boolean; readonly isAnsi: boolean; readonly isShiftJis: boolean; readonly isSmall: boolean; readonly language: LanguageCode; readonly codeUnits: ReadonlyArray; } export const $DefineFontInfo: DocumentIoType = new DocumentType({ properties: { type: {type: new LiteralType({type: $TagType, value: TagType.DefineFontInfo as TagType.DefineFontInfo})}, fontId: {type: $Uint16}, fontName: {type: new Ucs2StringType({maxLength: Infinity})}, isBold: {type: $Boolean}, isItalic: {type: $Boolean}, isAnsi: {type: $Boolean}, isShiftJis: {type: $Boolean}, isSmall: {type: $Boolean}, language: {type: $LanguageCode}, codeUnits: {type: new ArrayType({itemType: $Uint16, maxLength: Infinity})}, }, changeCase: CaseStyle.SnakeCase, });