thinreports 0.9.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/test.yml +39 -0
  3. data/.gitignore +1 -0
  4. data/CHANGELOG.md +59 -2
  5. data/Dockerfile +12 -0
  6. data/Gemfile +7 -4
  7. data/README.md +44 -22
  8. data/Rakefile +14 -31
  9. data/lib/thinreports.rb +16 -15
  10. data/lib/thinreports/config.rb +2 -24
  11. data/lib/thinreports/core/errors.rb +6 -17
  12. data/lib/thinreports/core/format/base.rb +62 -61
  13. data/lib/thinreports/core/shape.rb +10 -12
  14. data/lib/thinreports/core/shape/base.rb +3 -12
  15. data/lib/thinreports/core/shape/base/interface.rb +34 -32
  16. data/lib/thinreports/core/shape/base/internal.rb +45 -43
  17. data/lib/thinreports/core/shape/basic.rb +12 -12
  18. data/lib/thinreports/core/shape/basic/block_format.rb +8 -6
  19. data/lib/thinreports/core/shape/basic/block_interface.rb +24 -22
  20. data/lib/thinreports/core/shape/basic/block_internal.rb +28 -26
  21. data/lib/thinreports/core/shape/basic/format.rb +11 -9
  22. data/lib/thinreports/core/shape/basic/interface.rb +79 -77
  23. data/lib/thinreports/core/shape/basic/internal.rb +17 -14
  24. data/lib/thinreports/core/shape/image_block.rb +9 -9
  25. data/lib/thinreports/core/shape/image_block/format.rb +7 -5
  26. data/lib/thinreports/core/shape/image_block/interface.rb +15 -13
  27. data/lib/thinreports/core/shape/image_block/internal.rb +10 -8
  28. data/lib/thinreports/core/shape/list.rb +13 -13
  29. data/lib/thinreports/core/shape/list/format.rb +83 -77
  30. data/lib/thinreports/core/shape/list/manager.rb +179 -176
  31. data/lib/thinreports/core/shape/list/page.rb +91 -93
  32. data/lib/thinreports/core/shape/list/page_state.rb +42 -40
  33. data/lib/thinreports/core/shape/list/section_format.rb +28 -26
  34. data/lib/thinreports/core/shape/list/section_interface.rb +42 -40
  35. data/lib/thinreports/core/shape/list/section_internal.rb +21 -19
  36. data/lib/thinreports/core/shape/manager.rb +4 -13
  37. data/lib/thinreports/core/shape/manager/format.rb +21 -19
  38. data/lib/thinreports/core/shape/manager/internal.rb +87 -84
  39. data/lib/thinreports/core/shape/manager/target.rb +93 -95
  40. data/lib/thinreports/core/shape/page_number.rb +9 -9
  41. data/lib/thinreports/core/shape/page_number/format.rb +20 -18
  42. data/lib/thinreports/core/shape/page_number/interface.rb +20 -18
  43. data/lib/thinreports/core/shape/page_number/internal.rb +46 -44
  44. data/lib/thinreports/core/shape/style.rb +5 -14
  45. data/lib/thinreports/core/shape/style/base.rb +121 -120
  46. data/lib/thinreports/core/shape/style/basic.rb +12 -10
  47. data/lib/thinreports/core/shape/style/graphic.rb +35 -33
  48. data/lib/thinreports/core/shape/style/text.rb +113 -107
  49. data/lib/thinreports/core/shape/text.rb +9 -9
  50. data/lib/thinreports/core/shape/text/format.rb +10 -9
  51. data/lib/thinreports/core/shape/text/interface.rb +13 -11
  52. data/lib/thinreports/core/shape/text/internal.rb +14 -12
  53. data/lib/thinreports/core/shape/text_block.rb +10 -10
  54. data/lib/thinreports/core/shape/text_block/format.rb +35 -33
  55. data/lib/thinreports/core/shape/text_block/formatter.rb +26 -24
  56. data/lib/thinreports/core/shape/text_block/formatter/basic.rb +25 -25
  57. data/lib/thinreports/core/shape/text_block/formatter/datetime.rb +15 -12
  58. data/lib/thinreports/core/shape/text_block/formatter/number.rb +52 -34
  59. data/lib/thinreports/core/shape/text_block/formatter/padding.rb +17 -14
  60. data/lib/thinreports/core/shape/text_block/interface.rb +25 -23
  61. data/lib/thinreports/core/shape/text_block/internal.rb +66 -68
  62. data/lib/thinreports/core/utils.rb +7 -3
  63. data/lib/thinreports/generator/pdf.rb +24 -25
  64. data/lib/thinreports/generator/pdf/document.rb +109 -110
  65. data/lib/thinreports/generator/pdf/document/draw_shape.rb +57 -51
  66. data/lib/thinreports/generator/pdf/document/draw_template_items.rb +50 -47
  67. data/lib/thinreports/generator/pdf/document/font.rb +67 -58
  68. data/lib/thinreports/generator/pdf/document/graphics.rb +32 -33
  69. data/lib/thinreports/generator/pdf/document/graphics/attributes.rb +121 -121
  70. data/lib/thinreports/generator/pdf/document/graphics/basic.rb +112 -114
  71. data/lib/thinreports/generator/pdf/document/graphics/image.rb +58 -150
  72. data/lib/thinreports/generator/pdf/document/graphics/text.rb +149 -137
  73. data/lib/thinreports/generator/pdf/document/page.rb +60 -64
  74. data/lib/thinreports/generator/pdf/document/parse_color.rb +37 -37
  75. data/lib/thinreports/generator/pdf/drawer/base.rb +41 -41
  76. data/lib/thinreports/generator/pdf/drawer/list.rb +56 -54
  77. data/lib/thinreports/generator/pdf/drawer/list_section.rb +42 -40
  78. data/lib/thinreports/generator/pdf/drawer/page.rb +101 -96
  79. data/lib/thinreports/generator/pdf/prawn_ext.rb +4 -30
  80. data/lib/thinreports/generator/pdf/prawn_ext/calc_image_dimensions.rb +32 -0
  81. data/lib/thinreports/generator/pdf/prawn_ext/width_of.rb +35 -0
  82. data/lib/thinreports/layout.rb +5 -7
  83. data/lib/thinreports/layout/base.rb +5 -9
  84. data/lib/thinreports/layout/format.rb +17 -13
  85. data/lib/thinreports/layout/legacy_schema.rb +17 -13
  86. data/lib/thinreports/layout/version.rb +22 -25
  87. data/lib/thinreports/report.rb +4 -6
  88. data/lib/thinreports/report/base.rb +24 -51
  89. data/lib/thinreports/report/internal.rb +13 -15
  90. data/lib/thinreports/report/page.rb +5 -11
  91. data/lib/thinreports/version.rb +2 -2
  92. data/thinreports.gemspec +10 -19
  93. metadata +13 -288
  94. data/.travis.yml +0 -19
  95. data/examples/character_spacing/character_spacing.rb +0 -8
  96. data/examples/character_spacing/character_spacing.tlf +0 -293
  97. data/examples/dynamic_image/dynamic_image.rb +0 -31
  98. data/examples/dynamic_image/dynamic_image.tlf +0 -661
  99. data/examples/dynamic_image/img200x100.png +0 -0
  100. data/examples/dynamic_image/img50x50.png +0 -0
  101. data/examples/dynamic_style/dynamic_style.rb +0 -150
  102. data/examples/dynamic_style/dynamic_style.tlf +0 -1835
  103. data/examples/dynamic_style/dynamic_style_in_list.tlf +0 -344
  104. data/examples/dynamic_style/image.png +0 -0
  105. data/examples/eudc/eudc.rb +0 -20
  106. data/examples/eudc/eudc.tlf +0 -180
  107. data/examples/eudc/eudc.ttf +0 -0
  108. data/examples/helper.rb +0 -50
  109. data/examples/hidden_shapes/hidden_shapes.rb +0 -9
  110. data/examples/hidden_shapes/hidden_shapes.tlf +0 -449
  111. data/examples/list_events/list_events.rb +0 -32
  112. data/examples/list_events/list_events.tlf +0 -361
  113. data/examples/list_manual_generation/list_manual_generation.rb +0 -22
  114. data/examples/list_manual_generation/list_manual_generation.tlf +0 -132
  115. data/examples/list_page_number/list_page_number.rb +0 -17
  116. data/examples/list_page_number/list_page_number.tlf +0 -254
  117. data/examples/page_number/page_number.rb +0 -33
  118. data/examples/page_number/page_number.tlf +0 -215
  119. data/examples/palleted_png/palleted_png.png +0 -0
  120. data/examples/palleted_png/palleted_png.rb +0 -11
  121. data/examples/palleted_png/palleted_png.tlf +0 -47
  122. data/examples/password_setting/password_setting.rb +0 -10
  123. data/examples/password_setting/password_setting.tlf +0 -45
  124. data/examples/report_callbacks/report_callbacks.rb +0 -14
  125. data/examples/report_callbacks/report_callbacks.tlf +0 -147
  126. data/examples/single_line_tblock/single_line_tblock.rb +0 -13
  127. data/examples/single_line_tblock/single_line_tblock.tlf +0 -170
  128. data/examples/tblock_overflow/tblock_overflow.rb +0 -20
  129. data/examples/tblock_overflow/tblock_overflow.tlf +0 -538
  130. data/examples/tblock_styles/font_size.tlf +0 -383
  131. data/examples/tblock_styles/tblock_styles.rb +0 -43
  132. data/examples/tblock_styles/tblock_styles.tlf +0 -889
  133. data/examples/text_align/text_align.rb +0 -8
  134. data/examples/text_align/text_align.tlf +0 -241
  135. data/examples/typeB_page_size/B4_ISO.tlf +0 -45
  136. data/examples/typeB_page_size/B4_JIS.tlf +0 -45
  137. data/examples/typeB_page_size/typeB_page_size.rb +0 -17
  138. data/examples/word_wrap/word_wrap.rb +0 -26
  139. data/examples/word_wrap/word_wrap.tlf +0 -297
  140. data/lib/thinreports/generator.rb +0 -29
  141. data/lib/thinreports/generator/base.rb +0 -40
  142. data/lib/thinreports/generator/configuration.rb +0 -31
  143. data/lib/thinreports/report/events.rb +0 -32
  144. data/test/data/font.ttf +0 -0
  145. data/test/data/image_normal.jpg +0 -0
  146. data/test/data/image_normal.png +0 -0
  147. data/test/data/image_normal_jpg_noext +0 -0
  148. data/test/data/image_normal_png_noext +0 -0
  149. data/test/data/image_pallete_based.png +0 -0
  150. data/test/data/legacy_layout/all-items.tlf +0 -1
  151. data/test/schema_helper.rb +0 -121
  152. data/test/test_helper.rb +0 -42
  153. data/test/tmp/.gitkeep +0 -0
  154. data/test/unit/core/format/test_base.rb +0 -152
  155. data/test/unit/core/shape/base/test_internal.rb +0 -87
  156. data/test/unit/core/shape/basic/test_block_format.rb +0 -23
  157. data/test/unit/core/shape/basic/test_block_interface.rb +0 -29
  158. data/test/unit/core/shape/basic/test_block_internal.rb +0 -55
  159. data/test/unit/core/shape/basic/test_format.rb +0 -37
  160. data/test/unit/core/shape/basic/test_interface.rb +0 -108
  161. data/test/unit/core/shape/basic/test_internal.rb +0 -55
  162. data/test/unit/core/shape/image_block/test_interface.rb +0 -24
  163. data/test/unit/core/shape/image_block/test_internal.rb +0 -31
  164. data/test/unit/core/shape/list/test_format.rb +0 -111
  165. data/test/unit/core/shape/list/test_manager.rb +0 -67
  166. data/test/unit/core/shape/list/test_page.rb +0 -82
  167. data/test/unit/core/shape/list/test_page_state.rb +0 -31
  168. data/test/unit/core/shape/list/test_section_format.rb +0 -36
  169. data/test/unit/core/shape/list/test_section_interface.rb +0 -75
  170. data/test/unit/core/shape/list/test_section_internal.rb +0 -50
  171. data/test/unit/core/shape/manager/test_format.rb +0 -38
  172. data/test/unit/core/shape/manager/test_internal.rb +0 -132
  173. data/test/unit/core/shape/manager/test_target.rb +0 -140
  174. data/test/unit/core/shape/page_number/test_format.rb +0 -55
  175. data/test/unit/core/shape/page_number/test_interface.rb +0 -33
  176. data/test/unit/core/shape/page_number/test_internal.rb +0 -81
  177. data/test/unit/core/shape/styles/test_base.rb +0 -191
  178. data/test/unit/core/shape/styles/test_basic.rb +0 -24
  179. data/test/unit/core/shape/styles/test_graphic.rb +0 -50
  180. data/test/unit/core/shape/styles/test_text.rb +0 -97
  181. data/test/unit/core/shape/text/test_format.rb +0 -44
  182. data/test/unit/core/shape/text/test_internal.rb +0 -20
  183. data/test/unit/core/shape/text_block/formatter/test_basic.rb +0 -24
  184. data/test/unit/core/shape/text_block/formatter/test_datetime.rb +0 -49
  185. data/test/unit/core/shape/text_block/formatter/test_number.rb +0 -76
  186. data/test/unit/core/shape/text_block/formatter/test_padding.rb +0 -77
  187. data/test/unit/core/shape/text_block/test_format.rb +0 -169
  188. data/test/unit/core/shape/text_block/test_formatter.rb +0 -28
  189. data/test/unit/core/shape/text_block/test_interface.rb +0 -63
  190. data/test/unit/core/shape/text_block/test_internal.rb +0 -128
  191. data/test/unit/core/test_shape.rb +0 -52
  192. data/test/unit/core/test_utils.rb +0 -68
  193. data/test/unit/generator/pdf/document/graphics/test_attributes.rb +0 -135
  194. data/test/unit/generator/pdf/document/graphics/test_basic.rb +0 -45
  195. data/test/unit/generator/pdf/document/graphics/test_image.rb +0 -150
  196. data/test/unit/generator/pdf/document/graphics/test_text.rb +0 -171
  197. data/test/unit/generator/pdf/document/test_font.rb +0 -84
  198. data/test/unit/generator/pdf/document/test_graphics.rb +0 -42
  199. data/test/unit/generator/pdf/document/test_page.rb +0 -122
  200. data/test/unit/generator/pdf/document/test_parse_color.rb +0 -30
  201. data/test/unit/generator/pdf/test_document.rb +0 -20
  202. data/test/unit/generator/test_base.rb +0 -40
  203. data/test/unit/generator/test_configuration.rb +0 -21
  204. data/test/unit/generator/test_pdf.rb +0 -24
  205. data/test/unit/layout/test_base.rb +0 -41
  206. data/test/unit/layout/test_format.rb +0 -100
  207. data/test/unit/layout/test_legacy_schema.rb +0 -574
  208. data/test/unit/layout/test_version.rb +0 -95
  209. data/test/unit/report/test_base.rb +0 -262
  210. data/test/unit/report/test_internal.rb +0 -206
  211. data/test/unit/test_config.rb +0 -51
  212. data/test/unit/test_layout.rb +0 -12
  213. data/test/unit/test_report.rb +0 -18
@@ -1,383 +0,0 @@
1
- {
2
- "version": "0.9.0",
3
- "items": [
4
- {
5
- "id": "",
6
- "type": "text",
7
- "display": true,
8
- "description": "",
9
- "x": 40,
10
- "y": 60,
11
- "width": 151.8,
12
- "height": 46,
13
- "style": {
14
- "font-family": [
15
- "Helvetica"
16
- ],
17
- "font-size": 18,
18
- "color": "#000000",
19
- "text-align": "left",
20
- "vertical-align": "top",
21
- "line-height": "",
22
- "line-height-ratio": "",
23
- "letter-spacing": "",
24
- "font-style": []
25
- },
26
- "texts": [
27
- "サイズ18"
28
- ]
29
- },
30
- {
31
- "id": "text_single24",
32
- "type": "text",
33
- "display": true,
34
- "description": "",
35
- "x": 165,
36
- "y": 60,
37
- "width": 151.8,
38
- "height": 46,
39
- "style": {
40
- "font-family": [
41
- "Helvetica"
42
- ],
43
- "font-size": 18,
44
- "color": "#000000",
45
- "text-align": "left",
46
- "vertical-align": "top",
47
- "line-height": "",
48
- "line-height-ratio": "",
49
- "letter-spacing": "",
50
- "font-style": []
51
- },
52
- "texts": [
53
- "サイズ24"
54
- ]
55
- },
56
- {
57
- "id": "text_single32",
58
- "type": "text",
59
- "display": true,
60
- "description": "",
61
- "x": 345,
62
- "y": 60,
63
- "width": 151.8,
64
- "height": 46,
65
- "style": {
66
- "font-family": [
67
- "Helvetica"
68
- ],
69
- "font-size": 18,
70
- "color": "#000000",
71
- "text-align": "left",
72
- "vertical-align": "top",
73
- "line-height": "",
74
- "line-height-ratio": "",
75
- "letter-spacing": "",
76
- "font-style": []
77
- },
78
- "texts": [
79
- "サイズ32"
80
- ]
81
- },
82
- {
83
- "id": "",
84
- "type": "text",
85
- "display": true,
86
- "description": "",
87
- "x": 35,
88
- "y": 179.8,
89
- "width": 200,
90
- "height": 100,
91
- "style": {
92
- "font-family": [
93
- "Helvetica"
94
- ],
95
- "font-size": 18,
96
- "color": "#000000",
97
- "text-align": "left",
98
- "vertical-align": "top",
99
- "line-height": "",
100
- "line-height-ratio": "",
101
- "letter-spacing": "",
102
- "font-style": []
103
- },
104
- "texts": [
105
- "サイズ18",
106
- "サイズ18"
107
- ]
108
- },
109
- {
110
- "id": "text_multiple24",
111
- "type": "text",
112
- "display": true,
113
- "description": "",
114
- "x": 165,
115
- "y": 179.8,
116
- "width": 200,
117
- "height": 100,
118
- "style": {
119
- "font-family": [
120
- "Helvetica"
121
- ],
122
- "font-size": 18,
123
- "color": "#000000",
124
- "text-align": "left",
125
- "vertical-align": "top",
126
- "line-height": "",
127
- "line-height-ratio": "",
128
- "letter-spacing": "",
129
- "font-style": []
130
- },
131
- "texts": [
132
- "サイズ24",
133
- "サイズ24"
134
- ]
135
- },
136
- {
137
- "id": "text_multiple32",
138
- "type": "text",
139
- "display": true,
140
- "description": "",
141
- "x": 345,
142
- "y": 179.8,
143
- "width": 200,
144
- "height": 100,
145
- "style": {
146
- "font-family": [
147
- "Helvetica"
148
- ],
149
- "font-size": 18,
150
- "color": "#000000",
151
- "text-align": "left",
152
- "vertical-align": "top",
153
- "line-height": "",
154
- "line-height-ratio": "",
155
- "letter-spacing": "",
156
- "font-style": []
157
- },
158
- "texts": [
159
- "サイズ32",
160
- "サイズ32"
161
- ]
162
- },
163
- {
164
- "id": "block_single18",
165
- "type": "text-block",
166
- "display": true,
167
- "description": "",
168
- "x": 40,
169
- "y": 320.6,
170
- "width": 103.4,
171
- "height": 17,
172
- "style": {
173
- "font-family": [
174
- "Helvetica"
175
- ],
176
- "font-size": 18,
177
- "color": "#000000",
178
- "text-align": "left",
179
- "vertical-align": "top",
180
- "line-height": "",
181
- "line-height-ratio": "",
182
- "letter-spacing": "",
183
- "font-style": [],
184
- "overflow": "truncate",
185
- "word-wrap": "break-word"
186
- },
187
- "reference-id": "",
188
- "value": "",
189
- "multiple-line": false,
190
- "format": {
191
- "base": "",
192
- "type": ""
193
- }
194
- },
195
- {
196
- "id": "block_single24",
197
- "type": "text-block",
198
- "display": true,
199
- "description": "",
200
- "x": 165,
201
- "y": 320.6,
202
- "width": 157.2,
203
- "height": 17,
204
- "style": {
205
- "font-family": [
206
- "Helvetica"
207
- ],
208
- "font-size": 18,
209
- "color": "#000000",
210
- "text-align": "left",
211
- "vertical-align": "top",
212
- "line-height": "",
213
- "line-height-ratio": "",
214
- "letter-spacing": "",
215
- "font-style": [],
216
- "overflow": "truncate",
217
- "word-wrap": "none"
218
- },
219
- "reference-id": "",
220
- "value": "",
221
- "multiple-line": false,
222
- "format": {
223
- "base": "",
224
- "type": ""
225
- }
226
- },
227
- {
228
- "id": "block_single32",
229
- "type": "text-block",
230
- "display": true,
231
- "description": "",
232
- "x": 345,
233
- "y": 320.6,
234
- "width": 230.2,
235
- "height": 17,
236
- "style": {
237
- "font-family": [
238
- "Helvetica"
239
- ],
240
- "font-size": 18,
241
- "color": "#000000",
242
- "text-align": "left",
243
- "vertical-align": "top",
244
- "line-height": "",
245
- "line-height-ratio": "",
246
- "letter-spacing": "",
247
- "font-style": [],
248
- "overflow": "truncate",
249
- "word-wrap": "none"
250
- },
251
- "reference-id": "",
252
- "value": "",
253
- "multiple-line": false,
254
- "format": {
255
- "base": "",
256
- "type": ""
257
- }
258
- },
259
- {
260
- "id": "block_multiple18",
261
- "type": "text-block",
262
- "display": true,
263
- "description": "",
264
- "x": 40,
265
- "y": 390,
266
- "width": 103.4,
267
- "height": 113.3,
268
- "style": {
269
- "font-family": [
270
- "Helvetica"
271
- ],
272
- "font-size": 18,
273
- "color": "#000000",
274
- "text-align": "left",
275
- "vertical-align": "top",
276
- "line-height": "",
277
- "line-height-ratio": "",
278
- "letter-spacing": "",
279
- "font-style": [],
280
- "overflow": "truncate",
281
- "word-wrap": "none"
282
- },
283
- "reference-id": "",
284
- "value": "",
285
- "multiple-line": true,
286
- "format": {
287
- "base": "",
288
- "type": ""
289
- }
290
- },
291
- {
292
- "id": "block_multiple24",
293
- "type": "text-block",
294
- "display": true,
295
- "description": "",
296
- "x": 165,
297
- "y": 390,
298
- "width": 157.2,
299
- "height": 113.3,
300
- "style": {
301
- "font-family": [
302
- "Helvetica"
303
- ],
304
- "font-size": 18,
305
- "color": "#000000",
306
- "text-align": "left",
307
- "vertical-align": "top",
308
- "line-height": "",
309
- "line-height-ratio": "",
310
- "letter-spacing": "",
311
- "font-style": [],
312
- "overflow": "truncate",
313
- "word-wrap": "none"
314
- },
315
- "reference-id": "",
316
- "value": "",
317
- "multiple-line": true,
318
- "format": {
319
- "base": "",
320
- "type": ""
321
- }
322
- },
323
- {
324
- "id": "block_multiple32",
325
- "type": "text-block",
326
- "display": true,
327
- "description": "",
328
- "x": 345,
329
- "y": 390,
330
- "width": 230.2,
331
- "height": 113.3,
332
- "style": {
333
- "font-family": [
334
- "Helvetica"
335
- ],
336
- "font-size": 18,
337
- "color": "#000000",
338
- "text-align": "left",
339
- "vertical-align": "top",
340
- "line-height": "",
341
- "line-height-ratio": "",
342
- "letter-spacing": "",
343
- "font-style": [],
344
- "overflow": "truncate",
345
- "word-wrap": "none"
346
- },
347
- "reference-id": "",
348
- "value": "",
349
- "multiple-line": true,
350
- "format": {
351
- "base": "",
352
- "type": ""
353
- }
354
- }
355
- ],
356
- "state": {
357
- "layout-guides": [
358
- {
359
- "type": "x",
360
- "position": 164.4
361
- },
362
- {
363
- "type": "x",
364
- "position": 344.1
365
- },
366
- {
367
- "type": "y",
368
- "position": 503.3
369
- }
370
- ]
371
- },
372
- "title": "FontSize",
373
- "report": {
374
- "paper-type": "A4",
375
- "orientation": "portrait",
376
- "margin": [
377
- 20,
378
- 20,
379
- 20,
380
- 20
381
- ]
382
- }
383
- }
@@ -1,43 +0,0 @@
1
- # coding: utf-8
2
-
3
- example :tblock_styles, 'Set the styles of Tblock in the Editor' do |t|
4
- Thinreports::Report.generate filename: t.output_filename do |report|
5
- report.use_layout t.layout_filename
6
-
7
- report.start_new_page do |page|
8
- page.item(:space_single_helvetica).value('Char Space in Single(Helvetica)')
9
- page.item(:space_single_ipamincho).value = '文字間隔 in 単行(IPA明朝)'
10
-
11
- page[:space_multi_times] = "Char Space\nin Multiple(Times New Roman)"
12
- page.item(:space_multi_ipamincho).value("文字間隔\nin 複数行(IPA明朝)")
13
-
14
- page.values(left_top: '左上揃え',
15
- left_center: '左中央揃え',
16
- left_bottom: '左下揃え',
17
- center_top: '中央上揃え',
18
- center_center: '中央揃え',
19
- center_bottom: '中央下揃え',
20
- right_top: '右上揃え',
21
- right_center: '右中央揃え',
22
- right_bottom: '右下揃え')
23
-
24
- page.item(:line_height).value("行間隔2.0\n日本語\nThinreports")
25
- end
26
-
27
- report.start_new_page layout: t.resource('font_size.tlf') do |page|
28
- page[:text_single24].style(:font_size, 24)
29
- page[:text_single32].style(:font_size, 32)
30
-
31
- page.item(:text_multiple24).style(:font_size, 24)
32
- page.item(:text_multiple32).style(:font_size, 32)
33
-
34
- page.item(:block_single18).value('サイズ18')
35
- page.item(:block_single24).style(:font_size, 24).value('サイズ24')
36
- page.item(:block_single32).style(:font_size, 32).value('サイズ32')
37
-
38
- page.item(:block_multiple18).value("サイズ18\nサイズ18")
39
- page.item(:block_multiple24).style(:font_size, 24).value("サイズ24\nサイズ24")
40
- page.item(:block_multiple32).style(:font_size, 32).value("サイズ32\nサイズ32")
41
- end
42
- end
43
- end
@@ -1,889 +0,0 @@
1
- {
2
- "version": "0.9.0",
3
- "items": [
4
- {
5
- "id": "",
6
- "type": "text",
7
- "display": true,
8
- "description": "",
9
- "x": 20,
10
- "y": 21,
11
- "width": 555.2,
12
- "height": 20.5,
13
- "style": {
14
- "font-family": [
15
- "Helvetica"
16
- ],
17
- "font-size": 18,
18
- "color": "#000000",
19
- "text-align": "left",
20
- "vertical-align": "top",
21
- "line-height": "",
22
- "line-height-ratio": "",
23
- "letter-spacing": 5,
24
- "font-style": []
25
- },
26
- "texts": [
27
- "Char Space in Single(Helvetica)"
28
- ]
29
- },
30
- {
31
- "id": "space_single_helvetica",
32
- "type": "text-block",
33
- "display": true,
34
- "description": "",
35
- "x": 20,
36
- "y": 50,
37
- "width": 555.2,
38
- "height": 18,
39
- "style": {
40
- "font-family": [
41
- "Helvetica"
42
- ],
43
- "font-size": 18,
44
- "color": "#000000",
45
- "text-align": "left",
46
- "vertical-align": "top",
47
- "line-height": "",
48
- "line-height-ratio": "",
49
- "letter-spacing": 5,
50
- "font-style": [],
51
- "overflow": "truncate",
52
- "word-wrap": "break-word"
53
- },
54
- "reference-id": "",
55
- "value": "",
56
- "multiple-line": false,
57
- "format": {
58
- "base": "",
59
- "type": ""
60
- }
61
- },
62
- {
63
- "id": "",
64
- "type": "line",
65
- "display": true,
66
- "description": "",
67
- "style": {
68
- "border-color": "#ff0000",
69
- "border-width": 1,
70
- "border-style": "solid"
71
- },
72
- "x1": 426,
73
- "y1": 20,
74
- "x2": 426,
75
- "y2": 78
76
- },
77
- {
78
- "id": "",
79
- "type": "text",
80
- "display": true,
81
- "description": "",
82
- "x": 20,
83
- "y": 83,
84
- "width": 323,
85
- "height": 18,
86
- "style": {
87
- "font-family": [
88
- "IPAMincho"
89
- ],
90
- "font-size": 18,
91
- "color": "#000000",
92
- "text-align": "left",
93
- "vertical-align": "top",
94
- "line-height": "",
95
- "line-height-ratio": "",
96
- "letter-spacing": 5,
97
- "font-style": []
98
- },
99
- "texts": [
100
- "文字間隔 in 単行(IPA明朝)"
101
- ]
102
- },
103
- {
104
- "id": "space_single_ipamincho",
105
- "type": "text-block",
106
- "display": true,
107
- "description": "",
108
- "x": 20,
109
- "y": 110,
110
- "width": 555.2,
111
- "height": 18,
112
- "style": {
113
- "font-family": [
114
- "IPAMincho"
115
- ],
116
- "font-size": 18,
117
- "color": "#000000",
118
- "text-align": "left",
119
- "vertical-align": "top",
120
- "line-height": "",
121
- "line-height-ratio": "",
122
- "letter-spacing": 5,
123
- "font-style": [],
124
- "overflow": "truncate",
125
- "word-wrap": "break-word"
126
- },
127
- "reference-id": "",
128
- "value": "",
129
- "multiple-line": false,
130
- "format": {
131
- "base": "",
132
- "type": ""
133
- }
134
- },
135
- {
136
- "id": "",
137
- "type": "line",
138
- "display": true,
139
- "description": "",
140
- "style": {
141
- "border-color": "#ff0000",
142
- "border-width": 1,
143
- "border-style": "solid"
144
- },
145
- "x1": 333,
146
- "y1": 80,
147
- "x2": 333,
148
- "y2": 138
149
- },
150
- {
151
- "id": "",
152
- "type": "text",
153
- "display": true,
154
- "description": "",
155
- "x": 20,
156
- "y": 148,
157
- "width": 555.2,
158
- "height": 38,
159
- "style": {
160
- "font-family": [
161
- "Times New Roman"
162
- ],
163
- "font-size": 18,
164
- "color": "#000000",
165
- "text-align": "left",
166
- "vertical-align": "top",
167
- "line-height": "",
168
- "line-height-ratio": "",
169
- "letter-spacing": 5,
170
- "font-style": []
171
- },
172
- "texts": [
173
- "Char Space",
174
- "in Multiple(Times New Roman)"
175
- ]
176
- },
177
- {
178
- "id": "space_multi_times",
179
- "type": "text-block",
180
- "display": true,
181
- "description": "",
182
- "x": 20,
183
- "y": 199.9,
184
- "width": 555.2,
185
- "height": 51.2,
186
- "style": {
187
- "font-family": [
188
- "Times New Roman"
189
- ],
190
- "font-size": 18,
191
- "color": "#000000",
192
- "text-align": "left",
193
- "vertical-align": "top",
194
- "line-height": "",
195
- "line-height-ratio": "",
196
- "letter-spacing": 5,
197
- "font-style": [],
198
- "overflow": "truncate",
199
- "word-wrap": "break-word"
200
- },
201
- "reference-id": "",
202
- "value": "",
203
- "multiple-line": true,
204
- "format": {
205
- "base": "",
206
- "type": ""
207
- }
208
- },
209
- {
210
- "id": "",
211
- "type": "line",
212
- "display": true,
213
- "description": "",
214
- "style": {
215
- "border-color": "#ff0000",
216
- "border-width": 1,
217
- "border-style": "solid"
218
- },
219
- "x1": 386,
220
- "y1": 165,
221
- "x2": 386,
222
- "y2": 251.1
223
- },
224
- {
225
- "id": "",
226
- "type": "line",
227
- "display": true,
228
- "description": "",
229
- "style": {
230
- "border-color": "#ff0000",
231
- "border-width": 1,
232
- "border-style": "solid"
233
- },
234
- "x1": 149,
235
- "y1": 148,
236
- "x2": 149,
237
- "y2": 234.1
238
- },
239
- {
240
- "id": "",
241
- "type": "text",
242
- "display": true,
243
- "description": "",
244
- "x": 20,
245
- "y": 275,
246
- "width": 323,
247
- "height": 36,
248
- "style": {
249
- "font-family": [
250
- "IPAMincho"
251
- ],
252
- "font-size": 18,
253
- "color": "#000000",
254
- "text-align": "left",
255
- "vertical-align": "top",
256
- "line-height": "",
257
- "line-height-ratio": "",
258
- "letter-spacing": 5,
259
- "font-style": []
260
- },
261
- "texts": [
262
- "文字間隔",
263
- "in 複数行(IPA明朝)"
264
- ]
265
- },
266
- {
267
- "id": "space_multi_ipamincho",
268
- "type": "text-block",
269
- "display": true,
270
- "description": "",
271
- "x": 20,
272
- "y": 324,
273
- "width": 555.2,
274
- "height": 52.1,
275
- "style": {
276
- "font-family": [
277
- "IPAMincho"
278
- ],
279
- "font-size": 18,
280
- "color": "#000000",
281
- "text-align": "left",
282
- "vertical-align": "top",
283
- "line-height": "",
284
- "line-height-ratio": "",
285
- "letter-spacing": 5,
286
- "font-style": [],
287
- "overflow": "truncate",
288
- "word-wrap": "break-word"
289
- },
290
- "reference-id": "",
291
- "value": "",
292
- "multiple-line": true,
293
- "format": {
294
- "base": "",
295
- "type": ""
296
- }
297
- },
298
- {
299
- "id": "",
300
- "type": "line",
301
- "display": true,
302
- "description": "",
303
- "style": {
304
- "border-color": "#ff0000",
305
- "border-width": 1,
306
- "border-style": "solid"
307
- },
308
- "x1": 249,
309
- "y1": 292,
310
- "x2": 249,
311
- "y2": 378.1
312
- },
313
- {
314
- "id": "",
315
- "type": "line",
316
- "display": true,
317
- "description": "",
318
- "style": {
319
- "border-color": "#ff0000",
320
- "border-width": 1,
321
- "border-style": "solid"
322
- },
323
- "x1": 107,
324
- "y1": 273,
325
- "x2": 107,
326
- "y2": 359.1
327
- },
328
- {
329
- "id": "left_top",
330
- "type": "text-block",
331
- "display": true,
332
- "description": "",
333
- "x": 20,
334
- "y": 406.1,
335
- "width": 165.1,
336
- "height": 69.1,
337
- "style": {
338
- "font-family": [
339
- "IPAGothic"
340
- ],
341
- "font-size": 18,
342
- "color": "#000000",
343
- "text-align": "left",
344
- "vertical-align": "top",
345
- "line-height": "",
346
- "line-height-ratio": "",
347
- "letter-spacing": "",
348
- "font-style": [],
349
- "overflow": "truncate",
350
- "word-wrap": "break-word"
351
- },
352
- "reference-id": "",
353
- "value": "",
354
- "multiple-line": true,
355
- "format": {
356
- "base": "",
357
- "type": ""
358
- }
359
- },
360
- {
361
- "id": "left_center",
362
- "type": "text-block",
363
- "display": true,
364
- "description": "",
365
- "x": 215.1,
366
- "y": 406.1,
367
- "width": 165.1,
368
- "height": 69.1,
369
- "style": {
370
- "font-family": [
371
- "IPAGothic"
372
- ],
373
- "font-size": 18,
374
- "color": "#000000",
375
- "text-align": "left",
376
- "vertical-align": "middle",
377
- "line-height": "",
378
- "line-height-ratio": "",
379
- "letter-spacing": "",
380
- "font-style": [],
381
- "overflow": "truncate",
382
- "word-wrap": "break-word"
383
- },
384
- "reference-id": "",
385
- "value": "",
386
- "multiple-line": true,
387
- "format": {
388
- "base": "",
389
- "type": ""
390
- }
391
- },
392
- {
393
- "id": "left_bottom",
394
- "type": "text-block",
395
- "display": true,
396
- "description": "",
397
- "x": 410,
398
- "y": 406.1,
399
- "width": 165.1,
400
- "height": 69.1,
401
- "style": {
402
- "font-family": [
403
- "IPAGothic"
404
- ],
405
- "font-size": 18,
406
- "color": "#000000",
407
- "text-align": "left",
408
- "vertical-align": "bottom",
409
- "line-height": "",
410
- "line-height-ratio": "",
411
- "letter-spacing": "",
412
- "font-style": [],
413
- "overflow": "truncate",
414
- "word-wrap": "break-word"
415
- },
416
- "reference-id": "",
417
- "value": "",
418
- "multiple-line": true,
419
- "format": {
420
- "base": "",
421
- "type": ""
422
- }
423
- },
424
- {
425
- "id": "",
426
- "type": "rect",
427
- "display": true,
428
- "description": "",
429
- "x": 20,
430
- "y": 406.1,
431
- "width": 165.1,
432
- "height": 69.1,
433
- "style": {
434
- "border-color": "#ff0000",
435
- "border-width": 1,
436
- "border-style": "solid",
437
- "fill-color": "none"
438
- },
439
- "border-radius": 0
440
- },
441
- {
442
- "id": "",
443
- "type": "rect",
444
- "display": true,
445
- "description": "",
446
- "x": 215.1,
447
- "y": 406.1,
448
- "width": 165.1,
449
- "height": 69.1,
450
- "style": {
451
- "border-color": "#ff0000",
452
- "border-width": 1,
453
- "border-style": "solid",
454
- "fill-color": "none"
455
- },
456
- "border-radius": 0
457
- },
458
- {
459
- "id": "",
460
- "type": "rect",
461
- "display": true,
462
- "description": "",
463
- "x": 410,
464
- "y": 406.1,
465
- "width": 165.1,
466
- "height": 69.1,
467
- "style": {
468
- "border-color": "#ff0000",
469
- "border-width": 1,
470
- "border-style": "solid",
471
- "fill-color": "none"
472
- },
473
- "border-radius": 0
474
- },
475
- {
476
- "id": "line_height",
477
- "type": "text-block",
478
- "display": true,
479
- "description": "",
480
- "x": 311.1,
481
- "y": 678,
482
- "width": 179.1,
483
- "height": 90,
484
- "style": {
485
- "font-family": [
486
- "IPAPGothic"
487
- ],
488
- "font-size": 18,
489
- "color": "#000000",
490
- "text-align": "left",
491
- "vertical-align": "top",
492
- "line-height": 41,
493
- "line-height-ratio": 2,
494
- "letter-spacing": "",
495
- "font-style": [],
496
- "overflow": "truncate",
497
- "word-wrap": "break-word"
498
- },
499
- "reference-id": "",
500
- "value": "",
501
- "multiple-line": true,
502
- "format": {
503
- "base": "",
504
- "type": ""
505
- }
506
- },
507
- {
508
- "id": "",
509
- "type": "text",
510
- "display": true,
511
- "description": "",
512
- "x": 99,
513
- "y": 678,
514
- "width": 179.1,
515
- "height": 142.8,
516
- "style": {
517
- "font-family": [
518
- "IPAPGothic"
519
- ],
520
- "font-size": 18,
521
- "color": "#000000",
522
- "text-align": "left",
523
- "vertical-align": "top",
524
- "line-height": 41,
525
- "line-height-ratio": 2,
526
- "letter-spacing": "",
527
- "font-style": []
528
- },
529
- "texts": [
530
- "行間隔2.0",
531
- "日本語",
532
- "Thinreports"
533
- ]
534
- },
535
- {
536
- "id": "",
537
- "type": "line",
538
- "display": true,
539
- "description": "",
540
- "style": {
541
- "border-color": "#ff0000",
542
- "border-width": 1,
543
- "border-style": "solid"
544
- },
545
- "x1": 93,
546
- "y1": 692.8,
547
- "x2": 511.2,
548
- "y2": 692.8
549
- },
550
- {
551
- "id": "",
552
- "type": "line",
553
- "display": true,
554
- "description": "",
555
- "style": {
556
- "border-color": "#ff0000",
557
- "border-width": 1,
558
- "border-style": "solid"
559
- },
560
- "x1": 93,
561
- "y1": 727.8,
562
- "x2": 511.2,
563
- "y2": 727.8
564
- },
565
- {
566
- "id": "",
567
- "type": "line",
568
- "display": true,
569
- "description": "",
570
- "style": {
571
- "border-color": "#ff0000",
572
- "border-width": 1,
573
- "border-style": "solid"
574
- },
575
- "x1": 93,
576
- "y1": 766.8,
577
- "x2": 511.2,
578
- "y2": 766.8
579
- },
580
- {
581
- "id": "center_top",
582
- "type": "text-block",
583
- "display": true,
584
- "description": "",
585
- "x": 20,
586
- "y": 481,
587
- "width": 165.1,
588
- "height": 69.1,
589
- "style": {
590
- "font-family": [
591
- "IPAGothic"
592
- ],
593
- "font-size": 18,
594
- "color": "#000000",
595
- "text-align": "center",
596
- "vertical-align": "top",
597
- "line-height": "",
598
- "line-height-ratio": "",
599
- "letter-spacing": "",
600
- "font-style": [],
601
- "overflow": "truncate",
602
- "word-wrap": "break-word"
603
- },
604
- "reference-id": "",
605
- "value": "",
606
- "multiple-line": true,
607
- "format": {
608
- "base": "",
609
- "type": ""
610
- }
611
- },
612
- {
613
- "id": "center_center",
614
- "type": "text-block",
615
- "display": true,
616
- "description": "",
617
- "x": 215.1,
618
- "y": 481,
619
- "width": 165.1,
620
- "height": 69.1,
621
- "style": {
622
- "font-family": [
623
- "IPAGothic"
624
- ],
625
- "font-size": 18,
626
- "color": "#000000",
627
- "text-align": "center",
628
- "vertical-align": "middle",
629
- "line-height": "",
630
- "line-height-ratio": "",
631
- "letter-spacing": "",
632
- "font-style": [],
633
- "overflow": "truncate",
634
- "word-wrap": "break-word"
635
- },
636
- "reference-id": "",
637
- "value": "",
638
- "multiple-line": true,
639
- "format": {
640
- "base": "",
641
- "type": ""
642
- }
643
- },
644
- {
645
- "id": "center_bottom",
646
- "type": "text-block",
647
- "display": true,
648
- "description": "",
649
- "x": 410,
650
- "y": 481,
651
- "width": 165.1,
652
- "height": 69.1,
653
- "style": {
654
- "font-family": [
655
- "IPAGothic"
656
- ],
657
- "font-size": 18,
658
- "color": "#000000",
659
- "text-align": "center",
660
- "vertical-align": "bottom",
661
- "line-height": "",
662
- "line-height-ratio": "",
663
- "letter-spacing": "",
664
- "font-style": [],
665
- "overflow": "truncate",
666
- "word-wrap": "break-word"
667
- },
668
- "reference-id": "",
669
- "value": "",
670
- "multiple-line": true,
671
- "format": {
672
- "base": "",
673
- "type": ""
674
- }
675
- },
676
- {
677
- "id": "",
678
- "type": "rect",
679
- "display": true,
680
- "description": "",
681
- "x": 20,
682
- "y": 481,
683
- "width": 165.1,
684
- "height": 69.1,
685
- "style": {
686
- "border-color": "#ff0000",
687
- "border-width": 1,
688
- "border-style": "solid",
689
- "fill-color": "none"
690
- },
691
- "border-radius": 0
692
- },
693
- {
694
- "id": "",
695
- "type": "rect",
696
- "display": true,
697
- "description": "",
698
- "x": 215.1,
699
- "y": 481,
700
- "width": 165.1,
701
- "height": 69.1,
702
- "style": {
703
- "border-color": "#ff0000",
704
- "border-width": 1,
705
- "border-style": "solid",
706
- "fill-color": "none"
707
- },
708
- "border-radius": 0
709
- },
710
- {
711
- "id": "",
712
- "type": "rect",
713
- "display": true,
714
- "description": "",
715
- "x": 410,
716
- "y": 481,
717
- "width": 165.1,
718
- "height": 69.1,
719
- "style": {
720
- "border-color": "#ff0000",
721
- "border-width": 1,
722
- "border-style": "solid",
723
- "fill-color": "none"
724
- },
725
- "border-radius": 0
726
- },
727
- {
728
- "id": "right_top",
729
- "type": "text-block",
730
- "display": true,
731
- "description": "",
732
- "x": 20,
733
- "y": 556,
734
- "width": 165.1,
735
- "height": 69.1,
736
- "style": {
737
- "font-family": [
738
- "IPAGothic"
739
- ],
740
- "font-size": 18,
741
- "color": "#000000",
742
- "text-align": "right",
743
- "vertical-align": "top",
744
- "line-height": "",
745
- "line-height-ratio": "",
746
- "letter-spacing": "",
747
- "font-style": [],
748
- "overflow": "truncate",
749
- "word-wrap": "break-word"
750
- },
751
- "reference-id": "",
752
- "value": "",
753
- "multiple-line": true,
754
- "format": {
755
- "base": "",
756
- "type": ""
757
- }
758
- },
759
- {
760
- "id": "right_center",
761
- "type": "text-block",
762
- "display": true,
763
- "description": "",
764
- "x": 215.1,
765
- "y": 556,
766
- "width": 165.1,
767
- "height": 69.1,
768
- "style": {
769
- "font-family": [
770
- "IPAGothic"
771
- ],
772
- "font-size": 18,
773
- "color": "#000000",
774
- "text-align": "right",
775
- "vertical-align": "middle",
776
- "line-height": "",
777
- "line-height-ratio": "",
778
- "letter-spacing": "",
779
- "font-style": [],
780
- "overflow": "truncate",
781
- "word-wrap": "break-word"
782
- },
783
- "reference-id": "",
784
- "value": "",
785
- "multiple-line": true,
786
- "format": {
787
- "base": "",
788
- "type": ""
789
- }
790
- },
791
- {
792
- "id": "right_bottom",
793
- "type": "text-block",
794
- "display": true,
795
- "description": "",
796
- "x": 410,
797
- "y": 556,
798
- "width": 165.1,
799
- "height": 69.1,
800
- "style": {
801
- "font-family": [
802
- "IPAGothic"
803
- ],
804
- "font-size": 18,
805
- "color": "#000000",
806
- "text-align": "right",
807
- "vertical-align": "bottom",
808
- "line-height": "",
809
- "line-height-ratio": "",
810
- "letter-spacing": "",
811
- "font-style": [],
812
- "overflow": "truncate",
813
- "word-wrap": "break-word"
814
- },
815
- "reference-id": "",
816
- "value": "",
817
- "multiple-line": true,
818
- "format": {
819
- "base": "",
820
- "type": ""
821
- }
822
- },
823
- {
824
- "id": "",
825
- "type": "rect",
826
- "display": true,
827
- "description": "",
828
- "x": 20,
829
- "y": 556,
830
- "width": 165.1,
831
- "height": 69.1,
832
- "style": {
833
- "border-color": "#ff0000",
834
- "border-width": 1,
835
- "border-style": "solid",
836
- "fill-color": "none"
837
- },
838
- "border-radius": 0
839
- },
840
- {
841
- "id": "",
842
- "type": "rect",
843
- "display": true,
844
- "description": "",
845
- "x": 215.1,
846
- "y": 556,
847
- "width": 165.1,
848
- "height": 69.1,
849
- "style": {
850
- "border-color": "#ff0000",
851
- "border-width": 1,
852
- "border-style": "solid",
853
- "fill-color": "none"
854
- },
855
- "border-radius": 0
856
- },
857
- {
858
- "id": "",
859
- "type": "rect",
860
- "display": true,
861
- "description": "",
862
- "x": 410,
863
- "y": 556,
864
- "width": 165.1,
865
- "height": 69.1,
866
- "style": {
867
- "border-color": "#ff0000",
868
- "border-width": 1,
869
- "border-style": "solid",
870
- "fill-color": "none"
871
- },
872
- "border-radius": 0
873
- }
874
- ],
875
- "state": {
876
- "layout-guides": []
877
- },
878
- "title": "Tblock Styles",
879
- "report": {
880
- "paper-type": "A4",
881
- "orientation": "portrait",
882
- "margin": [
883
- 20,
884
- 20,
885
- 20,
886
- 20
887
- ]
888
- }
889
- }