Verified Commit 760dbf25 authored by doshitan's avatar doshitan

Merriweather update

parent 29da3df7
......@@ -11,9 +11,9 @@
font-family: "Merriweather";
font-style: italic;
font-weight: 400;
src: url(/assets/font/Merriweather-Italic.subset.woff2) format("woff2"),
url(/assets/font/Merriweather-Italic.subset.woff) format("woff"),
url(/assets/font/Merriweather-Italic.subset.otf) format("opentype");
src: url(/assets/font/MerriweatherItalic-Italic.subset.woff2) format("woff2"),
url(/assets/font/MerriweatherItalic-Italic.subset.woff) format("woff"),
url(/assets/font/MerriweatherItalic-Italic.subset.otf) format("opentype");
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
......
......@@ -27,7 +27,7 @@
<link rel="preload" href='$route("assets/font/fontello.woff2")$' as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href='$route("assets/font/Merriweather-Regular.subset.woff2")$' as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href='$route("assets/font/Merriweather-Italic.subset.woff2")$' as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href='$route("assets/font/MerriweatherItalic-Italic.subset.woff2")$' as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href='$route("assets/css/main.css")$' as="style" type="text/css">
<link rel="preload" href='$route("assets/js/main.js")$' as="script">
......
......@@ -11,11 +11,11 @@ let
merriweather = oldPkgs.stdenv.mkDerivation rec {
name = "merriweather-${version}";
version = "2.003";
version = "2.004";
src = oldPkgs.fetchurl {
url = "https://github.com/EbenSorkin/Merriweather/archive/a792c77e48a672b821c0a4f98900ed39b6b0b3e9.tar.gz";
sha256 = "1zy25apa5dvk4rzk29iyahxqqcbm988vn3ipz4csdlwkabsjmi9s";
url = "https://github.com/SorkinType/Merriweather/archive/a9c40e285a18e410a6177609ecb7bb03724dded7.tar.gz";
sha256 = "0ksy69q4b4gan38xjc77yfryy0j6y1m195y6xym6946318qwpp1i";
};
phases = [ "unpackPhase" "installPhase" ];
......
......@@ -4,31 +4,31 @@
: "${MERRIWEATHER_DEST_DIR:=./.merriweather/subset_fonts}"
DEST_FONT_DIR=$MERRIWEATHER_DEST_DIR/font
: "${MERRIWEATHER_FONT_VERS:=Regular Italic Bold}"
: "${MERRIWEATHER_FONT_VERS:=-Regular Italic-Italic -Bold}"
# : "${MERRIWEATHER_SUBSET_RANGE:=U+01A0-007E,U+2018-2026}"
# : "${MERRIWEATHER_SUBSET_RANGE:=U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}"
: "${MERRIWEATHER_SUBSET_RANGE:=U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}"
function srcFileForVer {
echo $MERRIWEATHER_SRC_DIR/otf/Merriweather-$FONTVER.otf
echo $MERRIWEATHER_SRC_DIR/otf/Merriweather$FONTVER.otf
}
function destFilenameForVer {
local fileExt=$1
echo Merriweather-$FONTVER.subset.$fileExt
echo Merriweather$FONTVER.subset.$fileExt
}
function fontStyleForVer {
case $FONTVER in
Italic) echo "italic" ;;
Italic-Italic) echo "italic" ;;
*) echo "normal" ;;
esac
}
function fontWeightForVer {
case $FONTVER in
Bold) echo "700" ;;
-Bold) echo "700" ;;
*) echo "400" ;;
esac
}
......@@ -39,7 +39,7 @@ mkdir -p $DEST_FONT_DIR
rm -f $MERRIWEATHER_DEST_DIR/merriweather.css
for FONTVER in $MERRIWEATHER_FONT_VERS ; do
echo "processing $FONTVER"
echo "processing $FONTVER: $(srcFileForVer)"
pyftsubset $(srcFileForVer) --output-file=$DEST_FONT_DIR/$(destFilenameForVer "otf") --unicodes=$MERRIWEATHER_SUBSET_RANGE
pyftsubset $(srcFileForVer) --output-file=$DEST_FONT_DIR/$(destFilenameForVer "woff") --flavor=woff --unicodes=$MERRIWEATHER_SUBSET_RANGE
pyftsubset $(srcFileForVer) --output-file=$DEST_FONT_DIR/$(destFilenameForVer "woff2") --flavor=woff2 --unicodes=$MERRIWEATHER_SUBSET_RANGE
......
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