https://github.com/a-type/cipher-font
A font generator which modifies a font to render ciphered text in readable glyphs.
https://github.com/a-type/cipher-font
Last synced: 8 months ago
JSON representation
A font generator which modifies a font to render ciphered text in readable glyphs.
- Host: GitHub
- URL: https://github.com/a-type/cipher-font
- Owner: a-type
- Created: 2015-12-27T20:07:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-27T20:18:13.000Z (over 10 years ago)
- Last Synced: 2025-03-30T03:41:27.097Z (about 1 year ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cipher-font
## Usage
``` javascript
var cipher = require('cipher-font');
cipher(
'path/to/source_font.otf',
'path/to/output_font.otf',
'optional seed string'
)
.then((cipherMapping) => {
// the mapping is an object where
// characters map as keys to ciphered characters
console.log('A is now ' + cipherMapping['A'] + '!');
});
```
When you've ciphered your string, use the generated font to render it. The user should see the original text, but a scrape of the text will still read as ciphered.
Obviously this is not incredibly secure (it's the most basic of cryptography), but it's about as advanced as I think I can take this concept unless I have a better idea, and it should fool most bots which aren't really looking for it.
Or maybe you have more prank-related ideas? I'm not saying you should set your friend's default editor font to a generated font, only that it's a possibility which may send him digging into his keyboard language settings to figure out why the wrong letters are coming out.
## Mapped Characters
The library currently just maps any characters in the following string:
``` javascript
' .?!,:;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
```