FunctionsDrawingGetTextSizeOn this pageDrawingGetTextSize CallableDrawingGetTextSize(Text: string, Width: number): [text: string, size: number]Gets the text size needed to fit inside a given width according to the current font. This function is memoized because <code>MainCanvas.measureText(Text)</code> is a major resource hog.ParametersText: stringText to drawWidth: numberWidth in which the text has to fitReturns [text: string, size: number]Text to draw and its font sizeIndex MethodsclearCacheMethods clearCacheclearCache(): voidClears the cache of the memoized functionReturns void
Gets the text size needed to fit inside a given width according to the current font. This function is memoized because