All examples By author By category About

nitaku

Fit text to box

This example shows a way to stretch some text to fit a given rectangular area, using SVG's viewPort attribute. The computed bounding box of the text is larger than the minimum rectangle that contains its actual representation, causing some space to be left at the top, right and bottom.