Break points after a slash or a hyphen

A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.

JSON write_break_after.json 99 lines

This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 750.4,
        "urx": 480.0,
        "ury": 760.0
      },
      "content": [
        "Without break points: the paths run past the column's edge."
      ],
      "font": "DejaVuSans",
      "font_size": 8.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 650.0,
        "urx": 230.0,
        "ury": 740.0
      },
      "content": [
        "Send each request to /api/v2/organizations/documents/render, then read the read-only copy from /api/v2/organizations/documents/preview on the rate-limited tier."
      ],
      "font": "DejaVuSans",
      "font_size": 11.0,
      "align": "justify",
      "leading": 15.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 80.0,
        "lly": 650.0,
        "urx": 230.0,
        "ury": 740.0
      },
      "stroke": {
        "width": 0.5,
        "color": [
          0.8,
          0.8,
          0.8
        ]
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 590.4,
        "urx": 480.0,
        "ury": 600.0
      },
      "content": [
        "Breaking after slash and hyphen: the paths and compounds wrap."
      ],
      "font": "DejaVuSans",
      "font_size": 8.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 475.0,
        "urx": 230.0,
        "ury": 580.0
      },
      "content": [
        "Send each request to /api/v2/organizations/documents/render, then read the read-only copy from /api/v2/organizations/documents/preview on the rate-limited tier."
      ],
      "font": "DejaVuSans",
      "font_size": 11.0,
      "align": "justify",
      "leading": 15.0,
      "break_after": "/-"
    },
    {
      "type": "rect",
      "rect": {
        "llx": 80.0,
        "lly": 475.0,
        "urx": 230.0,
        "ury": 580.0
      },
      "stroke": {
        "width": 0.5,
        "color": [
          0.8,
          0.8,
          0.8
        ]
      }
    }
  ]
}