1. A method of writing text within a region defined within at least a two-coordinate space, the text having a font height, the method comprising: identifying spans that extend in the direction of a first coordinate, start and end at the perimeter of the region and cross a portion of the region, the spans separated from each other in the direction of the second coordinate by an interval that is smaller than the font height; identifying aligned segments of two or more spans that cover the same first coordinate values; defining at least one text box for a text line based on the aligned segments and the font height, the aligned segments defining a dimension of each text box in the direction of the first coordinate and the font height defining a dimension of each text box in the direction of the second coordinate; and writing text to the text box.