rapier-markdown-kit 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +40 -0
- package/README.md +102 -0
- package/dist/agent/vendor/pretext/LICENSE +21 -0
- package/dist/agent/vendor/pretext/NOTICE +15 -0
- package/dist/agent/vendor/pretext/SOURCE.json +85 -0
- package/dist/agent/vendor/pretext/analysis.js +1234 -0
- package/dist/agent/vendor/pretext/bidi.js +151 -0
- package/dist/agent/vendor/pretext/generated/bidi-data.js +3831 -0
- package/dist/agent/vendor/pretext/layout.js +308 -0
- package/dist/agent/vendor/pretext/line-break.js +636 -0
- package/dist/agent/vendor/pretext/line-text.js +44 -0
- package/dist/agent/vendor/pretext/measurement.js +189 -0
- package/dist/agent/vendor/pretext/package.json +3 -0
- package/dist/agent/vendor/pretext/rich-inline.js +291 -0
- package/dist/agent/will.mjs +167 -0
- package/dist/kit/assets.mjs +3 -0
- package/dist/kit/conformance/01-inline.expected.json +82 -0
- package/dist/kit/conformance/01-inline.md +10 -0
- package/dist/kit/conformance/02-width-x-align.expected.json +83 -0
- package/dist/kit/conformance/02-width-x-align.md +12 -0
- package/dist/kit/conformance/03-wrap-around-silhouette.expected.json +177 -0
- package/dist/kit/conformance/03-wrap-around-silhouette.md +12 -0
- package/dist/kit/conformance/04-wrap-box.expected.json +173 -0
- package/dist/kit/conformance/04-wrap-box.md +12 -0
- package/dist/kit/conformance/05-behind.expected.json +122 -0
- package/dist/kit/conformance/05-behind.md +12 -0
- package/dist/kit/conformance/06-front.expected.json +122 -0
- package/dist/kit/conformance/06-front.md +12 -0
- package/dist/kit/conformance/07-rotate-raster.expected.json +179 -0
- package/dist/kit/conformance/07-rotate-raster.md +12 -0
- package/dist/kit/conformance/08-drawing-rotation.expected.json +188 -0
- package/dist/kit/conformance/08-drawing-rotation.md +12 -0
- package/dist/kit/conformance/09-drawing-ring-interior.expected.json +229 -0
- package/dist/kit/conformance/09-drawing-ring-interior.md +12 -0
- package/dist/kit/conformance/10-both-sides.expected.json +221 -0
- package/dist/kit/conformance/10-both-sides.md +10 -0
- package/dist/kit/conformance/11-neighbour-skips-image.expected.json +160 -0
- package/dist/kit/conformance/11-neighbour-skips-image.md +13 -0
- package/dist/kit/conformance/12-heading-barrier.expected.json +164 -0
- package/dist/kit/conformance/12-heading-barrier.md +12 -0
- package/dist/kit/conformance/13-rtl-text.expected.json +179 -0
- package/dist/kit/conformance/13-rtl-text.md +8 -0
- package/dist/kit/conformance/README.md +99 -0
- package/dist/kit/conformance/measurer.mjs +0 -0
- package/dist/kit/conformance/run.mjs +123 -0
- package/dist/kit/index.mjs +6 -0
- package/dist/kit/layout.mjs +2 -0
- package/dist/kit/marks.mjs +2 -0
- package/dist/kit/model.mjs +3 -0
- package/dist/kit/will.mjs +2 -0
- package/dist/layout/model.mjs +364 -0
- package/dist/spec/md-assets.mjs +323 -0
- package/dist/spec/md-layout.mjs +117 -0
- package/dist/spec/md-marks.mjs +78 -0
- package/package.json +33 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": "05-behind.md",
|
|
3
|
+
"measurer": {
|
|
4
|
+
"font": "normal 400 17.6px/30.8px Geist, system-ui, sans-serif",
|
|
5
|
+
"letterSpacing": 0,
|
|
6
|
+
"lineHeight": 30.8,
|
|
7
|
+
"direction": "ltr",
|
|
8
|
+
"columnWidth": 354
|
|
9
|
+
},
|
|
10
|
+
"anchorText": "This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.",
|
|
11
|
+
"anchorFlowed": false,
|
|
12
|
+
"picture": {
|
|
13
|
+
"natural": {
|
|
14
|
+
"width": 60,
|
|
15
|
+
"height": 40
|
|
16
|
+
},
|
|
17
|
+
"occupancy": null,
|
|
18
|
+
"layout": "<!--md-layout:v1 width=35% wrap=behind x=50%-->",
|
|
19
|
+
"rect": null
|
|
20
|
+
},
|
|
21
|
+
"profileHint": null,
|
|
22
|
+
"lines": [
|
|
23
|
+
{
|
|
24
|
+
"left": 0,
|
|
25
|
+
"top": 5,
|
|
26
|
+
"right": 336.25,
|
|
27
|
+
"bottom": 25
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"left": 0,
|
|
31
|
+
"top": 35.78,
|
|
32
|
+
"right": 298.31,
|
|
33
|
+
"bottom": 55.78
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"left": 0,
|
|
37
|
+
"top": 66.56,
|
|
38
|
+
"right": 341.73,
|
|
39
|
+
"bottom": 86.56
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"left": 0,
|
|
43
|
+
"top": 97.34,
|
|
44
|
+
"right": 344.92,
|
|
45
|
+
"bottom": 117.34
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"left": 0,
|
|
49
|
+
"top": 128.13,
|
|
50
|
+
"right": 296.13,
|
|
51
|
+
"bottom": 148.13
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"left": 0,
|
|
55
|
+
"top": 158.91,
|
|
56
|
+
"right": 312.89,
|
|
57
|
+
"bottom": 178.91
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"left": 0,
|
|
61
|
+
"top": 189.69,
|
|
62
|
+
"right": 38.34,
|
|
63
|
+
"bottom": 209.69
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"glyphWidths": {
|
|
67
|
+
"T": 10.747,
|
|
68
|
+
"h": 11.151,
|
|
69
|
+
"i": 4.888,
|
|
70
|
+
"s": 9.166,
|
|
71
|
+
" ": 5.593,
|
|
72
|
+
"a": 10.781,
|
|
73
|
+
"n": 11.151,
|
|
74
|
+
"c": 9.673,
|
|
75
|
+
"o": 10.764,
|
|
76
|
+
"r": 7.233,
|
|
77
|
+
"p": 11.168,
|
|
78
|
+
"g": 11.168,
|
|
79
|
+
"e": 10.824,
|
|
80
|
+
"u": 11.151,
|
|
81
|
+
"d": 11.168,
|
|
82
|
+
"y": 10.412,
|
|
83
|
+
"t": 6.898,
|
|
84
|
+
",": 5.593,
|
|
85
|
+
"w": 14.389,
|
|
86
|
+
"b": 11.168,
|
|
87
|
+
"l": 4.888,
|
|
88
|
+
"m": 17.138,
|
|
89
|
+
"f": 6.194,
|
|
90
|
+
"x": 10.412,
|
|
91
|
+
"v": 10.412,
|
|
92
|
+
".": 5.593
|
|
93
|
+
},
|
|
94
|
+
"measurements": {
|
|
95
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000T": 10.747,
|
|
96
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000h": 11.151,
|
|
97
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000i": 4.888,
|
|
98
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000s": 9.166,
|
|
99
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000 ": 5.593,
|
|
100
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000a": 10.781,
|
|
101
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000n": 11.151,
|
|
102
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000c": 9.673,
|
|
103
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000o": 10.764,
|
|
104
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000r": 7.233,
|
|
105
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000p": 11.168,
|
|
106
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000g": 11.168,
|
|
107
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000e": 10.824,
|
|
108
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000u": 11.151,
|
|
109
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000d": 11.168,
|
|
110
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000y": 10.412,
|
|
111
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000t": 6.898,
|
|
112
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000,": 5.593,
|
|
113
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000w": 14.389,
|
|
114
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000b": 11.168,
|
|
115
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000l": 4.888,
|
|
116
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000m": 17.138,
|
|
117
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000f": 6.194,
|
|
118
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000x": 10.412,
|
|
119
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000v": 10.412,
|
|
120
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000.": 5.593
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
# Behind
|
|
3
|
+
|
|
4
|
+
This paragraph comes before the picture and stays the anchor whenever the block right after the picture cannot be one -- another image paragraph, or a heading -- so the words below keep their own separate life.
|
|
5
|
+
|
|
6
|
+
![A behind picture][opaque] <!--md-layout:v1 width=35% wrap=behind x=50%-->
|
|
7
|
+
|
|
8
|
+
This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.
|
|
9
|
+
|
|
10
|
+
A second sentence of plain reading prose, long enough on its own that a narrow column wraps it into more than a single line, keeps this paragraph a fair test of the line planner rather than a trivial one-line case that proves very little indeed.
|
|
11
|
+
|
|
12
|
+
[opaque]: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAoCAYAAACiu5n/AAAAQ0lEQVR42u3PMQEAAAQAMHl0095PC48dC7DI6vkkhIWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFby0f7s8anCQmZQAAAABJRU5ErkJggg==
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": "06-front.md",
|
|
3
|
+
"measurer": {
|
|
4
|
+
"font": "normal 400 17.6px/30.8px Geist, system-ui, sans-serif",
|
|
5
|
+
"letterSpacing": 0,
|
|
6
|
+
"lineHeight": 30.8,
|
|
7
|
+
"direction": "ltr",
|
|
8
|
+
"columnWidth": 354
|
|
9
|
+
},
|
|
10
|
+
"anchorText": "This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.",
|
|
11
|
+
"anchorFlowed": false,
|
|
12
|
+
"picture": {
|
|
13
|
+
"natural": {
|
|
14
|
+
"width": 60,
|
|
15
|
+
"height": 40
|
|
16
|
+
},
|
|
17
|
+
"occupancy": null,
|
|
18
|
+
"layout": "<!--md-layout:v1 width=35% wrap=front x=50%-->",
|
|
19
|
+
"rect": null
|
|
20
|
+
},
|
|
21
|
+
"profileHint": null,
|
|
22
|
+
"lines": [
|
|
23
|
+
{
|
|
24
|
+
"left": 0,
|
|
25
|
+
"top": 5,
|
|
26
|
+
"right": 336.25,
|
|
27
|
+
"bottom": 25
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"left": 0,
|
|
31
|
+
"top": 35.78,
|
|
32
|
+
"right": 298.31,
|
|
33
|
+
"bottom": 55.78
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"left": 0,
|
|
37
|
+
"top": 66.56,
|
|
38
|
+
"right": 341.73,
|
|
39
|
+
"bottom": 86.56
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"left": 0,
|
|
43
|
+
"top": 97.34,
|
|
44
|
+
"right": 344.92,
|
|
45
|
+
"bottom": 117.34
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"left": 0,
|
|
49
|
+
"top": 128.13,
|
|
50
|
+
"right": 296.13,
|
|
51
|
+
"bottom": 148.13
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"left": 0,
|
|
55
|
+
"top": 158.91,
|
|
56
|
+
"right": 312.89,
|
|
57
|
+
"bottom": 178.91
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"left": 0,
|
|
61
|
+
"top": 189.69,
|
|
62
|
+
"right": 38.34,
|
|
63
|
+
"bottom": 209.69
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"glyphWidths": {
|
|
67
|
+
"T": 10.747,
|
|
68
|
+
"h": 11.151,
|
|
69
|
+
"i": 4.888,
|
|
70
|
+
"s": 9.166,
|
|
71
|
+
" ": 5.593,
|
|
72
|
+
"a": 10.781,
|
|
73
|
+
"n": 11.151,
|
|
74
|
+
"c": 9.673,
|
|
75
|
+
"o": 10.764,
|
|
76
|
+
"r": 7.233,
|
|
77
|
+
"p": 11.168,
|
|
78
|
+
"g": 11.168,
|
|
79
|
+
"e": 10.824,
|
|
80
|
+
"u": 11.151,
|
|
81
|
+
"d": 11.168,
|
|
82
|
+
"y": 10.412,
|
|
83
|
+
"t": 6.898,
|
|
84
|
+
",": 5.593,
|
|
85
|
+
"w": 14.389,
|
|
86
|
+
"b": 11.168,
|
|
87
|
+
"l": 4.888,
|
|
88
|
+
"m": 17.138,
|
|
89
|
+
"f": 6.194,
|
|
90
|
+
"x": 10.412,
|
|
91
|
+
"v": 10.412,
|
|
92
|
+
".": 5.593
|
|
93
|
+
},
|
|
94
|
+
"measurements": {
|
|
95
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000T": 10.747,
|
|
96
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000h": 11.151,
|
|
97
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000i": 4.888,
|
|
98
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000s": 9.166,
|
|
99
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000 ": 5.593,
|
|
100
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000a": 10.781,
|
|
101
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000n": 11.151,
|
|
102
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000c": 9.673,
|
|
103
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000o": 10.764,
|
|
104
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000r": 7.233,
|
|
105
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000p": 11.168,
|
|
106
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000g": 11.168,
|
|
107
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000e": 10.824,
|
|
108
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000u": 11.151,
|
|
109
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000d": 11.168,
|
|
110
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000y": 10.412,
|
|
111
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000t": 6.898,
|
|
112
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000,": 5.593,
|
|
113
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000w": 14.389,
|
|
114
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000b": 11.168,
|
|
115
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000l": 4.888,
|
|
116
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000m": 17.138,
|
|
117
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000f": 6.194,
|
|
118
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000x": 10.412,
|
|
119
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000v": 10.412,
|
|
120
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000.": 5.593
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
# Front
|
|
3
|
+
|
|
4
|
+
This paragraph comes before the picture and stays the anchor whenever the block right after the picture cannot be one -- another image paragraph, or a heading -- so the words below keep their own separate life.
|
|
5
|
+
|
|
6
|
+
![A front picture][opaque] <!--md-layout:v1 width=35% wrap=front x=50%-->
|
|
7
|
+
|
|
8
|
+
This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.
|
|
9
|
+
|
|
10
|
+
A second sentence of plain reading prose, long enough on its own that a narrow column wraps it into more than a single line, keeps this paragraph a fair test of the line planner rather than a trivial one-line case that proves very little indeed.
|
|
11
|
+
|
|
12
|
+
[opaque]: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAoCAYAAACiu5n/AAAAQ0lEQVR42u3PMQEAAAQAMHl0095PC48dC7DI6vkkhIWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFby0f7s8anCQmZQAAAABJRU5ErkJggg==
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": "07-rotate-raster.md",
|
|
3
|
+
"measurer": {
|
|
4
|
+
"font": "normal 400 17.6px/30.8px Geist, system-ui, sans-serif",
|
|
5
|
+
"letterSpacing": 0,
|
|
6
|
+
"lineHeight": 30.8,
|
|
7
|
+
"direction": "ltr",
|
|
8
|
+
"columnWidth": 354
|
|
9
|
+
},
|
|
10
|
+
"anchorText": "This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.",
|
|
11
|
+
"anchorFlowed": true,
|
|
12
|
+
"picture": {
|
|
13
|
+
"natural": {
|
|
14
|
+
"width": 60,
|
|
15
|
+
"height": 40
|
|
16
|
+
},
|
|
17
|
+
"occupancy": null,
|
|
18
|
+
"layout": "<!--md-layout:v1 width=35% wrap=box x=75% rotate=25deg-->",
|
|
19
|
+
"rect": {
|
|
20
|
+
"left": 191.89785766601562,
|
|
21
|
+
"top": -0.013153076171875,
|
|
22
|
+
"right": 339.0865173339844,
|
|
23
|
+
"bottom": 127.20065307617188
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"profileHint": {
|
|
27
|
+
"kind": "rasterTilt",
|
|
28
|
+
"width": 60,
|
|
29
|
+
"height": 40,
|
|
30
|
+
"radiusDeg": 25,
|
|
31
|
+
"note": "wrap=box + rotate on a plain raster with no drawing recipe: rasterTiltProfile"
|
|
32
|
+
},
|
|
33
|
+
"lines": [
|
|
34
|
+
{
|
|
35
|
+
"left": 0,
|
|
36
|
+
"top": 0,
|
|
37
|
+
"right": 197.02,
|
|
38
|
+
"bottom": 30.8
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"left": 0,
|
|
42
|
+
"top": 30.8,
|
|
43
|
+
"right": 182.19,
|
|
44
|
+
"bottom": 61.59
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"left": 0,
|
|
48
|
+
"top": 61.59,
|
|
49
|
+
"right": 182.19,
|
|
50
|
+
"bottom": 92.39
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"left": 0,
|
|
54
|
+
"top": 92.39,
|
|
55
|
+
"right": 197.55,
|
|
56
|
+
"bottom": 123.19
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"left": 0,
|
|
60
|
+
"top": 123.19,
|
|
61
|
+
"right": 260.08,
|
|
62
|
+
"bottom": 153.98
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"left": 0,
|
|
66
|
+
"top": 154,
|
|
67
|
+
"right": 354,
|
|
68
|
+
"bottom": 184.8
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"left": 0,
|
|
72
|
+
"top": 184.8,
|
|
73
|
+
"right": 354,
|
|
74
|
+
"bottom": 215.59
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"left": 0,
|
|
78
|
+
"top": 215.59,
|
|
79
|
+
"right": 354,
|
|
80
|
+
"bottom": 246.39
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"left": 0,
|
|
84
|
+
"top": 246.39,
|
|
85
|
+
"right": 354,
|
|
86
|
+
"bottom": 277.19
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"glyphWidths": {
|
|
90
|
+
"T": 10.747,
|
|
91
|
+
"h": 11.151,
|
|
92
|
+
"i": 4.888,
|
|
93
|
+
"s": 9.166,
|
|
94
|
+
" ": 5.593,
|
|
95
|
+
"a": 10.781,
|
|
96
|
+
"n": 11.151,
|
|
97
|
+
"c": 9.673,
|
|
98
|
+
"o": 10.764,
|
|
99
|
+
"r": 7.233,
|
|
100
|
+
"p": 11.168,
|
|
101
|
+
"g": 11.168,
|
|
102
|
+
"e": 10.824,
|
|
103
|
+
"u": 11.151,
|
|
104
|
+
"d": 11.168,
|
|
105
|
+
"y": 10.412,
|
|
106
|
+
"t": 6.898,
|
|
107
|
+
",": 5.593,
|
|
108
|
+
"w": 14.389,
|
|
109
|
+
"b": 11.168,
|
|
110
|
+
"l": 4.888,
|
|
111
|
+
"m": 17.138,
|
|
112
|
+
"f": 6.194,
|
|
113
|
+
"x": 10.412,
|
|
114
|
+
"v": 10.412,
|
|
115
|
+
".": 5.593
|
|
116
|
+
},
|
|
117
|
+
"measurements": {
|
|
118
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000-": 6.349,
|
|
119
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000 ": 5.593,
|
|
120
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000This": 35.952,
|
|
121
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000T": 10.747,
|
|
122
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000h": 11.151,
|
|
123
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000i": 4.888,
|
|
124
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000s": 9.166,
|
|
125
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000anchor": 60.753,
|
|
126
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000a": 10.781,
|
|
127
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000n": 11.151,
|
|
128
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000c": 9.673,
|
|
129
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000o": 10.764,
|
|
130
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000r": 7.233,
|
|
131
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000paragraph": 91.465,
|
|
132
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000p": 11.168,
|
|
133
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000g": 11.168,
|
|
134
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000carries": 59.49,
|
|
135
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000e": 10.824,
|
|
136
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000enough": 66.209,
|
|
137
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000u": 11.151,
|
|
138
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000ordinary": 73.322,
|
|
139
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000d": 11.168,
|
|
140
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000y": 10.412,
|
|
141
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000prose": 48.769,
|
|
142
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000that,": 41.321,
|
|
143
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000t": 6.898,
|
|
144
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000,": 5.593,
|
|
145
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000once": 42.412,
|
|
146
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000it": 11.786,
|
|
147
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000wraps": 52.738,
|
|
148
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000w": 14.389,
|
|
149
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000beside": 58.039,
|
|
150
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000b": 11.168,
|
|
151
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000the": 28.873,
|
|
152
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000picture": 61.449,
|
|
153
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000at": 17.68,
|
|
154
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000column": 64.765,
|
|
155
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000l": 4.888,
|
|
156
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000m": 17.138,
|
|
157
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000width": 48.494,
|
|
158
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000this": 32.103,
|
|
159
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000fixture": 57.214,
|
|
160
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000f": 6.194,
|
|
161
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000x": 10.412,
|
|
162
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000records,": 70.959,
|
|
163
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000produces": 80.761,
|
|
164
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000several": 64.13,
|
|
165
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000v": 10.412,
|
|
166
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000distinct": 64.731,
|
|
167
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000lines": 40.917,
|
|
168
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000for": 24.191,
|
|
169
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000conformance": 115.038,
|
|
170
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000runner": 58.743,
|
|
171
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000to": 17.662,
|
|
172
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000compare": 77.196,
|
|
173
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000rather": 54.121,
|
|
174
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000than": 39.981,
|
|
175
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000only": 37.215,
|
|
176
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000one.": 38.332,
|
|
177
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000.": 5.593
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
# Rotate a raster
|
|
3
|
+
|
|
4
|
+
This paragraph comes before the picture and stays the anchor whenever the block right after the picture cannot be one -- another image paragraph, or a heading -- so the words below keep their own separate life.
|
|
5
|
+
|
|
6
|
+
![A turned raster picture][opaque] <!--md-layout:v1 width=35% wrap=box x=75% rotate=25deg-->
|
|
7
|
+
|
|
8
|
+
This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.
|
|
9
|
+
|
|
10
|
+
A second sentence of plain reading prose, long enough on its own that a narrow column wraps it into more than a single line, keeps this paragraph a fair test of the line planner rather than a trivial one-line case that proves very little indeed.
|
|
11
|
+
|
|
12
|
+
[opaque]: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAoCAYAAACiu5n/AAAAQ0lEQVR42u3PMQEAAAQAMHl0095PC48dC7DI6vkkhIWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFby0f7s8anCQmZQAAAABJRU5ErkJggg==
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": "08-drawing-rotation.md",
|
|
3
|
+
"measurer": {
|
|
4
|
+
"font": "normal 400 17.6px/30.8px Geist, system-ui, sans-serif",
|
|
5
|
+
"letterSpacing": 0,
|
|
6
|
+
"lineHeight": 30.8,
|
|
7
|
+
"direction": "ltr",
|
|
8
|
+
"columnWidth": 354
|
|
9
|
+
},
|
|
10
|
+
"anchorText": "This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.",
|
|
11
|
+
"anchorFlowed": true,
|
|
12
|
+
"picture": {
|
|
13
|
+
"natural": {
|
|
14
|
+
"width": 140,
|
|
15
|
+
"height": 100
|
|
16
|
+
},
|
|
17
|
+
"occupancy": null,
|
|
18
|
+
"layout": "<!--md-layout:v1 width=35% wrap=around x=75%-->",
|
|
19
|
+
"rect": {
|
|
20
|
+
"left": 203.546875,
|
|
21
|
+
"top": 0,
|
|
22
|
+
"right": 327.4375,
|
|
23
|
+
"bottom": 88.5
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"profileHint": {
|
|
27
|
+
"kind": "polygon",
|
|
28
|
+
"corners": [
|
|
29
|
+
[
|
|
30
|
+
0.2132555130515568,
|
|
31
|
+
0.1410514041799839
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
0.8844645278986343,
|
|
35
|
+
0.4830715475056527
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
0.7867444869484432,
|
|
39
|
+
0.858948595820016
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
0.11553547210136575,
|
|
43
|
+
0.5169284524943474
|
|
44
|
+
]
|
|
45
|
+
],
|
|
46
|
+
"note": "rotated.svg is a foreign SVG (no Rapier drawing recipe), so a real reader falls back to its rendered alpha; its alpha IS this rotated rectangle, so the exact corners stand in for it"
|
|
47
|
+
},
|
|
48
|
+
"lines": [
|
|
49
|
+
{
|
|
50
|
+
"left": 0,
|
|
51
|
+
"top": 0,
|
|
52
|
+
"right": 206.45,
|
|
53
|
+
"bottom": 30.8
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"left": 0,
|
|
57
|
+
"top": 30.8,
|
|
58
|
+
"right": 206.45,
|
|
59
|
+
"bottom": 61.59
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"left": 0,
|
|
63
|
+
"top": 61.59,
|
|
64
|
+
"right": 219.36,
|
|
65
|
+
"bottom": 92.39
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"left": 0,
|
|
69
|
+
"top": 92.39,
|
|
70
|
+
"right": 354,
|
|
71
|
+
"bottom": 123.19
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"left": 0,
|
|
75
|
+
"top": 123.19,
|
|
76
|
+
"right": 354,
|
|
77
|
+
"bottom": 153.98
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"left": 0,
|
|
81
|
+
"top": 154,
|
|
82
|
+
"right": 354,
|
|
83
|
+
"bottom": 184.8
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"left": 0,
|
|
87
|
+
"top": 184.8,
|
|
88
|
+
"right": 354,
|
|
89
|
+
"bottom": 215.59
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"left": 0,
|
|
93
|
+
"top": 215.59,
|
|
94
|
+
"right": 354,
|
|
95
|
+
"bottom": 246.39
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"glyphWidths": {
|
|
99
|
+
"T": 10.747,
|
|
100
|
+
"h": 11.151,
|
|
101
|
+
"i": 4.888,
|
|
102
|
+
"s": 9.166,
|
|
103
|
+
" ": 5.593,
|
|
104
|
+
"a": 10.781,
|
|
105
|
+
"n": 11.151,
|
|
106
|
+
"c": 9.673,
|
|
107
|
+
"o": 10.764,
|
|
108
|
+
"r": 7.233,
|
|
109
|
+
"p": 11.168,
|
|
110
|
+
"g": 11.168,
|
|
111
|
+
"e": 10.824,
|
|
112
|
+
"u": 11.151,
|
|
113
|
+
"d": 11.168,
|
|
114
|
+
"y": 10.412,
|
|
115
|
+
"t": 6.898,
|
|
116
|
+
",": 5.593,
|
|
117
|
+
"w": 14.389,
|
|
118
|
+
"b": 11.168,
|
|
119
|
+
"l": 4.888,
|
|
120
|
+
"m": 17.138,
|
|
121
|
+
"f": 6.194,
|
|
122
|
+
"x": 10.412,
|
|
123
|
+
"v": 10.412,
|
|
124
|
+
".": 5.593
|
|
125
|
+
},
|
|
126
|
+
"measurements": {
|
|
127
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000-": 6.349,
|
|
128
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000 ": 5.593,
|
|
129
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000This": 35.952,
|
|
130
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000T": 10.747,
|
|
131
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000h": 11.151,
|
|
132
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000i": 4.888,
|
|
133
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000s": 9.166,
|
|
134
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000anchor": 60.753,
|
|
135
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000a": 10.781,
|
|
136
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000n": 11.151,
|
|
137
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000c": 9.673,
|
|
138
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000o": 10.764,
|
|
139
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000r": 7.233,
|
|
140
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000paragraph": 91.465,
|
|
141
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000p": 11.168,
|
|
142
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000g": 11.168,
|
|
143
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000carries": 59.49,
|
|
144
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000e": 10.824,
|
|
145
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000enough": 66.209,
|
|
146
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000u": 11.151,
|
|
147
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000ordinary": 73.322,
|
|
148
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000d": 11.168,
|
|
149
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000y": 10.412,
|
|
150
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000prose": 48.769,
|
|
151
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000that,": 41.321,
|
|
152
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000t": 6.898,
|
|
153
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000,": 5.593,
|
|
154
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000once": 42.412,
|
|
155
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000it": 11.786,
|
|
156
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000wraps": 52.738,
|
|
157
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000w": 14.389,
|
|
158
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000beside": 58.039,
|
|
159
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000b": 11.168,
|
|
160
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000the": 28.873,
|
|
161
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000picture": 61.449,
|
|
162
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000at": 17.68,
|
|
163
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000column": 64.765,
|
|
164
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000l": 4.888,
|
|
165
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000m": 17.138,
|
|
166
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000width": 48.494,
|
|
167
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000this": 32.103,
|
|
168
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000fixture": 57.214,
|
|
169
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000f": 6.194,
|
|
170
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000x": 10.412,
|
|
171
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000records,": 70.959,
|
|
172
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000produces": 80.761,
|
|
173
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000several": 64.13,
|
|
174
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000v": 10.412,
|
|
175
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000distinct": 64.731,
|
|
176
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000lines": 40.917,
|
|
177
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000for": 24.191,
|
|
178
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000conformance": 115.038,
|
|
179
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000runner": 58.743,
|
|
180
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000to": 17.662,
|
|
181
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000compare": 77.196,
|
|
182
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000rather": 54.121,
|
|
183
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000than": 39.981,
|
|
184
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000only": 37.215,
|
|
185
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000one.": 38.332,
|
|
186
|
+
"normal 400 17.6px Geist, system-ui, sans-serif\u0000.": 5.593
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
# A drawing with its own rotation
|
|
3
|
+
|
|
4
|
+
This paragraph comes before the picture and stays the anchor whenever the block right after the picture cannot be one -- another image paragraph, or a heading -- so the words below keep their own separate life.
|
|
5
|
+
|
|
6
|
+
![A drawing already turned in its own bytes][rotated] <!--md-layout:v1 width=35% wrap=around x=75%-->
|
|
7
|
+
|
|
8
|
+
This anchor paragraph carries enough ordinary prose that, once it wraps beside the picture at the column width this fixture records, it produces several distinct lines for the conformance runner to compare rather than only one.
|
|
9
|
+
|
|
10
|
+
A second sentence of plain reading prose, long enough on its own that a narrow column wraps it into more than a single line, keeps this paragraph a fair test of the line planner rather than a trivial one-line case that proves very little indeed.
|
|
11
|
+
|
|
12
|
+
[rotated]: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTQwIDEwMCI+PHJlY3QgeD0iMjAiIHk9IjMwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQwIiBmaWxsPSIjM2EzYTNhIiB0cmFuc2Zvcm09InJvdGF0ZSgyMCA3MCA1MCkiLz48L3N2Zz4K
|