import { FontCatalog , TextCanvas } from "@here/harp-text-canvas" ; import { assert } from "@here/harp-utils" ; export class TextCanvasFactory { private m_minGlyphCount : number = 0 ; private m_maxGlyphCount : number = 0 ; param m_renderer constructor ( private readonly m_renderer ) { } setGlyphCountLimits ( min , max ) { this . m_minGlyphCount = min ; this . m_maxGlyphCount = max ; } param fontCatalog param name createTextCanvas ( fontCatalog , name ? ) { assert ( this . m_maxGlyphCount > 0 ) ; return new TextCanvas ( { renderer : this . m_renderer , fontCatalog , minGlyphCount : this . m_minGlyphCount , maxGlyphCount : this . m_maxGlyphCount , name } ) ; } }