Skip to content

Commit d467494

Browse files
committed
Support UTF-8 org->text rendering in .txt, autoload FPDF fonts
1 parent de67163 commit d467494

38 files changed

+363
-145
lines changed

GNUmakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,14 @@ build: clean wheel
104104
#
105105
# deps: All of the gui/.txt files needed to built, before the sdist, wheel or app
106106
#
107+
# emacs $< --batch -f org-ascii-export-to-ascii --kill
107108
%.txt: %.org
108-
emacs $< --batch -f org-ascii-export-to-ascii --kill
109+
emacs --batch \
110+
--eval "(require 'org)" \
111+
--insert "$<" \
112+
--eval "(org-ascii-export-as-ascii nil nil nil nil '(:ascii-charset utf-8))" \
113+
--eval "(write-file \"$@\")" \
114+
--kill
109115

110116
TXT = $(patsubst %.org,%.txt,$(wildcard slip39/*/*.org))
111117

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
'slip39': [
167167
'layout/*.png',
168168
'layout/*.txt',
169-
'gui/*.txt'
169+
'layout/font/*.ttf',
170+
'gui/*.txt',
170171
],
171172
}
172173

slip39/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
THEME = 'DarkAmber' # PySimpleGUI Theme
4545
FONTS = dict(
4646
sans = 'helvetica',
47-
mono = 'courier',
47+
mono = 'sourcecode', # UTF-8 monospaced w/ "━": dejavu, inconsolata, noto, overpass, sourcecode
4848
)
4949

5050
# Y X Margin

slip39/gui/SLIP-39-AS-BIP.org

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Also supports other Hardware Wallets that require a BIP-39 Mnemonic for Seed rec
88
your Ledger Nano. Recover your BIP-39 Seed Phrase from these SLIP-39 cards using the GUI (or
99
command-line) whenever you need it, to restore your Crypto accounts to your hardware wallet.
1010

11-
| Controls | Description |
12-
|----------+----------------------------------------------------------------------|
13-
| Backup | Already using a BIP-39 Seed Phrase? Back it up using SLIP-39 Cards |
14-
| Create | Generate SLIP-39 Cards, even if using BIP-39 on your hardware wallet |
15-
| Recover | Use SLIP-39/BIP-39 to recover Seed, supports using BIP-39 on wallet |
16-
| Pro | Convert existing BIP-39 Seed to SLIP-39 for "Paper Wallet" backup |
11+
| Controls | Description |
12+
|----------+---------------------------------------------------------------------|
13+
| Backup | Already using a BIP-39 Seed Phrase? Back it up using SLIP-39 Cards |
14+
| Create | Generate SLIP-39 Cards, even if using a BIP-39 hardware wallet |
15+
| Recover | Use SLIP-39/BIP-39 to recover Seed, supports using BIP-39 on wallet |
16+
| Pro | Convert existing BIP-39 Seed to SLIP-39 for "Paper Wallet" backup |
1717
#+END_ABSTRACT
1818

1919
* Using BIP-39

slip39/gui/SLIP-39-AS-BIP.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ Seed recovery, such as to your Ledger Nano. Recover your BIP-39 Seed
66
Phrase from these SLIP-39 cards using the GUI (or command-line) whenever
77
you need it, to restore your Crypto accounts to your hardware wallet.
88

9-
Controls Description
10-
--------------------------------------------------------------------------------
11-
Backup Already using a BIP-39 Seed Phrase? Back it up using SLIP-39 Cards
12-
Create Generate SLIP-39 Cards, even if using BIP-39 on your hardware wallet
13-
Recover Use SLIP-39/BIP-39 to recover Seed, supports using BIP-39 on wallet
14-
Pro Convert existing BIP-39 Seed to SLIP-39 for "Paper Wallet" backup
9+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10+
Controls Description
11+
───────────────────────────────────────────────────────────────────────────────
12+
Backup Already using a BIP-39 Seed Phrase? Back it up using SLIP-39 Cards
13+
Create Generate SLIP-39 Cards, even if using a BIP-39 hardware wallet
14+
Recover Use SLIP-39/BIP-39 to recover Seed, supports using BIP-39 on wallet
15+
Pro Convert existing BIP-39 Seed to SLIP-39 for "Paper Wallet" backup
16+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1517

1618

1719
1 Using BIP-39
18-
==============
20+
══════════════
1921

2022
To support older or less expensive existing hardware wallets that
2123
*only* support BIP-39 recovery, *or* to backup existing BIP-39
@@ -26,7 +28,7 @@ you need it, to restore your Crypto accounts to your hardware wallet.
2628

2729

2830
1.1 Output BIP-39 Mnemonics
29-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
───────────────────────────
3032

3133
You will see your BIP-39 Mnemonic, which encodes the Seed Source (and
3234
optionally any Seed Extra Randomness) you've specified.
@@ -38,7 +40,7 @@ you need it, to restore your Crypto accounts to your hardware wallet.
3840

3941

4042
1.2 Use BIP-39 Seed Generation
41-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
──────────────────────────────
4244

4345
Any Cryptocurrency wallet QR codes and Paper Wallets will be derived
4446
using standard BIP-39 Seed generation.

slip39/gui/SLIP-39-CRYPTO.txt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ produce (if a password is supplied). The cryptocurrencies supported,
33
and the standard BIP-44 derivation paths (Trezor, Ledger, etc.
44
compatible) displayed are:
55

6+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
Controls Crypto Semantic Path Address Support
7-
------------------------------------------------------------------
8-
(default) ETH Legacy m/44'/ 60'/0'/0/0 0x...
9-
(default) BTC Bech32 m/84'/ 0'/0'/0/0 bc1...
10-
SegWit m/44'/ 0'/0'/0/0 3...
11-
Legacy m/44'/ 0'/0'/0/0 1...
12-
Recover LTC Bech32 m/84'/ 2'/0'/0/0 ltc1...
13-
SegWit m/44'/ 2'/0'/0/0 M...
14-
Legacy m/44'/ 2'/0'/0/0 L...
15-
Recover DOGE Legacy m/44'/ 3'/0'/0/0 D...
16-
Pro BNB Legacy m/44'/ 60'/0'/0/0 0x... Beta
17-
Pro CRO Bech32 m/44'/ 60'/0'/0/0 crc1... Beta
18-
Pro XRP Legacy m/44'/144'/0'/0/0 r... Beta
8+
──────────────────────────────────────────────────────────────────
9+
(default) ETH Legacy m/44'/ 60'/0'/0/0 0x…
10+
(default) BTC Bech32 m/84'/ 0'/0'/0/0 bc1…
11+
SegWit m/44'/ 0'/0'/0/0 3…
12+
Legacy m/44'/ 0'/0'/0/0 1…
13+
Recover LTC Bech32 m/84'/ 2'/0'/0/0 ltc1…
14+
SegWit m/44'/ 2'/0'/0/0 M…
15+
Legacy m/44'/ 2'/0'/0/0 L…
16+
Recover DOGE Legacy m/44'/ 3'/0'/0/0 D…
17+
Pro BNB Legacy m/44'/ 60'/0'/0/0 0x… Beta
18+
Pro CRO Bech32 m/44'/ 60'/0'/0/0 crc1… Beta
19+
Pro XRP Legacy m/44'/144'/0'/0/0 r… Beta
20+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1921

2022
On each SLIP-39 card, up to 2 Wallet addresses and QR codes will be
2123
displayed, for information purposes only, to illustrate *which* Wallets
2224
are derived from this Seed.
2325

2426

2527
1 Semantics
26-
===========
28+
═══════════
2729

2830
By default, we produce address semantics compatible with what the
2931
Trezor hardware wallet produces (ie. Bech32, for `BTC' and `LTC').
@@ -32,7 +34,7 @@ are derived from this Seed.
3234

3335

3436
2 Cryptocurrencies In Beta Testing
35-
==================================
37+
══════════════════════════════════
3638

3739
The BNB and CRO wallet addresses are also supported, if desired
3840
(currently in Beta testing quality). Generated Paper Wallets should

slip39/gui/SLIP-39-CS.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
Select the desired SLIP-39 card size.
22

3+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
34
Controls Card Size Width Height
4-
--------------------------------------
5+
──────────────────────────────────────
56
(default) Business 3-1/2" 2"
67
All Credit 3-3/8" 2-1/4"
78
All Index 5" 3"
89
Recover Half 8" 4.5"
910
Recover Third 8" 3-3/8"
1011
Recover Quarter 8" 2-5/8"
1112
Pro Photo 5-1/2" 3-1/5"
13+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1214

1315

1416
1 Orientation
15-
=============
17+
═════════════
1618

1719
SLIP-39 Cards will be laid out on the desired paper size in the most
1820
optimal orientation, to fit the most Cards on the selected paper.
1921

2022

2123
1.1 Paper Wallets
22-
~~~~~~~~~~~~~~~~~
24+
─────────────────
2325

2426
If Cryptocurrency "Paper Wallet" are printed, the selected Paper will
2527
always be printed in Portrait orientation.

slip39/gui/SLIP-39-G-NAME.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ Name each Group according to "who" or "where" you plan to distribute it.
22

33
The default Group names and their intended usages are:
44

5+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
56
First A 1-card group stored in the First safe place
67
Second A 1-card group stored in the First safe place
78
Fam A smaller group of Family members
89
Fren A larger group of Friends; increase Needed
10+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
911

1012

1113
1 1-Card Groups
12-
===============
14+
═══════════════
1315

1416
Useful for the direct owners of the Seed. Just one Card for these
1517
groups must be collected; ensure that 2+ of these Groups are created,
@@ -21,27 +23,27 @@ The default Group names and their intended usages are:
2123

2224

2325
2 Multi-Card Groups
24-
===================
26+
═══════════════════
2527

2628
If you have a group of people (or places) that may be lost or
2729
destroyed, or where some Mnemonics (cards) may be found and fall into
2830
hostile hands, use a multi-card group.
2931

3032

3133
2.1 Hostile Groups
32-
~~~~~~~~~~~~~~~~~~
34+
──────────────────
3335

3436
The more /hostile/ (untrustworthy) the group (ie. the more likely that
35-
any card(s) may be stolen by an attacker) -- make the Group's
37+
any card(s) may be stolen by an attacker) make the Group's
3638
Needed/#-in-Group ratio larger. Then, the attacker must collect more
3739
cards to defeat the Group.
3840

3941

4042
2.2 Fragile Groups
41-
~~~~~~~~~~~~~~~~~~
43+
──────────────────
4244

4345
The more /fragile/ (unreliable) the group (ie. the more likely that
44-
any card(s) may be lost or destroyed) -- make the Group's
46+
any card(s) may be lost or destroyed) make the Group's
4547
Needed/#-in-Group ratio smaller. Thus, more cards may be
4648
lost/destroyed before the Group can no longer be recovered (an *other*
4749
Group(s) must be colledted, instead, to recover the Seed).

slip39/gui/SLIP-39-G.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Decrease "# Needed", the less Fragile/Unreliable the Group is.
66

77

88
1 1-Card Groups
9-
===============
9+
═══════════════
1010

1111
Useful for the direct owners of the Seed. Just one Card for these
1212
groups must be collected; ensure that 2+ of these Groups are created,
@@ -18,27 +18,27 @@ Decrease "# Needed", the less Fragile/Unreliable the Group is.
1818

1919

2020
2 Multi-Card Groups
21-
===================
21+
═══════════════════
2222

2323
If you have a group of people (or places) that may be lost or
2424
destroyed, or where some Mnemonics (cards) may be found and fall into
2525
hostile hands, use a multi-card group.
2626

2727

2828
2.1 Hostile Groups
29-
~~~~~~~~~~~~~~~~~~
29+
──────────────────
3030

3131
The more /hostile/ (untrustworthy) the group (ie. the more likely that
32-
any card(s) may be stolen by an attacker) -- make the Group's
32+
any card(s) may be stolen by an attacker) make the Group's
3333
Needed/#-in-Group ratio larger. Then, the attacker must collect more
3434
cards to defeat the Group.
3535

3636

3737
2.2 Fragile Groups
38-
~~~~~~~~~~~~~~~~~~
38+
──────────────────
3939

4040
The more /fragile/ (unreliable) the group (ie. the more likely that
41-
any card(s) may be lost or destroyed) -- make the Group's
41+
any card(s) may be lost or destroyed) make the Group's
4242
Needed/#-in-Group ratio smaller. Thus, more cards may be
4343
lost/destroyed before the Group can no longer be recovered (an *other*
4444
Group(s) must be colledted, instead, to recover the Seed).

slip39/gui/SLIP-39-LO.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
Select an appropriate level of Controls detail.
22

3+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
34
Backup Create SLIP-39 Mnemonics from existing BIP-39 Seed Phrase
45
Create SLIP-39 Mnemonic creation, "Using BIP-39" wallet support
56
Recover Enhanced SLIP-39 creation and SLIP-39/BIP-39 recovery
67
Pro Advanced Seeds, conversion of BIP-39 Phrase + passphrase to SLIP-39
8+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79

810

911
1 Backup
10-
========
12+
════════
1113

1214
The simplest mode, to "back up" a BIP-39 Seed Phrase Mnemonic to
1315
SLIP-39 Mnemonic Card Groups.
@@ -20,7 +22,7 @@ Select an appropriate level of Controls detail.
2022

2123

2224
2 Create
23-
========
25+
════════
2426

2527
A basic SLIP-39 Mnemonic creation interface. Default support for
2628
[Trezor "Model T"] with native SLIP-39 Mnemonics recovery.
@@ -38,7 +40,7 @@ Select an appropriate level of Controls detail.
3840

3941

4042
3 Recovery
41-
==========
43+
══════════
4244

4345
Greater control over the Mnemonic creation process. Recovery of Seed
4446
Entropy from SLIP-39 Mnemonics.
@@ -48,7 +50,7 @@ Select an appropriate level of Controls detail.
4850

4951

5052
3.1 Extra Seed Randomness
51-
~~~~~~~~~~~~~~~~~~~~~~~~~
53+
─────────────────────────
5254

5355
Probably most importantly, Extra Seed Entropy can be supplied. Any
5456
data supplied (Dice rolls, for example, add about 2.5 bits of entropy
@@ -64,22 +66,22 @@ Select an appropriate level of Controls detail.
6466

6567

6668
3.2 SLIP-39
67-
~~~~~~~~~~~
69+
───────────
6870

6971
Supports input of existing SLIP-39 mnemonics to recover the original
7072
Seed Entropy.
7173

7274

7375
3.2.1 Recover From Lost SLIP-39 Mnemonic Cards
74-
----------------------------------------------
76+
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
7577

7678
If you know that some of your original SLIP-39 Mnemonic cards have
7779
been lost, you can re-issue /another/ set of SLIP-39 cards containing
7880
the same, original Seed Entropy.
7981

8082

8183
4 Pro
82-
=====
84+
═════
8385

8486
Advanced SLIP-39 creation and recovery, and recovery (and conversion)
8587
of BIP-39 Mnemonics to SLIP-39.
@@ -88,7 +90,7 @@ Select an appropriate level of Controls detail.
8890

8991

9092
4.1 BIP-39
91-
~~~~~~~~~~
93+
──────────
9294

9395
Conversion of existing, fragile BIP-39 12- or 24-word Mnemonic phrases
9496
into SLIP-39 is supported.

0 commit comments

Comments
 (0)