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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/chimp.gemspec +1 -1
  4. data/lib/output/pdf.rb +3 -2
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a36b988f15eb1ff9d6e1c40c1139220517c2aff8c0b1a3901aa12923c2139bb
4
- data.tar.gz: ba067777401ca8a6d32de3eb86388d0fd07498c23749fd5a5450652b28d63ff4
3
+ metadata.gz: 559b5a0157ab1677e1e1f57de21cb22327e6b779ef25da65124e5e02f115585f
4
+ data.tar.gz: 4e92ed0ae3c091965b6df6444200b56c240046194646ede5d1637faf165e4a95
5
5
  SHA512:
6
- metadata.gz: 740ae3a397f0f205b49076524aa0507b613420dcac2b8d7d19a21afc8516fd590e3658a9a3f561667f69e97c4c29208ad95494389542782d65b1b2b9620356c6
7
- data.tar.gz: 451b79eff47410c1e29abc83688509856f1d02ffd1c0798958f2b070f6e5f2b8a9b3ee68ca1df6f9c8cb2d6cf21439428ff1df7b0c459577916d411306bde56c
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cheap-impression-presenter"
3
- s.version = "1.1.2"
3
+ s.version = "1.1.3"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "GPL-3.0-or-later"
6
6
  s.summary = "CHIMP - Make a cheap impression. Present via terminal."
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
- @fsize = @rowh / 1.2
131
- @cw = @font.decode_utf8('M').first.width * @fsize / 1000.0
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheap-impression-presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler