Skip to content

South-Paw/typeface-minecraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typeface-minecraft

The CSS and web font files for the Minecraft typeface and colors

Install

npm install --save @south-paw/typeface-minecraft

or

yarn add @south-paw/typeface-minecraft

Use

This project assumes that you're using webpack to process CSS and files.

The package includes the necessary font files (woff2, woff) and a CSS file with font-face declarations pointing at these files.

You will need to have webpack setup to load css and font files.

Many tools built with Webpack will work out of the box with this package such as Gatsby and Create React App.

To use, simply require the package in your project's entry file:

// Load Minecraft typeface
require("@south-paw/typeface-minecraft");

and then apply the font family via CSS:

body {
  font-family: "Minecraft";
}

The package also adds some global CSS classes for matching Minecraft colors:

.minecraft-black
.minecraft-dark-blue
.minecraft-dark-green
.minecraft-dark-aqua
.minecraft-dark-red
.minecraft-dark-purple
.minecraft-gold
.minecraft-gray
.minecraft-dark-gray
.minecraft-blue
.minecraft-green
.minecraft-aqua
.minecraft-red
.minecraft-light-purple
.minecraft-yellow
.minecraft-white

Any of these can be applied to an element e.g.

<div class="minecraft-blue">Minecraft</div>

Source

Colors are from the Minecraft wiki.

Package is inspired by the typefaces project.