ABSTRACT

A layout engine takes some text and images, and some layout instructions, and decides where to put each character or pixel. These engines are at the core of browsers and e-book readers (which are basically the same thing) as well as the page design tools used in professional publishing, and they are surprisingly tricky to get right: most elements can be resized to fit the available space, but each time one is made taller or wider, it changes the space available for other elements. As well as looking at algorithms for managing layout, this chapter looks at how to test systems of this kind.