Skip to content

Commit

Permalink
Only generate modern formats
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterwb committed Feb 2, 2019
1 parent 9e29abf commit 5bb782f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Font.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

logging.basicConfig(level=logging.DEBUG)

revision = 0.2
revision = 1.100

for fileName in os.listdir('data'):
fontName = fileName.split('.')[0]
Expand Down
38 changes: 2 additions & 36 deletions FontForgeScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,16 @@
os.makedirs('otf')
fontNameOtf = os.path.join('otf', fontNameBase + '.otf')

if not os.path.isdir('otf-1k'):
os.makedirs('otf-1k')
fontNameOtf1k = os.path.join('otf-1k', fontNameBase + '.otf')

if not os.path.isdir('ttf-64'):
os.makedirs('ttf-64')
fontNameTtf64 = os.path.join('ttf-64', fontNameBase + '.ttf')

if not os.path.isdir('svg'):
os.makedirs('svg')
fontNameSvg = os.path.join('svg', fontNameBase + '.svg')

if not os.path.isdir('fon'):
os.makedirs('fon')
fontNameFon = os.path.join('fon', fontNameBase + '.fon')

if not os.path.isdir('bdf'):
os.makedirs('bdf')
fontNameBdf = os.path.join('bdf', fontNameBase + '.bdf')

font = fontforge.open(fontNameTtf)
font.selection.all()
font.canonicalContours()
font.removeOverlap()
font.simplify()
font.canonicalContours()
font.canonicalStart()

font.bitmapSizes = ((font.em,),)
font.regenBitmaps(font.bitmapSizes)
font.encoding = 'MS-ANSI'
font.generate(fontNameFon, bitmap_type='fon', bitmap_resolution=font.em)
font.encoding = 'UnicodeBmp'
font.generate(fontNameBdf, bitmap_type='bdf', bitmap_resolution=font.em)
font.bitmapSizes = (())

font.generate(fontNameSvg)
font.generate(fontNameTtf, flags='short-post')
font.private['BlueValues'] = []
font.private['BlueScale'] = 0.0
font.private['BlueFuzz'] = 0.0
font.generate(fontNameOtf)

font.em = 64
font.generate(fontNameTtf64)

font.em = 1000
font.generate(fontNameOtf1k)
font.generate(fontNameOtf)
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
# Old School RuneScape Fonts

[![Discord](https://img.shields.io/discord/384870460640329728.svg?logo=discord)](https://discord.gg/G2kxrnU)

All 10 fonts with all 192 characters exactly as appears in-game

![Preview](Preview.png)

[**Download**](https://github.com/RuneStar/fonts/releases) in the following formats. Use `ttf` if unsure.
[![Discord](https://img.shields.io/discord/384870460640329728.svg?logo=discord)](https://discord.gg/G2kxrnU)

| name | extension | format |
| --- | --- | --- |
| ttf | .ttf | TrueType |
| otf | .otf | OpenType |
| otf-1k | .otf | OpenType (1000 em size) |
| svg | .svg | Scalable Vector Graphics |
| fon | .fon | Windows FON |
| bdf | .bdf | Glyph Bitmap Distribution |
[**Download**](https://github.com/RuneStar/fonts/releases) in OpenType or TrueType

All 10 fonts with all 192 characters exactly as appears in-game

Source of font names:

Expand Down

0 comments on commit 5bb782f

Please sign in to comment.