OSP

Open Source Publishing – Design Tools For Designers

Scenario for vowels, consonants and a text-engine

Tools · Type · November 23rd, 2010 · OSP

Imagine1 a paragraph in Scribus. The first word consists of three vowels and a consonant. The Scribus text-engine receives this cluster of characters as a first input. Now the shaper will start to work; it has to decide what features need to be applied to the cluster. Do characters need to be re-ordered? Do ligatures need to be applied? If the answer is ‘yes’, the shaper will ask the font-software if there is a ligature available that can be used. Each cluster is treated in this way and subsequently added to the list of glyphs. This list of glyphs output by the shaper is than entered into the second part of the text-engine, the block-compositor. The block-compositor is in contact with the line-lay-outer. It knows that a certain line starts at a given point and it also knows about the width of the frame containing it. The block-compositor will ask the line-lay-outer to come up with a certain amount of propositions per line. Per proposition, a penalty is given, based on the quality of the break (does it require hyphenation?) and the amount of stretching needed to reach the width of the frame. Now the block-composer can produce an oriented graph2 on the basis of which it can decide what is the least penalized route3). But a second parameter is also taken into account: what combination of line-propositions will result in the most uniform distribution of line-width per paragraph? After the block-compositor has found the optimal solution, the text engine outputs the paragraph to the canvas.

  1. This Scenario for vowels, consonants and a text-engine describes the sophisticated new text-engine that the Scribus team is preparing us at this very moment []
  2. http://mathworld.wolfram.com/OrientedGraph.html []
  3. Compare the concept of badness in TeX: http://en.wikibooks.org/wiki/TeX/definition/badness []

Tags: · , ,

  • 2 Comments ↓

  • 1. Barry Schwartz

    Nov 25, 2010 at 3:44 am

    Be aware that separating the text into words first (the way TeX does) will defeat some of the features in some fonts. There can be ligatures with spaces, even in Type 1 fonts, but more troublesome are contextual substitutions where the context covers parts of more than one word.

  • 2. Michael

    Mar 4, 2011 at 1:13 am

    ____ _ __
    |___ \ /\| |/\ / /
    __) | \ ` ‘ / / /_
    |__ < |_ _| | '_ \
    ___) | / , . \ | (_) |
    |____/ \/|_|\/ \___/

    :

Leave a Comment

  _    ___            ____    _  _   
 / |  ( _ )     _    | ___|  | || |  
 | |  / _ \   _| |_  |___ \  | || |_ 
 | | | (_) | |_   _|  ___) | |__   _|
 |_|  \___/    |_|   |____/     |_|