Function
loadBitmapFont
(name: string | null, src: string, gridW: number, gridH: number, opt?: LoadBitmapFontOpt): Asset<BitmapFontData>Load a bitmap font into asset manager, with name and resource url and information on the layout of the bitmap.
param name- The asset name.
param src- The resource url.
param gridW- The width of each character on the bitmap.
param gridH- The height of each character on the bitmap.
param opt- The options for the bitmap font.
// load a bitmap font called "04b03", with bitmap "fonts/04b03.png"
// each character on bitmap has a size of (6, 8), and contains default ASCII_CHARS
loadBitmapFont("04b03", "fonts/04b03.png", 6, 8);
// load a font with custom characters
loadBitmapFont("myfont", "myfont.png", 6, 8, { chars: "☺☻♥♦♣♠" });returns The asset data.
since v3000.0
group Assets