Update README.md
[proportionaltomonofont] / README.md
1 # This project is a fork of dtinth/comic-mono-font
2
3 That project was to create a font. This project is designed to use the generate.py script and use it to take a proportional spaced font and make it a mono spaced font.
4
5 This may be a very silly idea.  I have got the script to work to generate a mono spaced font from a proportional font.  The key is tweaking the height and width so the fonts look nice.
6
7 ## Dependencies
8
9 Python 2
10 The python bindings for font forge
11 This link may help you install the bindings
12
13 [https://stackoverflow.com/questions/36508944/install-fontcustom-fontforge-in-ubuntu](https://stackoverflow.com/questions/36508944/install-fontcustom-fontforge-in-ubuntu)
14
15 ##How to use the script
16
17 Install the Dependencies
18 Put the proportional font you are going to convert in the vendor directory
19 Put the reference font you are going to use in the vendor directory
20 Edit the script.  See bellow
21 Make the script executable 
22 Run ./generate.py 
23 Your normal font and bold font will be generated and should be found in the same directory as generate.py
24 The fonts can now be installed.  
25 Depending on the width and height you set will affect what the font actually looks like.  It could look nice or it could look awful.
26
27 ## You need to edit the script.  Here is the list of things you need to change:
28
29 ### Change the following two lines to the script to the font you are going to convert and the reference font
30 font = fontforge.open('vendor/comic-shanns.otf')
31 ref = fontforge.open('vendor/Cousine-Regular.ttf')
32
33 ### Change the integer value the larger the number the wider the font
34 target_width = 510
35
36 #### change number in adjust_height to make font shorter or taller
37 adjust_height(font, ref, 0.875)
38
39 ### change to desired font name
40 font.fontname = 'ComicMono'
41 ### change to desired full name
42 font.fullname = 'Comic Mono'
43 #change to desired file name
44 font.generate('ComicMono.ttf')
45
46 ### Bold section
47 ### change to desired font name
48 font.fontname = 'ComicMono-Bold'
49
50 ### change to desired full name
51 font.fullname = 'Comic Mono Bold'
52
53 ### change to desired file name
54 font.generate('ComicMono-Bold.ttf')
55
56 ## Notes:
57 What is the reference font for?
58 Taken from Comic Mono font README.md
59 The glyph metrics have been adjusted to make it display better alongside system font, based on Cousine’s metrics.
60 You could use a different font as the reference as see how it changes the font.
61
62 ## License
63 It is licensed under the [MIT License](LICENSE).