Fit text to cell

Informations

Author: Patrick Benny
License: Freeware

Description

This method is an extension of Cell() allowing to output text with either character spacing or horizontal scaling.

CellFit(float w [, float h [, string txt [, mixed border [, int ln [, string align [, int fill [, mixed link [, int scale [, int force]]]]]]]]])

The first 8 parameters are the same as Cell(). The additional parameters are:

scale

0 = character spacing
1 = horizontal scaling

force

0 = only space/scale if necessary (not when text is short enough to fit)
1 = always space/scale

The following four methods are also provided for convenience, allowing all combinations of scale/force, and using only the 8 parameters of Cell():

CellFitScale()
CellFitScaleForce()
CellFitSpace()
CellFitSpaceForce()