源码与继承
成员目录19
构造函数
constructor
new Font( source?: Readonly< Pick< Font, | typeof graphicsNative | "isSmooth" | typeof fontRevision | "getInfo" | "getGlyph" | "getGlyphById" | "hasGlyph" | "getKerning" | "getAscent" | "getDescent" | "getLineSpacing" | "getUnderlinePosition" | "getUnderlineThickness" | "getTexture", >, >,): Font 参数
source可选Readonly< Pick< Font, | typeof graphicsNative | "isSmooth" | typeof fontRevision | "getInfo" | "getGlyph" | "getGlyphById" | "hasGlyph" | "getKerning" | "getAscent" | "getDescent" | "getLineSpacing" | "getUnderlinePosition" | "getUnderlineThickness" | "getTexture", >,>
源码与继承
方法
getAscent
getAscent(size: number): number
getDescent
getDescent(size: number): number
getGlyph
getGlyph( codePoint: number, characterSize: number, bold: boolean, outlineThickness?: number,): ReadonlyValue<Glyph> 参数
outlineThicknessnumber = 0
源码与继承
getGlyphById
getGlyphById( id: number, characterSize: number, bold: boolean, outlineThickness?: number,): ReadonlyValue<Glyph> 参数
outlineThicknessnumber = 0
源码与继承
getKerning
getKerning( first: number, second: number, characterSize: number, bold?: boolean,): number
getLineSpacing
getLineSpacing(size: number): number
getTexture
getTexture(characterSize: number): Readonly
getUnderlinePosition
getUnderlinePosition(size: number): number
getUnderlineThickness
getUnderlineThickness(size: number): number
hasGlyph
hasGlyph(codePoint: number): boolean
openFromFile
openFromFile(filename: string): Promise<boolean>
openFromMemory
openFromMemory(data: Uint8Array): Promise<boolean>
setSmooth
setSmooth(smooth: boolean): void
符号成员
[fontRevision]
"[fontRevision]": number = 0
源码与继承
只读[graphicsNative]
"[graphicsNative]": NativeGraphicsHandle<"font">
源码与继承
Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0
由原生层拥有的字体、输入存储和保留的字形图集。