|
Packit |
874993 |
|
|
Packit |
874993 |
<html>
|
|
Packit |
874993 |
<head>
|
|
Packit |
874993 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
Packit |
874993 |
<title>A clustering example for levels 0 and 1: 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="clusters.html" title="">
|
|
Packit |
874993 |
<link rel="next" href="reordering-in-levels-0-and-1.html" title="Reordering in levels 0 and 1">
|
|
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 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
A clustering example for levels 0 and 1
|
|
Packit |
874993 |
|
|
Packit |
874993 |
Let's say we start with the following character sequence and cluster
|
|
Packit |
874993 |
values:
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
A,B,C,D,E
|
|
Packit |
874993 |
0,1,2,3,4
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
We then map the characters to glyphs. For simplicity, let's assume
|
|
Packit |
874993 |
that each character maps to the corresponding, identical-looking
|
|
Packit |
874993 |
glyph:
|
|
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 if, for example, B and C
|
|
Packit |
874993 |
ligate, then the clusters to which they belong "merge".
|
|
Packit |
874993 |
This merged cluster takes for its cluster number the minimum of all
|
|
Packit |
874993 |
the cluster numbers of the clusters that went in. In this case, we
|
|
Packit |
874993 |
get:
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
A,BC,D,E
|
|
Packit |
874993 |
0,1 ,3,4
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
Now let's assume that the BC glyph decomposes
|
|
Packit |
874993 |
into three components, and D also decomposes into
|
|
Packit |
874993 |
two. The components each inherit the cluster value of their parent:
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
A,BC0,BC1,BC2,D0,D1,E
|
|
Packit |
874993 |
0,1 ,1 ,1 ,3 ,3 ,4
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
Now if BC2 and D0 ligate, then
|
|
Packit |
874993 |
their clusters (numbers 1 and 3) merge into
|
|
Packit |
874993 |
min(1,3) = 1 :
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
A,BC0,BC1,BC2D0,D1,E
|
|
Packit |
874993 |
0,1 ,1 ,1 ,1 ,4
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
At this point, cluster 1 means: the character sequence
|
|
Packit |
874993 |
BCD is represented by glyphs
|
|
Packit |
874993 |
BC0,BC1,BC2D0,D1 and cannot be broken down any
|
|
Packit |
874993 |
further.
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
|
|
Packit |
874993 |
Generated by GTK-Doc V1.25.1
|
|
Packit |
874993 |
</body>
|
|
Packit |
874993 |
</html>
|