mirror of
https://github.com/eigilnikolajsen/commit-mono.git
synced 2024-10-26 20:25:48 +03:00
v137, export ttfautohint, fewer instances
This commit is contained in:
parent
e824d27f0d
commit
26fcd12685
4
404.html
4
404.html
@ -19,9 +19,9 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "CommitMono";
|
||||
src: url("/src/fonts/fontlab/CommitMonoV136-VF.woff2");
|
||||
src: url("/src/fonts/fontlab/CommitMonoV137-VF.woff2");
|
||||
font-style: normal;
|
||||
font-weight: 450;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
body {
|
||||
|
12
index.html
12
index.html
@ -618,8 +618,8 @@
|
||||
<p id="custom_settings_feedback"><br /></p>
|
||||
<br />
|
||||
<p tabindex="0" data-edit="true">
|
||||
Changing the settings above changes the download. Recommended weight: 450 for
|
||||
dark mode, 500 for light mode. Alternate characters will be baked and features
|
||||
Changing the settings above changes the download. Recommended weight: 400 for
|
||||
dark mode, 450 for light mode. Alternate characters will be baked and features
|
||||
merged, resulting in a single static font file that is compatible in all
|
||||
environments. For an installation guide, see
|
||||
<button
|
||||
@ -684,13 +684,13 @@
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
CommitMono-450-Regular: Base version with settings and weight of
|
||||
CommitMono-400-Regular: Base version with settings and weight of
|
||||
your choice.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
CommitMono-450-Italic: Italic version, same weight as regular.
|
||||
CommitMono-400-Italic: Italic version, same weight as regular.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
@ -1197,14 +1197,14 @@
|
||||
<div tabindex="0" id="block_tab_end"></div>
|
||||
</div>
|
||||
<script>
|
||||
const versionOfCommitMono = "V136"
|
||||
const versionOfCommitMono = "V137"
|
||||
let fontsLoaded = false
|
||||
const commitMono = new FontFace(
|
||||
"CommitMono",
|
||||
`url(/src/fonts/fontlab/CommitMono${versionOfCommitMono}-VF.woff2)`,
|
||||
{
|
||||
style: "normal",
|
||||
weight: "450",
|
||||
weight: "400",
|
||||
}
|
||||
)
|
||||
// Add to the document.fonts (FontFaceSet)
|
||||
|
@ -2,7 +2,7 @@
|
||||
font-family: "CommitMonoLoading";
|
||||
src: url("data:font/woff2;charset=url-8;base64,d09GMk9UVE8AAAVoAAoAAAAACRAAAAUgAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYcqGhYGYACCcgE2AiQDIgQGBYQhByAbVAgRZJPTIvuRkLnpo1niWFGcZNnEK1FCUU4/x8PT2u/PnZ3dh6g3CJGQRBORpJVGg67f6q9Ns3ed4+/dNQeGD6Q1Nv+/r3HXBE48osgCyvt7NvUTYnINZZJwUNelEzGpqkxUH92fDB0zXaUP82xFMJQsXXOHVdpANttEIhM32xM/y6P+MHZhAh4hJxTKBbrhm89nfEyZeMKSimREp600nifplvNJJ34a/VkBz5F8L+EFZeCFSvKWUsig+NR/R0ZgyZDGIvDSwGSjyt9iLXIEIdUwnqN2Eiag0Go3YpZ2uyOTcHUKJe4KKRInfhZA3BH3KPTa1jUwMjW34E8oZC3tOm14RybSiV8CM8EswZ2BYK7G3WoT1eM4OBCww4CQ/0grvTR5bXZ2cnJ2ztqkpUvXrlvCqo+2rtrF72jXPnwM5x5SebwLrKI9x4/tO2lFSnl5RkqXP9vhF3Ul/HqgT++reCFN7bm85urm6zukd8WH8k80PNbBHMnbfi1Ygsk+Ewyn2MfivKuFiQ361vzVM1du3zn/BDf0iAjL9o2Z7Kaj8lzaxn2+WZ1am9An5uYS0pab2kJMyaNISGuk3cc/AwUa3/jsxbNaA1Zj1eQ+7hzYJknff3H9xQ2X10rviU83nGku0fFVXjj3lKRp3YzUkXqsdcIK7MlRebjPGywHbWdlRmsSq8ar2qD/nYftsKFtQpe269bK+0M6YduD7Q+pd0egDK7T4xblNzXn5TU15i0a6//gheO5RryXpn4MaUzfumjq+JV2jhNSy3PSk4u5wcn0rF1rF8/Uub+bADqw+Nr59fHICkywWC+mvh7ZsjskJtw/ONybOxYRfSpWD8SDuz8zjqTsjuUeteER4r7GX9u189IOPSYHDDabGjkvYx1XZeXVe3auX6lbE7Q5dh+rPn+TZ25+ASst7DVeZPWQegNkD97hJjbwq/CJoeD2h8EGMfUF5N3G9PKkdZlZiUm69/rEZcvXrV+2kBPb+W83Cdj1iIR6GEvzleUvdf2zV4KN6saCJDP1ekAs2yY5sGnDiY364WsyHnLqsB33IgA9hIPie6f1gCbJx/L2Ow0ZC4aw+PcjnpAAOfam9ahZa6dsYk8/GvQnTaw+eot3ukU0PYKqxySUHaWB+QwyMKhka5BhRmuDLakBSj/BFsBwt4SuEx+DCnLUP375st6AVedNNLhy6qPe3VO8n5zHhd5ivMo7ylty1Js/4w3T4gopc6PsthzOKW7fViozCyOr7ihV/Adj6KaLIAu6KMJTL+80vZKGuIJqm/Gc4ARBye4ep2gcIxAk2uHOt6z2oeI+AnMMHrwKfRBX1Yn/XgiqV+jDEvAAaUpQVMbhQqVPiQYFmGITYUPjK626Tk2Kq04ULit/PgOKGsEbWgtt27SjQ6fsHBgRZstv321OjERlQLEZl0IalH5zlJ/leblVov5H/A/7H/o/GFkrVe6Hj7cN3r2/07C4d8BPVfUG4UvYu0B7XoTTKBQvTgILkkKgWl1ZeII95O98bdJy+6Y6fmDlb51Xaocv2hU3QDqOGmDnfJm6PNe1hP6x6pJWSEiBbFwE1Lptypq0/jU2kWUoLNhDkPS4AZUzL5Bt+YHaRHDSBhKjb+N2c7H+U0jpsxD/Imn8NZKvzdrGzuo09DDFCJvgDVwXEcOKxvB0IrnZ0UzDHZbzF5JiEhhaTrOlQlHaWpaS0GVp19ozUcDlJtuojBhThsdj6sLDGy/MoCNODT2409BVrVsWGh9kAA==");
|
||||
font-style: normal;
|
||||
font-weight: 450;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
*,
|
||||
|
@ -150,7 +150,7 @@ a:focus,
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
font-variation-settings: "wght" 450, "ital" 1;
|
||||
font-variation-settings: "wght" 400, "ital" 1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
BIN
src/fonts/CommitMono-1.137.zip
Normal file
BIN
src/fonts/CommitMono-1.137.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
{"weight":450,"italic":false,"alternates":{"cv01":false,"cv02":false,"cv03":false,"cv04":false,"cv05":false,"cv06":false,"cv07":false,"cv08":false,"cv09":false},"features":{"ss01":false,"ss02":false,"ss03":true,"ss04":true,"ss05":true},"letterSpacing":0,"lineHeight":1}
|
@ -1,25 +0,0 @@
|
||||
A short guide for how to install and enable your shiny new version of Commit Mono.
|
||||
This is taken from section 08 Install from https://commitmono.com/
|
||||
|
||||
#1 (Download the fonts)
|
||||
#2 Unzip the fonts. You'll see 4 font files. These 4 fonts make up a 'Style Group':
|
||||
* CommitMono-Regular: Base version with settings and weight of your choice.
|
||||
* CommitMono-Italic: An italic version, same weight as regular.
|
||||
* CommitMono-Bold: A bold version, weight 700.
|
||||
* CommitMono-BoldItalic: A bold version, weight 700, that is also italic.
|
||||
#3 Install all 4 fonts on your system:
|
||||
* Windows: Right click the font in the folder and click "Install".
|
||||
* Mac: Open fonts with Font Book from the folder and click "Install".
|
||||
* Linux: Unpack fonts to ~/.local/share/fonts (or /usr/share/fonts to install
|
||||
fonts system-wide) then fc-cache -f -v
|
||||
#4 Restart your editor/IDE.
|
||||
#5 Activate Commit Mono in your editor.
|
||||
Settings/Preferences → Editor → Font: Pick ‘CommitMono’ from the list (notice:
|
||||
there is no space). If you’re using VS Code, simply add these two lines to the
|
||||
settings.json file:
|
||||
"editor.fontFamily": "CommitMono",
|
||||
"editor.fontLigatures": true,
|
||||
|
||||
For a comprehensive guide on how to enable features/ligatures in your specific
|
||||
editor/IDE, refer to Fira Code wiki:
|
||||
https://github.com/tonsky/FiraCode/wiki#enabling-ligatures
|
@ -1,90 +0,0 @@
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-200Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-200Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-200Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-200Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-250Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-250Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-250Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-250Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-300Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-300Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-300Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-300Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-350Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-350Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-350Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-350Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-400Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-400Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-400Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-400Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-450Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-450Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-450Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-450Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-500Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-500Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-500Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-500Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-550Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-550Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-550Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-550Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-600Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-600Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-600Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-600Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-650Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-650Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-650Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-650Regular.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-700Italic.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-700Italic.otf
Normal file
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-700Regular.otf
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-700Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/fonts/fontlab/CommitMonoV137-VF.woff2
Normal file
BIN
src/fonts/fontlab/CommitMonoV137-VF.woff2
Normal file
Binary file not shown.
@ -54,7 +54,7 @@ async function updateCodeFont() {
|
||||
})
|
||||
.catch((err) => console.log(err))
|
||||
// opentype
|
||||
// .load("src/fonts/fontlab/CommitMonoV136-500Regular.otf")
|
||||
// .load("src/fonts/fontlab/CommitMonoV137-500Regular.otf")
|
||||
// .then((font) => {
|
||||
// console.log(font)
|
||||
// console.log(font.toTables())
|
||||
|
@ -1,5 +1,5 @@
|
||||
const downloadSettingsCustom = {
|
||||
weight: 450,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
alternates: {},
|
||||
features: {},
|
||||
@ -7,7 +7,7 @@ const downloadSettingsCustom = {
|
||||
lineHeight: 1,
|
||||
}
|
||||
const downloadSettingsDefault = {
|
||||
weight: 450,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
alternates: {},
|
||||
features: {},
|
||||
@ -72,7 +72,7 @@ async function downloadFont(kindOfDownload, button) {
|
||||
}
|
||||
}
|
||||
if (kindOfDownload === "design") {
|
||||
for (let weight = 300; weight <= 700; weight += 25) {
|
||||
for (let weight = 200; weight <= 700; weight += 50) {
|
||||
allSettings[weight + "Regular"] = {
|
||||
...downloadSettingsCustom,
|
||||
style: weight + "Regular",
|
||||
@ -118,7 +118,7 @@ function makeCustomFont(settings) {
|
||||
const fontWeight = settings.weight
|
||||
const fontItalic = settings.italic ? "Italic" : "Regular"
|
||||
const fontFilePath = `${fontBaseURL}${fontName}-${fontWeight}${fontItalic}.otf`
|
||||
// "/src/fonts/fontlab/CommitMonoV132-450Italic.otf"
|
||||
// "/src/fonts/fontlab/CommitMonoV132-400Italic.otf"
|
||||
|
||||
return opentype
|
||||
.load(fontFilePath)
|
||||
|
@ -193,7 +193,7 @@ function updateFont(event, form) {
|
||||
input.classList.add("loading_font")
|
||||
const outputFont = new FontFace(output, `url(/src/fonts/other/${output}.woff2)`, {
|
||||
style: "normal",
|
||||
weight: "450",
|
||||
weight: "400",
|
||||
})
|
||||
document.fonts.add(outputFont)
|
||||
outputFont.load()
|
||||
|
@ -162,13 +162,13 @@ function keyDown(e) {
|
||||
}
|
||||
|
||||
if (e.key == "b" || e.key == "l") {
|
||||
if (e.key == "b") websiteData.weight = websiteData.weight == 700 ? 700 : websiteData.weight + 25
|
||||
if (e.key == "l") websiteData.weight = websiteData.weight == 300 ? 300 : websiteData.weight - 25
|
||||
if (e.key == "b") websiteData.weight = websiteData.weight == 700 ? 700 : websiteData.weight + 50
|
||||
if (e.key == "l") websiteData.weight = websiteData.weight == 200 ? 200 : websiteData.weight - 50
|
||||
updateCodeFont()
|
||||
document.querySelector("body").style.fontVariationSettings = `"wght" ${websiteData.weight}, "ital" ${
|
||||
websiteData.italic ? "1" : "0"
|
||||
}`
|
||||
showHideChangeSettings(`Weight: ${websiteData.weight}. Def: 450, Min: 300, Max: 700.`)
|
||||
showHideChangeSettings(`Weight: ${websiteData.weight}. Def: 400, Min: 200, Max: 700.`)
|
||||
document.forms["weight_form"][`weight_${websiteData.weight}`].checked = true
|
||||
updateWeight(null, weightForm)
|
||||
}
|
||||
@ -345,8 +345,8 @@ function pushPage(key) {
|
||||
document.querySelector("#canvas").style.transform = "scale(1)"
|
||||
rem = 16
|
||||
document.documentElement.style.fontSize = "16px"
|
||||
websiteData.weight = 450
|
||||
document.querySelector("body").style.fontVariationSettings = `"wght" 450`
|
||||
websiteData.weight = 400
|
||||
document.querySelector("body").style.fontVariationSettings = `"wght" 400`
|
||||
document.forms["weight_form"][`weight_${websiteData.weight}`].checked = true
|
||||
codeExample.style.fontFamily = "CommitMono"
|
||||
document.querySelector("#font_name").value = ""
|
||||
@ -472,8 +472,8 @@ function checkTutorialKeys(e) {
|
||||
tutorialFinished = true
|
||||
const tutorialContainer = document.querySelector("#tutorial_complete")
|
||||
tutorialContainer.innerHTML = `<p>Tutorial complete! Your present is the variable version of Commit Mono:</p>
|
||||
<p><a href="/src/fonts/fontlab/CommitMonoV136-VF.ttf" tabindex="0">Download CommitMono-VF.ttf</a></p>
|
||||
<p><a href="/src/fonts/fontlab/CommitMonoV136-VF.woff2" tabindex="0">Download CommitMono-VF.woff2</a></p>
|
||||
<p><a href="/src/fonts/fontlab/CommitMonoV137-VF.ttf" tabindex="0">Download CommitMono-VF.ttf</a></p>
|
||||
<p><a href="/src/fonts/fontlab/CommitMonoV137-VF.woff2" tabindex="0">Download CommitMono-VF.woff2</a></p>
|
||||
<br />`
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ const websiteData = {
|
||||
distance: 64,
|
||||
scaleOffset: 1.5,
|
||||
},
|
||||
weight: 450,
|
||||
weight: 400,
|
||||
letterSpacing: 0,
|
||||
lineHeight: 1,
|
||||
fontName: "CommitMono",
|
||||
@ -324,25 +324,7 @@ Tip: Press <span class="span_key">M</span> to switch between light and dark mode
|
||||
id: "menlo",
|
||||
},
|
||||
],
|
||||
weights: [
|
||||
"300",
|
||||
"325",
|
||||
"350",
|
||||
"375",
|
||||
"400",
|
||||
"425",
|
||||
"450",
|
||||
"475",
|
||||
"500",
|
||||
"525",
|
||||
"550",
|
||||
"575",
|
||||
"600",
|
||||
"625",
|
||||
"650",
|
||||
"675",
|
||||
"700",
|
||||
],
|
||||
weights: ["200", "250", "300", "350", "400", "450", "500", "550", "600", "650", "700"],
|
||||
features: [
|
||||
{
|
||||
type: "alternate",
|
||||
@ -547,7 +529,7 @@ fibonacci(num)
|
||||
@font-face {
|
||||
font-family: "Commit Mono";
|
||||
src: url("/fonts/CommitMono.woff2");
|
||||
font-weight: 450;
|
||||
font-weight: 400;
|
||||
}
|
||||
:root {
|
||||
--grey: #aaa;
|
||||
|
@ -8,7 +8,7 @@
|
||||
@font-face {
|
||||
font-family: "CommitMono";
|
||||
src: url("/fonts/CommitMono.woff2");
|
||||
font-weight: 450;
|
||||
font-weight: 400;
|
||||
}
|
||||
:root {
|
||||
--grey: #aaa;
|
||||
|
@ -1,22 +1,29 @@
|
||||
# step 1: empty src/fonts/export
|
||||
# step 2: drag contents of export on website to src/fonts/export
|
||||
# step 3: make sure fontforge and ttfautohint is installed
|
||||
# step 4: run this
|
||||
# step 1: export default from website an place in src/fonts/website-export/CommitMono.zip
|
||||
# step 2: make sure fontforge and ttfautohint is installed
|
||||
# step 3: run this from the root directory
|
||||
|
||||
rm src/fonts/CommitMono.zip
|
||||
mkdir src/fonts/export/ttfautohint
|
||||
fontforge -lang ff -c 'Open("src/fonts/export/CommitMono-450-Regular.otf"); Generate("src/fonts/export/CommitMono-450-Regular-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("src/fonts/export/CommitMono-450-Italic.otf"); Generate("src/fonts/export/CommitMono-450-Italic-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("src/fonts/export/CommitMono-700-Regular.otf"); Generate("src/fonts/export/CommitMono-700-Regular-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("src/fonts/export/CommitMono-700-Italic.otf"); Generate("src/fonts/export/CommitMono-700-Italic-unhinted.ttf")'
|
||||
ttfautohint -R src/fonts/export/CommitMono-450-Regular-unhinted.ttf -a sss src/fonts/export/CommitMono-450-Regular-unhinted.ttf src/fonts/export/ttfautohint/CommitMono-450-Regular.ttf
|
||||
ttfautohint -R src/fonts/export/CommitMono-450-Regular-unhinted.ttf -a sss src/fonts/export/CommitMono-450-Italic-unhinted.ttf src/fonts/export/ttfautohint/CommitMono-450-Italic.ttf
|
||||
ttfautohint -R src/fonts/export/CommitMono-450-Regular-unhinted.ttf -a sss src/fonts/export/CommitMono-700-Regular-unhinted.ttf src/fonts/export/ttfautohint/CommitMono-700-Regular.ttf
|
||||
ttfautohint -R src/fonts/export/CommitMono-450-Regular-unhinted.ttf -a sss src/fonts/export/CommitMono-700-Italic-unhinted.ttf src/fonts/export/ttfautohint/CommitMono-700-Italic.ttf
|
||||
rm src/fonts/export/CommitMono-450-Regular-unhinted.ttf
|
||||
rm src/fonts/export/CommitMono-450-Italic-unhinted.ttf
|
||||
rm src/fonts/export/CommitMono-700-Regular-unhinted.ttf
|
||||
rm src/fonts/export/CommitMono-700-Italic-unhinted.ttf
|
||||
zip -r src/fonts/CommitMono.zip src/fonts/export
|
||||
rm src/fonts/*.zip
|
||||
mkdir src/fonts/CommitMono-1.137
|
||||
mv src/fonts/website-export/CommitMono.zip src/fonts/CommitMono-1.137/CommitMono.zip
|
||||
cd src/fonts/CommitMono-1.137
|
||||
unzip CommitMono.zip
|
||||
mkdir ttfautohint
|
||||
fontforge -lang ff -c 'Open("CommitMono-400-Regular.otf"); Generate("CommitMono-400-Regular-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("CommitMono-400-Italic.otf"); Generate("CommitMono-400-Italic-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("CommitMono-700-Regular.otf"); Generate("CommitMono-700-Regular-unhinted.ttf")'
|
||||
fontforge -lang ff -c 'Open("CommitMono-700-Italic.otf"); Generate("CommitMono-700-Italic-unhinted.ttf")'
|
||||
ttfautohint -R CommitMono-400-Regular-unhinted.ttf -a sss CommitMono-400-Regular-unhinted.ttf ttfautohint/CommitMono-400-Regular.ttf
|
||||
ttfautohint -R CommitMono-400-Regular-unhinted.ttf -a sss CommitMono-400-Italic-unhinted.ttf ttfautohint/CommitMono-400-Italic.ttf
|
||||
ttfautohint -R CommitMono-400-Regular-unhinted.ttf -a sss CommitMono-700-Regular-unhinted.ttf ttfautohint/CommitMono-700-Regular.ttf
|
||||
ttfautohint -R CommitMono-400-Regular-unhinted.ttf -a sss CommitMono-700-Italic-unhinted.ttf ttfautohint/CommitMono-700-Italic.ttf
|
||||
rm CommitMono-400-Regular-unhinted.ttf
|
||||
rm CommitMono-400-Italic-unhinted.ttf
|
||||
rm CommitMono-700-Regular-unhinted.ttf
|
||||
rm CommitMono-700-Italic-unhinted.ttf
|
||||
cd ..
|
||||
zip -vr CommitMono-1.137.zip CommitMono-1.137/ -x "*.DS_Store"
|
||||
rm -R CommitMono-1.137
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
# step 5: upload src/fonts/CommitMono.zip to GitHub
|
||||
# step 4: upload src/fonts/CommitMono.zip to GitHub
|
@ -1,3 +1,4 @@
|
||||
#1 Place file in Downloads
|
||||
#2 Navigate to /Developer/woff2
|
||||
#3 ./woff2_compress ~/Downloads/CommitMonoV136-VF.ttf
|
||||
#3
|
||||
~/Developer/woff2/woff2_compress ~/Library/CloudStorage/Dropbox/Privat/Eigils\ ting/projects/typography/Font\ Projects/code-mono-font/commit-mono/export/CommitMonoV137/CommitMonoV137-VF.ttf
|
Loading…
Reference in New Issue
Block a user