block by nitaku d75ea826aed291c3ee00

Fit text to box

Full Screen

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.

index.js

index.html

index.coffee

index.css