Blame docs/html/level-2.html

Packit 874993
Packit 874993
<html>
Packit 874993
<head>
Packit 874993
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 874993
<title>Level 2: HarfBuzz Manual</title>
Packit 874993
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
Packit 874993
<link rel="home" href="index.html" title="HarfBuzz Manual">
Packit 874993
<link rel="up" href="clusters.html" title="">
Packit 874993
<link rel="prev" href="the-distinction-between-levels-0-and-1.html" title="The distinction between levels 0 and 1">
Packit 874993
<link rel="next" href="shaping-and-shape-plans.html" title="Shaping and shape plans">
Packit 874993
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
Packit 874993
<link rel="stylesheet" href="style.css" type="text/css">
Packit 874993
</head>
Packit 874993
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 874993
Packit 874993
Packit 874993
Home
Packit 874993
Up
Packit 874993
Prev
Packit 874993
Next
Packit 874993
Packit 874993
Packit 874993

Packit 874993
Level 2
Packit 874993

Packit 874993
    Level 2 is a different beast from levels 0 and 1. It is simple to
Packit 874993
    describe, but hard to make sense of. It simply doesn't do any
Packit 874993
    cluster merging whatsoever. When things ligate or otherwise multiple
Packit 874993
    glyphs turn into one, the cluster value of the first glyph is
Packit 874993
    retained.
Packit 874993
  

Packit 874993

Packit 874993
    Here are a few examples of why processing cluster values produced at
Packit 874993
    this level might be tricky:
Packit 874993
  

Packit 874993
Packit 874993

Packit 874993
Ligatures with combining marks
Packit 874993

Packit 874993
      Imagine capital letters are bases and lower case letters are
Packit 874993
      combining marks. With an input sequence like this:
Packit 874993
    

Packit 874993
Packit 874993
  A,a,B,b,C,c
Packit 874993
  0,1,2,3,4,5
Packit 874993
Packit 874993

Packit 874993
      if A,B,C ligate, then here are the cluster
Packit 874993
      values one would get under the various levels:
Packit 874993
    

Packit 874993

Packit 874993
      level 0:
Packit 874993
    

Packit 874993
Packit 874993
  ABC,a,b,c
Packit 874993
  0  ,0,0,0
Packit 874993
Packit 874993

Packit 874993
      level 1:
Packit 874993
    

Packit 874993
Packit 874993
  ABC,a,b,c
Packit 874993
  0  ,0,0,5
Packit 874993
Packit 874993

Packit 874993
      level 2:
Packit 874993
    

Packit 874993
Packit 874993
  ABC,a,b,c
Packit 874993
  0  ,1,3,5
Packit 874993
Packit 874993

Packit 874993
      Making sense of the last example is the hardest for a client,
Packit 874993
      because there is nothing in the cluster values to suggest that
Packit 874993
      B and C ligated with
Packit 874993
      A.
Packit 874993
    

Packit 874993
Packit 874993
Packit 874993

Packit 874993
Reordering
Packit 874993

Packit 874993
      Another tricky case is when things reorder. Under level 2:
Packit 874993
    

Packit 874993
Packit 874993
  A,B,C,D,E
Packit 874993
  0,1,2,3,4
Packit 874993
Packit 874993

Packit 874993
      Now imagine D moves before
Packit 874993
      B:
Packit 874993
    

Packit 874993
Packit 874993
  A,D,B,C,E
Packit 874993
  0,3,1,2,4
Packit 874993
Packit 874993

Packit 874993
      Now, if D ligates with B, we
Packit 874993
      get:
Packit 874993
    

Packit 874993
Packit 874993
  A,DB,C,E
Packit 874993
  0,3 ,2,4
Packit 874993
Packit 874993

Packit 874993
      In a different scenario, A and
Packit 874993
      B could have ligated
Packit 874993
      before D reordered; that
Packit 874993
      would have resulted in:
Packit 874993
    

Packit 874993
Packit 874993
  AB,D,C,E
Packit 874993
  0 ,3,2,4   
Packit 874993
Packit 874993

Packit 874993
      There's no way to differentitate between these two scenarios based
Packit 874993
      on the cluster numbers alone.
Packit 874993
    

Packit 874993

Packit 874993
      Another problem appens with ligatures under level 2 if the
Packit 874993
      direction of the text is forced to opposite of its natural
Packit 874993
      direction (e.g. left-to-right Arabic). But that's too much of a
Packit 874993
      corner case to worry about.
Packit 874993
    

Packit 874993
Packit 874993
Packit 874993
Packit 874993

Generated by GTK-Doc V1.25.1
Packit 874993
</body>
Packit 874993
</html>