8. A non-transitory computer-readable medium (CRM) storing a plurality of instructions for placing a text string on a page, the plurality of instructions comprising functionality to: obtain an electronic document specifying a margin of the page, an exclusion region having a perimeter for placement on the page, a texture to fill the exclusion region, and the text string; calculate, by a path-fill algorithm and based on the perimeter, a first plurality of geometric primitives corresponding to the exclusion region, wherein the perimeter is an input to the path-fill algorithm, and wherein the first plurality of geometric primitives is an output of the path-fill algorithm; define a vector path comprising: a closed margin subpath corresponding to the margin and having a first direction; and a closed exclusion region subpath corresponding to the perimeter of the exclusion region and having a second direction that is opposite the first direction, wherein the closed exclusion region subpath is contained within the closed margin subpath; calculate, by the same path-fill algorithm and based on a winding number and the vector path associated with the perimeter and the margin, a second plurality of geometric primitives corresponding to a text region on the page excluding the margin and the exclusion region, wherein the vector path and the winding number are inputs to the path-fill algorithm, and wherein the second plurality of geometric primitives is an output of the path-fill algorithm; receive, by a line extent interface, the text string and the second plurality of geometric primitives; calculate, by the line extent interface and for a first line band crossing the page, a first plurality of segments corresponding to an intersection of the first line band with the second plurality of geometric primitives; and render the page by: filling the first plurality of geometric primitives with the texture; and placing a first portion of the text string within the first plurality of segments.
8. A non-transitory computer-readable medium (CRM) storing a plurality of instructions for placing a text string on a page, the plurality of instructions comprising functionality to: obtain an electronic document specifying a margin of the page, an exclusion region having a perimeter for placement on the page, a texture to fill the exclusion region, and the text string; calculate, by a path-fill algorithm and based on the perimeter, a first plurality of geometric primitives corresponding to the exclusion region, wherein the perimeter is an input to the path-fill algorithm, and wherein the first plurality of geometric primitives is an output of the path-fill algorithm; define a vector path comprising: a closed margin subpath corresponding to the margin and having a first direction; and a closed exclusion region subpath corresponding to the perimeter of the exclusion region and having a second direction that is opposite the first direction, wherein the closed exclusion region subpath is contained within the closed margin subpath; calculate, by the same path-fill algorithm and based on a winding number and the vector path associated with the perimeter and the margin, a second plurality of geometric primitives corresponding to a text region on the page excluding the margin and the exclusion region, wherein the vector path and the winding number are inputs to the path-fill algorithm, and wherein the second plurality of geometric primitives is an output of the path-fill algorithm; receive, by a line extent interface, the text string and the second plurality of geometric primitives; calculate, by the line extent interface and for a first line band crossing the page, a first plurality of segments corresponding to an intersection of the first line band with the second plurality of geometric primitives; and render the page by: filling the first plurality of geometric primitives with the texture; and placing a first portion of the text string within the first plurality of segments. 9. The non-transitory CRM of claim 8 , the instructions further comprising functionality to: calculate, by the line extent interface and for a second line band crossing the page, a second plurality of segments corresponding to an intersection of the second line band with the second plurality of geometric primitives; and place a second portion of the text string within the second plurality of segments.