Definition of 'shaping engine'? (Or, what is HarfBuzz?)
pereelmagne
Posts: 10
I need a definition of 'shaping engine' for a piece that I'm writing and I've come up with a proposal. You savvy typographers and type designers will surely tear it apart and make evident all its flaws. Please do. The definition goes like this:
A ‘shaping engine’ or ‘text shaping engine’ is:
- a software library
- used by text processors and page layout applications
- which processes raw Unicode-compliant text (or plain text, for short)
- and applies to it parameters from the OpenType font in use
- in order to generate the typographic written chain.
A ‘shaping engine’ or ‘text shaping engine’ is:
- a software library
- used by text processors and page layout applications
- which processes raw Unicode-compliant text (or plain text, for short)
- and applies to it parameters from the OpenType font in use
- in order to generate the typographic written chain.
0
Comments
-
A bit more generally, a shaping engine is used wherever Unicode text is displayed, so not just word processors and page layout applications but also web browsers, mobile apps, embedded systems (e.g. automobile infotainment systems, houshold appliances, etc).
While OpenType is the most commonly deployed font and layout technolog, shaping engines also exist for other technologies and, notably, HarfBuzz supports Apple’s AAT and SIL’s Graphite formats in addition to OpenType. So maybe just say ‘applies parameters from the font’.
As written, your definition might imply a ‘dumb’ shaping engine, which simply applies whatever is in the font. This would be characteristic of the state table engines used for AAT and Graphite. OpenType shaping engines carry a lot of layout intelligence, much of it derived from Unicode properties, and work in consort with the font. The OpenType Layout model shares responsibilities between the shaping engine and the font tables. So, for example, in shaping Arabic text the OTL GSUB table contains mappings for left, right, and dual joining glyph forms, but it is the shaping engine that analyses the character string and determines where to apply each of these mappings. [Conversely, in AAT or Graphite, the font defines the joining frm substitutions using contextual states at the glyph level.]1 -
I define a shaping engine as a piece of software which maps Unicode codepoints to glyphs and their expected positions, in response to the conventions of the script and the rules in the font.2
-
so not just word processors and page layout applications but also web browsers, mobile apps, embedded systems (e.g. automobile infotainment systems, houshold appliances, etc).It was my amateurish understanding that an application (be it Powerpoint, Whatsapp…) doesn't need HarfBuzz to render text chains with simple graphs such as ã or ĉ. In this situation, the raw text chain and OpenType are enough.
I infer from your comment that the shaping engine works in every text and in every application. We could even say that a text processor "is" a shaping engine. So then, what's the difference between a word processor and a shaping engine, between Word and HarfBuzz?
0 -
Simon Cozens said:I define a shaping engine as a piece of software which maps Unicode codepoints to glyphs and their expected positions, in response to the conventions of the script and the rules in the font.0
-
What I mean is: It seems that a text processor may or may not use a library such as HarfBuzz. It needs to use it in order to render complex graphs, not when a text chain is "simple". Is that right?0
-
A text processor always uses a text shaping engine, but it doesn't have to be HarfBuzz. MacOS and Windows provide their own engines by default, such as CoreText and Uniscribe. An application needs to position glyphs on your screen, even if the text is "simple".
The input of a text shaping engine is a list of Unicode characters and a font. The output is correctly positioned glyphs.
A text processor provides functionality on top of that. It provides an interface to allow a user to edit the text, i.e. the user can edit the input of the text shaping engine: the list of Unicode characters and the font. That is given to the shaping engine, which creates the correctly positioned glyphs. Then those glyphs are rendered to screen.2 -
Floor van Steeg said:A text processor always uses a text shaping engine...0
-
In previous decades, before most of us Westerners had incentives to think about rendering more complex scripts on computer screens, there was a simple 1:1 correspondence between characters and glyphs. Ü was a single precomposed character with its own codepoint. Characters rendered predictably from left to right, and before proportionally spaced fonts came into widespread use, every character had a single predictable width. As text rendering became more complex, the need for shaping engines emerged.
0 -
> the need for shaping engines emerged
Or: became more apparent even to us westerners.
The fact that computing was initially largely dominated by the west, and even especially by English speakers (and writers!) meant it initially had a very narrow perspective of what language is and how it works.
Much of the history of text layout consists of more and more western people realizing—ofttimes even the same people repeatedly—that “wait a moment, this is more complicated than I thought” as they get further and further away from English (or Latin/Greek/Cyrillic) only plus just a handful of special symbols already visible on their keyboard.2 -
-
Floor van Steeg said:A text processor always uses a text shaping engine, but it doesn't have to be HarfBuzz. MacOS and Windows provide their own engines by default, such as CoreText and Uniscribe. An application needs to position glyphs on your screen, even if the text is "simple".
The input of a text shaping engine is a list of Unicode characters and a font. The output is correctly positioned glyphs.
A text processor provides functionality on top of that. It provides an interface to allow a user to edit the text, i.e. the user can edit the input of the text shaping engine: the list of Unicode characters and the font. That is given to the shaping engine, which creates the correctly positioned glyphs. Then those glyphs are rendered to screen.1 -
Simon Cozens said:1
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 798 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports