Commit 52751051 authored by Jared Jennings's avatar Jared Jennings
Browse files

first try at making this thing fetch its own fonts instead of including the...

first try at making this thing fetch its own fonts instead of including the fonts in the repo. bad idea perhaps but the authors seem to want font downloads to happen from their site, not somewhere else
parents
STEM = C64_TrueType_v1.2-STYLE
ZIP = $(STEM).zip
S = wordpress-style-dir
OUT_ZIP = twenty-fifteen-c64-child.zip
all: .get-fonts-stamp .put-fonts-stamp .dist-stamp
@echo "The theme zip is ready. It is $(OUT_ZIP)"
.get-fonts-stamp:
curl -O http://style64.org/file/$(ZIP)
touch $@
.put-fonts-stamp: .get-fonts-stamp
unzip $(ZIP)
for fontfile in $(STEM)/fonts/*.{eot,svg,ttf,woff,woff2}; do \
mv $$fontfile $(S)/fonts/$$(basename $$fontfile | tr A-Z a-z); \
done
rm -rf $(STEM)
touch $@
.dist-stamp:
rm -f $(OUT_ZIP)
zip -r $(OUT_ZIP) $(S)
touch $@
clean:
rm -rf $(OUT_ZIP) $(STEM)
Here we have the C64 Pro fonts from STYLE, a North American demogroup for the
Commodore 64 & PC.
These fonts are under a certain license. It says I can "include this font ...
as part of a software package ... freely provided to end users." See
http://style64.org/c64-truetype/license. I have lowercased the filenames
because some web page said IE doesn't deal well with uppercase characters. Smh,
it's IE, what are you going to do.
Get the fonts for yourself at http://style64.org/c64-truetype.
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
/*
Theme Name: Twenty Fifteen C64 Child
Theme URI: http://gitlab.com/jaredjennings/wordpress-twentyfifteen-c64-child
Description: Twenty Fifteen, with C64 Pro fonts
Author: Jared Jennings
Author URI: http://j.agrue.info
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-c64-child
*/
/* Thanks, https://css-tricks.com/snippets/css/using-font-face/ */
@font-face {
font-family: "c64_pro";
src: url('fonts/c64_pro-style.eot');
src: url('fonts/c64_pro-style.eot?#iefix') format('embedded-opentype'),
url('fonts/c64_pro-style.woff2') format('woff2'),
url('fonts/c64_pro-style.woff') format('woff'),
url('fonts/c64_pro-style.ttf') format('truetype'),
url('fonts/c64_pro-style.svg#C64Pro') format('svg');
}
.site-title {
font-family: "c64_pro", "Noto Sans", sans-serif;
}
.site-description {
font-family: "c64_pro", "Noto Sans", sans-serif;
}
.widget-title {
font-family: "c64_pro", "Noto Sans", sans-serif;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment