cheap-impression-presenter 1.1.2 → 1.1.3
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.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/chimp.gemspec +1 -1
- data/lib/output/pdf.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 559b5a0157ab1677e1e1f57de21cb22327e6b779ef25da65124e5e02f115585f
|
|
4
|
+
data.tar.gz: 4e92ed0ae3c091965b6df6444200b56c240046194646ede5d1637faf165e4a95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43bdfcddc75072ec0d3767bbb58802c55af33973ceeed469ee3eb9a3ddbfa49cc947b56b629f97184562295a25a98cc5d5b9b3720dfe1fff2088f8491e54c8f1
|
|
7
|
+
data.tar.gz: af3794816e59ea883cfd2149c43350cd22298013a79d9d854db5fba7e0250aff35835952eb0e1fd1c4c75049bf685315dd16f3ef0ab72adc6aba04807f553237
|
data/README.md
CHANGED
|
@@ -18,7 +18,10 @@ available in the usual linux distributions and homebrew):
|
|
|
18
18
|
|
|
19
19
|
* ``figlet``: for the figlet plugin.
|
|
20
20
|
* ``img2sixel`` (from libsixel): for the sixel plugin, i.e. pictures in the terminal.
|
|
21
|
-
Your terminal also needs sixel support.
|
|
21
|
+
Your terminal also needs sixel support. On linux a VTE based terminal with
|
|
22
|
+
sixel enabled works well, e.g. Black Box
|
|
23
|
+
(https://flathub.org/apps/com.raggesilver.BlackBox), where sixel has to be
|
|
24
|
+
switched on in the preferences.
|
|
22
25
|
* ``inkscape``: for svg pictures, in the terminal as well as in the PDF output.
|
|
23
26
|
* DejaVu Sans Mono font: for the PDF output. If it is not installed, Courier is
|
|
24
27
|
used, which lacks some characters (e.g. box drawing).
|
data/chimp.gemspec
CHANGED
data/lib/output/pdf.rb
CHANGED
|
@@ -21,6 +21,7 @@ module Chimp
|
|
|
21
21
|
WIDTH = 960 # 16:9 page in points
|
|
22
22
|
HEIGHT = 540
|
|
23
23
|
MARGIN = 20
|
|
24
|
+
CELL = 2.1 # character cell height / width, as in a terminal with 10x21 pixel cells, so pictures cover the same number of lines
|
|
24
25
|
|
|
25
26
|
#### a virtual terminal that collects what is printed into a character grid {{{
|
|
26
27
|
class Terminal
|
|
@@ -127,8 +128,8 @@ module Chimp
|
|
|
127
128
|
#### the slide always has @size lines, the last two of which are the footer
|
|
128
129
|
def finish_prepare #{{{
|
|
129
130
|
@rowh = (HEIGHT - 2 * MARGIN).to_f / @size
|
|
130
|
-
@
|
|
131
|
-
@
|
|
131
|
+
@cw = @rowh / CELL
|
|
132
|
+
@fsize = @cw * 1000.0 / @font.decode_utf8('M').first.width
|
|
132
133
|
columns = ((WIDTH - 2 * MARGIN) / @cw).floor
|
|
133
134
|
@left = (WIDTH - columns * @cw) / 2.0
|
|
134
135
|
@screen = Terminal.new(columns, @size - 2, self)
|