GN4 provides a system to estimate the length of a text necessary to fill a given geometry. This system produces an estimate of the length in terms of a unit - that can be the number of words, or of characters, or of 'standard lines', depending on the configuration.
The system is based on a series of values, stored in wordEstimate node of the typography, that gives the required number for various - at least three - 'standard' geometries. Given a geometry, the system will find the three 'nearest' ones in the table, and generate a number averaging the numbers found in the table for these geometries.
The system will produce exactly the same values found in the table given the same geometries, and reasonable estimates for geometries that are different, even with strange shapes.
A geometry is described by its width and height, in millipoints. The height of a geometry is the sum of the heights of all its frames, the (average) width of a geometry is the total area of the geometry divided by its height. So for example the width and height of the simplest possible geometry - consisting of a single rectangular frame - are the width and the height of the frame itself. the width and height of a geometry consisting of three frames of the same width are this width and the sum of the height of the frames, and so forth.
The table of values used by the text length estimate system is typography -specific, i.e. all titles assigned to the same typography use the same table, but the titles who are assigned to different typography will have different tables.
There could be many different wordEstimate sections. Each section contains one attribute named name specifying the format string to use to display the estimates: this is a string that contain the special sequence '%d' that is replaced with the computed number, and also the unit name, e.g. 'words'. You can specify any unit name - it depends on your entered values anyway.
Moreover, each section contains also at least three keys named estData that specify the width of the frame, e.g. 130344mpt, and a <pairArray> with list of pairs of frame height and number of items, e.g. <pair height="10000" items="5" /> where 10000 is the height of the frame and 5 is counted number of units.
A possible purpose can be to have estimate in characters, words and lines at the same time. Another purpose can be to use X different leadings, e.g. 9.5pt, 10pt, 12pt. See Remarks related to leading in estimate values.
IMPORTANT: it is essential to keep the frame height step identical in all <pair rows and equal to your default leading. See Remarks related to estimate step.
For the procedure, see Configure text estimating for Fred4.
See also