summaryrefslogtreecommitdiff
path: root/systems/tex-extensions/clasen/hz/hz-glue.ch
blob: e38a1f45720937a971bab4db7ea49a095f11964b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@x
@p function adjust_excess(p:pointer;r:real):scaled;
@y
@p function adjust_excess(p:pointer;r:glue_ratio):scaled;
@z

@x
    d:=abs(v+char_width(f)(i)-r*w);
@y
    d:=abs(v+char_width(f)(i)-glue_mult(r,w));
@z

@x
      dd:=abs(v+char_width(ff)(ii)-r*w);
@y
      dd:=abs(v+char_width(ff)(ii)-glue_mult(r,w));
@z

@x
      x:=x-adjust_excess(link(q),(gw+x)/gw);
@y
  { |adjust_excess| tries to make up the excess~|x| by stretching the glyphs
     by the factor |gw+x/gw| (represented as a |glue_ratio| value). }
      x:=x-adjust_excess(link(q),glue_fix(gw,gw+x,gw));
@z