Skip to content

Commit fcdee81

Browse files
add Greek support in font, fix charset
1 parent e53f9d9 commit fcdee81

File tree

80 files changed

+83
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+83
-46
lines changed

index.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,10 @@ <h2>Activate Commit Mono in your editor.</h2>
943943
</div>
944944
<div class="docs_container" id="charset_container_docs">
945945
<h2 tabindex="0" data-edit="true">Full characterset without alternates</h2>
946-
<p tabindex="0" data-edit="true">Support for Greek and Cyrillic coming soon.</p>
946+
<p tabindex="0" data-edit="true" class="new_label">
947+
Added support for Greek. Καλώς ήρθες, απόλαυσε!
948+
</p>
949+
<p tabindex="0" data-edit="true">Support for Cyrillic coming soon.</p>
947950
<br />
948951
<div id="charset" tabindex="0" data-edit="true"></div>
949952
<p tabindex="0" data-edit="true">End of transmission.</p>
@@ -1181,7 +1184,7 @@ <h2>Programs used</h2>
11811184
<div tabindex="0" id="block_tab_end"></div>
11821185
</div>
11831186
<script>
1184-
const versionOfCommitMono = "V134"
1187+
const versionOfCommitMono = "V135"
11851188
let fontsLoaded = false
11861189
const commitMono = new FontFace("CommitMono", `url(/src/fonts/CommitMono${versionOfCommitMono}-VF.woff2)`, {
11871190
style: "normal",

src/css/section_9.css

+26-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,34 @@ h2:focus .active_feature {
3737

3838
#charset {
3939
width: var(--max-width);
40+
width: 32ch;
4041
font-variant-ligatures: none;
4142
white-space: pre-wrap;
42-
font-size: 3rem;
43-
line-height: 4rem;
43+
font-size: 5rem;
44+
line-height: 5rem;
45+
display: grid;
46+
grid-template-columns: repeat(10, 1ch);
47+
gap: 1ch;
48+
}
49+
50+
#charset .charset_letter {
51+
/* background-color: blue; */
52+
font-size: inherit;
53+
width: fit-content;
54+
line-height: inherit;
55+
}
56+
57+
.new_label {
58+
position: relative;
59+
}
60+
61+
.new_label::before {
62+
content: "NEW";
63+
font-size: 0.66rem;
64+
background: var(--text);
65+
color: var(--bg);
66+
position: relative;
67+
padding: 0 0.5ch;
4468
}
4569

4670
#language_support {

src/features/ss01_less_equal.fea

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ feature ss01 {
1212

1313
sub @space_actor less' equal @space_actor by less_equal.liga;
1414
sub @space_actor less_equal.liga equal' @space_actor by space;
15+
sub @space_actor [less.arrow_start_equal less.arrow_start_equal.case]' [equal.arrow equal.arrow.case] @space_actor by less_equal.liga;
16+
sub @space_actor less_equal.liga [equal.arrow equal.arrow.case]' @space_actor by space;
1517

1618
sub @space_actor greater' equal @space_actor by greater_equal.liga;
1719
sub @space_actor greater_equal.liga equal' @space_actor by space;
-136 KB
Binary file not shown.
-132 KB
Binary file not shown.
-139 KB
Binary file not shown.
-132 KB
Binary file not shown.
-139 KB
Binary file not shown.
-133 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-139 KB
Binary file not shown.
-132 KB
Binary file not shown.
-139 KB
Binary file not shown.
-133 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-139 KB
Binary file not shown.
-133 KB
Binary file not shown.
-139 KB
Binary file not shown.
-132 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-138 KB
Binary file not shown.
-133 KB
Binary file not shown.
-139 KB
Binary file not shown.
-134 KB
Binary file not shown.
-139 KB
Binary file not shown.
-134 KB
Binary file not shown.
-139 KB
Binary file not shown.
-135 KB
Binary file not shown.
-137 KB
Binary file not shown.
-134 KB
Binary file not shown.

src/fonts/CommitMonoV134-VF.woff2

-75.9 KB
Binary file not shown.
141 KB
Binary file not shown.
136 KB
Binary file not shown.
144 KB
Binary file not shown.
136 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
138 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
144 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
137 KB
Binary file not shown.
143 KB
Binary file not shown.
138 KB
Binary file not shown.
144 KB
Binary file not shown.
139 KB
Binary file not shown.
144 KB
Binary file not shown.
139 KB
Binary file not shown.
144 KB
Binary file not shown.
139 KB
Binary file not shown.
142 KB
Binary file not shown.
139 KB
Binary file not shown.
Binary file not shown.

src/fonts/CommitMonoV135-VF.woff2

81.2 KB
Binary file not shown.

src/js/code_section.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function updateCodeFont() {
5454
})
5555
.catch((err) => console.log(err))
5656
// opentype
57-
// .load("src/fonts/CommitMonoV134-500Regular.otf")
57+
// .load("src/fonts/CommitMonoV135-500Regular.otf")
5858
// .then((font) => {
5959
// console.log(font)
6060
// console.log(font.toTables())

src/js/docs_section.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ function buildDocs() {
6363
})
6464
const charset = document.querySelector("#charset")
6565
const tunedCharset = docsContent.charset.split("").join(" ")
66-
charset.textContent = tunedCharset
66+
docsContent.charset.split("").forEach((char) => {
67+
const span = document.createElement("p")
68+
span.classList.add("charset_letter")
69+
span.textContent = char
70+
charset.append(span)
71+
})
72+
// charset.textContent = tunedCharset
6773

6874
const languageSupport = document.querySelector("#language_support")
6975
docsContent.supportedLanguages.forEach((language) => {

src/js/download_wizard.js

+38-36
Original file line numberDiff line numberDiff line change
@@ -127,47 +127,49 @@ function makeCustomFont(settings) {
127127
// #1 change alternates by switching their paths
128128
// the below loop does this
129129
// loop through the alternate settings
130-
Object.entries(settings.alternates).forEach(([alternate, active]) => {
131-
//
132-
// filter for only the active ones
133-
if (!active) return
134-
// // console.log("alternate", alternate, "active", active)
135-
136-
// look at all the fonts features
137-
font.tables.gsub.features.forEach((feature) => {
130+
Object.entries(settings.alternates)
131+
.toReversed() // to make the alt g override the italic g
132+
.forEach(([alternate, active]) => {
138133
//
139-
// if the feature matches the alternate we're currently on
140-
if (feature.tag == alternate) {
141-
// // console.log("feature", feature)
134+
// filter for only the active ones
135+
if (!active) return
136+
// // console.log("alternate", alternate, "active", active)
142137

143-
// then loop through the list of lookup indexes of that feature
144-
feature.feature.lookupListIndexes.forEach((lookupIndex) => {
145-
// // console.log("lookupIndex", lookupIndex)
146-
147-
// loop through the subtable of each lookup at the lookup index
148-
font.tables.gsub.lookups[lookupIndex].subtables.forEach((subtable) => {
149-
// // console.log("subtable", subtable)
150-
151-
// loop through the glyphs of the subtable
152-
subtable.coverage.glyphs.forEach((glyphIndexOriginal, index) => {
153-
//
154-
// glyphIndexOriginal is the index of the original glyph
155-
// glyphIndexSubstitute is the index of the glyph to substitute the original with
156-
const glyphIndexSubstitute = subtable.substitute[index]
157-
158-
// get the paths for the original and the substitute glyph
159-
const glyphPathOriginal = font.glyphs.glyphs[glyphIndexOriginal].path
160-
const glyphPathSubstitute = font.glyphs.glyphs[glyphIndexSubstitute].path
161-
162-
// swap the paths, so the original glyph gets the path of the substitute and vice versa
163-
font.glyphs.glyphs[glyphIndexOriginal].path = glyphPathSubstitute
164-
font.glyphs.glyphs[glyphIndexSubstitute].path = glyphPathOriginal
138+
// look at all the fonts features
139+
font.tables.gsub.features.forEach((feature) => {
140+
//
141+
// if the feature matches the alternate we're currently on
142+
if (feature.tag == alternate) {
143+
// // console.log("feature", feature)
144+
145+
// then loop through the list of lookup indexes of that feature
146+
feature.feature.lookupListIndexes.forEach((lookupIndex) => {
147+
// // console.log("lookupIndex", lookupIndex)
148+
149+
// loop through the subtable of each lookup at the lookup index
150+
font.tables.gsub.lookups[lookupIndex].subtables.forEach((subtable) => {
151+
// // console.log("subtable", subtable)
152+
153+
// loop through the glyphs of the subtable
154+
subtable.coverage.glyphs.forEach((glyphIndexOriginal, index) => {
155+
//
156+
// glyphIndexOriginal is the index of the original glyph
157+
// glyphIndexSubstitute is the index of the glyph to substitute the original with
158+
const glyphIndexSubstitute = subtable.substitute[index]
159+
160+
// get the paths for the original and the substitute glyph
161+
const glyphPathOriginal = font.glyphs.glyphs[glyphIndexOriginal].path
162+
const glyphPathSubstitute = font.glyphs.glyphs[glyphIndexSubstitute].path
163+
164+
// swap the paths, so the original glyph gets the path of the substitute and vice versa
165+
font.glyphs.glyphs[glyphIndexOriginal].path = glyphPathSubstitute
166+
font.glyphs.glyphs[glyphIndexSubstitute].path = glyphPathOriginal
167+
})
165168
})
166169
})
167-
})
168-
}
170+
}
171+
})
169172
})
170-
})
171173

172174
// change width
173175
const defaultWidth = 600

src/js/nav.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ function checkTutorialKeys(e) {
472472
tutorialFinished = true
473473
const tutorialContainer = document.querySelector("#tutorial_complete")
474474
tutorialContainer.innerHTML = `<p>Tutorial complete! Your present is the variable version of Commit Mono:</p>
475-
<p><a href="/src/fonts/CommitMonoV134-VF.ttf" tabindex="0">Download CommitMono-VF.ttf</a></p>
476-
<p><a href="/src/fonts/CommitMonoV134-VF.woff2" tabindex="0">Download CommitMono-VF.woff2</a></p>
475+
<p><a href="/src/fonts/CommitMonoV135-VF.ttf" tabindex="0">Download CommitMono-VF.ttf</a></p>
476+
<p><a href="/src/fonts/CommitMonoV135-VF.woff2" tabindex="0">Download CommitMono-VF.woff2</a></p>
477477
<br />`
478478
}
479479
}

src/js/website_data.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/txt/woff2_conversion_guide.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#1 Place file in Downloads
22
#2 Navigate to /Developer/woff2
3-
#3 ./woff2_compress ~/Downloads/CommitMonoV134-VF.otf
3+
#3 ./woff2_compress ~/Downloads/CommitMonoV135-VF.ttf

0 commit comments

Comments
 (0)