├── LICENSE ├── README.md ├── files ├── minecraft.woff └── minecraft.woff2 ├── index.css └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Alex Gabites 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # typeface-minecraft 2 | 3 | The CSS and web font files for the Minecraft typeface and colors 4 | 5 | ## Install 6 | 7 | `npm install --save @south-paw/typeface-minecraft` 8 | 9 | or 10 | 11 | `yarn add @south-paw/typeface-minecraft` 12 | 13 | ## Use 14 | 15 | This project assumes that you're using webpack to process CSS and files. 16 | 17 | The package includes the necessary font files (woff2, woff) and a CSS file with font-face declarations pointing at these files. 18 | 19 | You will need to have webpack setup to load css and font files. 20 | 21 | Many tools built with Webpack will work out of the box with this package such as [Gatsby](https://github.com/gatsbyjs/gatsby) and [Create React App](https://github.com/facebook/create-react-app). 22 | 23 | To use, simply require the package in your project's entry file: 24 | 25 | ```js 26 | // Load Minecraft typeface 27 | require("@south-paw/typeface-minecraft"); 28 | ``` 29 | 30 | and then apply the font family via CSS: 31 | 32 | ```css 33 | body { 34 | font-family: "Minecraft"; 35 | } 36 | ``` 37 | 38 | The package also adds some global CSS classes for matching Minecraft colors: 39 | 40 | ```css 41 | .minecraft-black 42 | .minecraft-dark-blue 43 | .minecraft-dark-green 44 | .minecraft-dark-aqua 45 | .minecraft-dark-red 46 | .minecraft-dark-purple 47 | .minecraft-gold 48 | .minecraft-gray 49 | .minecraft-dark-gray 50 | .minecraft-blue 51 | .minecraft-green 52 | .minecraft-aqua 53 | .minecraft-red 54 | .minecraft-light-purple 55 | .minecraft-yellow 56 | .minecraft-white 57 | ``` 58 | 59 | Any of these can be applied to an element e.g. 60 | 61 | ```html 62 |
Minecraft
63 | ``` 64 | 65 | ## Source 66 | 67 | Colors are from the [Minecraft wiki](https://minecraft.gamepedia.com/Formatting_codes). 68 | 69 | Package is inspired by the [typefaces project](https://github.com/KyleAMathews/typefaces). 70 | -------------------------------------------------------------------------------- /files/minecraft.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/South-Paw/typeface-minecraft/26561c9425f7ca9b75ec06bcbcd3c834f8706cab/files/minecraft.woff -------------------------------------------------------------------------------- /files/minecraft.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/South-Paw/typeface-minecraft/26561c9425f7ca9b75ec06bcbcd3c834f8706cab/files/minecraft.woff2 -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Minecraft"; 3 | font-style: normal; 4 | font-display: swap; 5 | font-weight: 400; 6 | src: 7 | local("Minecraft "), 8 | local("Minecraft"), 9 | url("./files/minecraft.woff2") format("woff2"), 10 | url("./files/minecraft.woff") format("woff"); 11 | } 12 | 13 | .minecraft-black { 14 | color: #000000; 15 | text-shadow: 1px 1px 0 #000000; 16 | } 17 | 18 | .minecraft-dark-blue { 19 | color: #0000aa; 20 | text-shadow: 1px 1px 0 #00002a; 21 | } 22 | 23 | .minecraft-dark-green { 24 | color: #00aa00; 25 | text-shadow: 1px 1px 0 #002a00; 26 | } 27 | 28 | .minecraft-dark-aqua { 29 | color: #00aaaa; 30 | text-shadow: 1px 1px 0 #002a2a; 31 | } 32 | 33 | .minecraft-dark-red { 34 | color: #aa0000; 35 | text-shadow: 1px 1px 0 #2a0000; 36 | } 37 | 38 | .minecraft-dark-purple { 39 | color: #aa00aa; 40 | text-shadow: 1px 1px 0 #2a002a; 41 | } 42 | 43 | .minecraft-gold { 44 | color: #ffaa00; 45 | text-shadow: 1px 1px 0 #2a2a00; 46 | } 47 | 48 | .minecraft-gray { 49 | color: #aaaaaa; 50 | text-shadow: 1px 1px 0 #2a2a2a; 51 | } 52 | 53 | .minecraft-dark-gray { 54 | color: #555555; 55 | text-shadow: 1px 1px 0 #151515; 56 | } 57 | 58 | .minecraft-blue { 59 | color: #5555ff; 60 | text-shadow: 1px 1px 0 #15153f; 61 | } 62 | 63 | .minecraft-green { 64 | color: #55ff55; 65 | text-shadow: 1px 1px 0 #153f15; 66 | } 67 | 68 | .minecraft-aqua { 69 | color: #55ffff; 70 | text-shadow: 1px 1px 0 #153f3f; 71 | } 72 | 73 | .minecraft-red { 74 | color: #ff5555; 75 | text-shadow: 1px 1px 0 #3f1515; 76 | } 77 | 78 | .minecraft-light-purple { 79 | color: #ff55ff; 80 | text-shadow: 1px 1px 0 #3f153f; 81 | } 82 | 83 | .minecraft-yellow { 84 | color: #ffff55; 85 | text-shadow: 1px 1px 0 #3f3f15; 86 | } 87 | 88 | .minecraft-white { 89 | color: #ffffff; 90 | text-shadow: 1px 1px 0 #3f3f3f; 91 | } 92 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@south-paw/typeface-minecraft", 3 | "version": "1.0.0", 4 | "description": "Minecraft typeface and colors", 5 | "keywords": [ 6 | "typeface", 7 | "font", 8 | "font family", 9 | "typography", 10 | "minecraft", 11 | "minecraft-font" 12 | ], 13 | "homepage": "https://github.com/South-Paw/typeface-minecraft", 14 | "bugs": "https://github.com/South-Paw/typeface-minecraft/issues", 15 | "license": "MIT", 16 | "author": { 17 | "name": "Alex Gabites", 18 | "email": "hello@southpaw.co.nz", 19 | "url": "http://southpaw.co.nz/" 20 | }, 21 | "files": [ 22 | "files/*" 23 | ], 24 | "main": "index.css", 25 | "repository": { 26 | "type": "git", 27 | "url": "https://github.com/South-Paw/typeface-minecraft.git" 28 | }, 29 | "publishConfig": { 30 | "access": "public" 31 | } 32 | } 33 | --------------------------------------------------------------------------------