<div dir="ltr"><div><div>Hello,<br><br></div>the MFFloat 'length' field enforces prescribed lengths for the lines of a text node. It may squeeze or expand lines. The 'maxExtent' field squeezes the width of the text to the given width if a line is longer than this width. From what I interprete from the spec., the squeezing factor would be applied uniformly to all lines of text to maintain a uniform appearance of the glyphs, at least if no length field is given. If both are specified there can be interaction between how the two fields affect the rendering of the text.<br><br></div><div>In most interaction cases, the expected result is clear. For example, if after adjusting all lines to the provided lengths of the 'length' field, the widest length is smaller than 'maxExtent' width, there is no need to further manipulate the rendered text. <br><br>In other cases, the expected result is less obvious. For example, if after adjusting all lines to the provided lengths of the 'length' field, the widest length becomes larger than 'maxExtent' there are two options:<br><br></div><div>- squeeze only the lines which are now wider than maxExtent<br></div><div>- squeeze all lines by a uniform squeezing factor which is derived from the longest line<br><br></div><div>The second option will result in lines that do not have their prescribed length. The first option seems more viable but will result in line length to line length ratios which do not correspond to the prescribed ratios. Simply put, in the first case a length='1 2 3 4' and maxExtent='2' will look like a column, whereas in the second case it will look like a squeezed triangle.<br><br></div><div>So the question may boil down to if the maxExtent squeezing should be applied line by line, or affect the complete text uniformly. It may need to behave differently depending on if there is a length field provided or not. Perhaps this kind of detail is outside of the scope of spec. and should be left to the discretion of the browser. Is more clarification needed in the spec. ?<br><br></div><div>Interaction cases where one of the lengths is 0 indicating no adjustment probably need similar consideration. For example, a length='1 2 0 4'  and maxExtent='3' may mean:<br><br>- the third line is not modified as long as it is shorter than length 3 or<br></div><div>- the third line is at least squeezed by a factor of 3/4 along with all other lines.<br><br></div><div>- if longer than 3, the third line is squeezed to length 3 or<br>- if between 3 and 4, the third line is squeezed by a factor of 3/4<br></div><div><br></div><div>Two possible algorithms:<br><br></div><div>Maintain ratios<br></div><div>1) apply lengths<br></div><div>2) find longest length (measure it if length=0)<br></div><div>3) squeeze uniformly if maxExtent < longest length<br><br></div><div>line by line<br></div><div>1) cap all lengths at maxExtent, if longer<br></div><div>2) for 0 lengths, measure and set to maxExtent if longer<br></div>3) apply lengths<br><div><br></div><div>Any preference ?<br><br></div><div>Any thoughts welcome,<br><br></div><div>Andreas<br><br><br><br><br></div><div><br> </div><div><br></div><div><div><div><br clear="all"><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div></div></div>