Prices crossed out, a shadow behind the title

A half-price shelf card: every line shows the old price with a line through it beside the new one, the sum of the three carries a rule over the top, and the title is set a second time behind itself, shifted and paler, so it reads over anything.

This page is the whole program, for whoever writes your software. There is nothing here to read otherwise. Go back to the document it writes.

JSON write_text_ornaments.json 294 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.

The rule under the line of wording below the title is where the two part company. The library draws it in three instructions with nothing round them; on the wire a rule is a thing of its own, which sets the drawing settings aside and puts them back afterwards, and which says what colour it is and how thickly it is drawn before walking from one end to the other. The same rule lands on the same dots either way.

  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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
{
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 672.0,
        "urx": 539.0,
        "ury": 800.0
      },
      "content": [
        "The half-price shelf"
      ],
      "font": "DejaVuSans",
      "font_size": 32.0,
      "shadow": {
        "dx": 1.5,
        "dy": -1.5,
        "color": [
          0.78,
          0.78,
          0.78
        ]
      }
    },
    {
      "type": "flow",
      "rect": {
        "llx": 56.0,
        "lly": 708.0,
        "urx": 539.0,
        "ury": 748.0
      },
      "content": "What a shop marks by hand, set by the engine instead.",
      "font": "DejaVuSans",
      "font_size": 10.5
    },
    {
      "type": "line",
      "from": {
        "x": 56.0,
        "y": 730.0
      },
      "to": {
        "x": 539.0,
        "y": 730.0
      },
      "stroke": {
        "width": 1.0
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 668.0,
        "urx": 539.0,
        "ury": 720.0
      },
      "content": [
        "Atlas of the northern coast"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 668.0,
        "urx": 539.0,
        "ury": 720.0
      },
      "content": [
        {
          "text": "24.00 EUR",
          "strikethrough": true
        },
        "   ",
        "12.00 EUR"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 642.0,
        "urx": 539.0,
        "ury": 694.0
      },
      "content": [
        "Field guide to the estuary birds"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 642.0,
        "urx": 539.0,
        "ury": 694.0
      },
      "content": [
        {
          "text": "18.00 EUR",
          "strikethrough": true
        },
        "   ",
        "9.00 EUR"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 616.0,
        "urx": 539.0,
        "ury": 668.0
      },
      "content": [
        "The lighthouse keepers, a history"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 616.0,
        "urx": 539.0,
        "ury": 668.0
      },
      "content": [
        {
          "text": "30.00 EUR",
          "strikethrough": true
        },
        "   ",
        "15.00 EUR"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 574.0,
        "urx": 539.0,
        "ury": 626.0
      },
      "content": [
        "The three together"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 574.0,
        "urx": 539.0,
        "ury": 626.0
      },
      "content": [
        {
          "text": "36.00 EUR",
          "overline": true
        }
      ],
      "font": "DejaVuSans",
      "font_size": 13.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 518.0,
        "urx": 539.0,
        "ury": 570.0
      },
      "content": [
        "The three marks, each set the way it names:"
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 494.0,
        "urx": 539.0,
        "ury": 546.0
      },
      "content": [
        {
          "text": "a rule under the words",
          "underline": true
        }
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 470.0,
        "urx": 539.0,
        "ury": 522.0
      },
      "content": [
        {
          "text": "a rule through the letters",
          "strikethrough": true
        }
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.0,
        "lly": 446.0,
        "urx": 539.0,
        "ury": 498.0
      },
      "content": [
        {
          "text": "a rule over the top",
          "overline": true
        }
      ],
      "font": "DejaVuSans",
      "font_size": 13.0
    },
    {
      "type": "flow",
      "rect": {
        "llx": 56.0,
        "lly": 350.0,
        "urx": 539.0,
        "ury": 470.0
      },
      "content": "No rule on this card was placed by hand. The one under the words and the one through the letters sit where the face itself says they go, and the one over the top rides the ascender the face states; all three follow the size the text is set in. The heading carries a copy of itself behind it, offset and paler, which is what keeps large lettering readable over a photograph. The mark laid across the foot carries one too, turned with it, so the copy falls the same way on the sheet as it does under the heading.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "align": "justify"
    },
    {
      "type": "stamp",
      "rect": {
        "llx": 56.0,
        "lly": 120.0,
        "urx": 539.0,
        "ury": 370.0
      },
      "content": "HALF PRICE",
      "font": "DejaVuSans",
      "slant": "up",
      "color": [
        0.72,
        0.16,
        0.16
      ],
      "shadow": {
        "dx": 2.5,
        "dy": -2.5,
        "color": [
          0.78,
          0.78,
          0.78
        ]
      }
    }
  ],
  "metadata": {
    "title": "The half-price shelf"
  }
}