Skip to content

Commit daa41fe

Browse files
Ilija BoshkovIlija Boshkov
authored andcommitted
Improve demo spacing, add contributors, scope npm package
- Add default letter-spacing to .segment classes and increase demo tracking - Credit Mila Jovanovikj (digits) and Ilija Boshkov (demo/packaging) - Rename package to @42mk/segment and update all references - Wire npm publish into release workflow; add engines and repo metadata - README: fix glyph count to 62, document digits and scoped install
1 parent a5e0e3d commit daa41fe

76 files changed

Lines changed: 125 additions & 1239 deletions

Some content is hidden

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

.claude/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{
5+
"name": "demo",
6+
"runtimeExecutable": "npx",
7+
"runtimeArgs": ["--yes", "http-server", ".", "-p", "8090", "-c-1"],
8+
"port": 8090
9+
}
10+
]
11+
}

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: write
9+
id-token: write
910

1011
jobs:
1112
release:
@@ -17,6 +18,7 @@ jobs:
1718
with:
1819
node-version: 20
1920
cache: npm
21+
registry-url: "https://registry.npmjs.org"
2022

2123
- run: npm ci
2224
- run: npm run build
@@ -41,3 +43,8 @@ jobs:
4143
segment-font-${{ github.ref_name }}.tar.gz
4244
dist/segment.woff2
4345
dist/segment.ttf
46+
47+
- name: Publish to npm
48+
run: npm publish
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
A custom display font, packaged for web distribution.
44

5-
52 glyphs — uppercase `A``Z` (`U+0041``U+005A`) and lowercase `a``z`
6-
(`U+0061``U+007A`). Ships as `woff2`, `woff`, `ttf`, and `svg` with a
7-
ready-to-use CSS file.
5+
62 glyphs — uppercase `A``Z` (`U+0041``U+005A`), lowercase `a``z`
6+
(`U+0061``U+007A`), and digits `0``9` (`U+0030``U+0039`). Ships as
7+
`woff2`, `woff`, `ttf`, and `svg` with a ready-to-use CSS file.
88

99
## Quick start
1010

1111
```bash
12-
npm install segment-font
12+
npm install @42mk/segment
1313
```
1414

1515
```css
16-
@import "segment-font/css";
16+
@import "@42mk/segment/css";
1717

1818
.label {
1919
font-family: "Segment", sans-serif;
@@ -27,8 +27,8 @@ The imported CSS defines the `@font-face` and a `.segment` helper class.
2727
Clone the repo and run the demo page:
2828

2929
```bash
30-
git clone <repo-url> segment-font
31-
cd segment-font
30+
git clone https://github.com/42dotmk/Segment.git segment
31+
cd segment
3232
npm install
3333
npm run build
3434
npm run demo
@@ -37,7 +37,7 @@ npm run demo
3737
Then open <http://localhost:8080>.
3838

3939
The demo (`demo/index.html`) shows a pangram, a live input tester, and the
40-
full A–Z / a–z glyph grid with codepoint labels. It loads fonts directly
40+
full A–Z / a–z / 0–9 glyph grid with codepoint labels. It loads fonts directly
4141
from `dist/`, so you must `npm run build` at least once before starting it.
4242

4343
Any static server works — `npm run demo` just wraps `npx http-server demo`.
@@ -47,26 +47,26 @@ Any static server works — `npm run demo` just wraps `npx http-server demo`.
4747
### As an npm package
4848

4949
```bash
50-
npm install segment-font
50+
npm install @42mk/segment
5151
```
5252

5353
Available subpath exports:
5454

55-
| Import | File |
56-
| ------------------------------ | ------------------------- |
57-
| `segment-font` / `.../css` | `dist/segment.css` |
58-
| `segment-font/woff2` | `dist/segment.woff2` |
59-
| `segment-font/woff` | `dist/segment.woff` |
60-
| `segment-font/ttf` | `dist/segment.ttf` |
61-
| `segment-font/svg` | `dist/segment.svg` |
62-
| `segment-font/glyph-map` | `dist/glyph-map.json` |
55+
| Import | File |
56+
| ------------------------------- | ------------------------- |
57+
| `@42mk/segment` / `.../css` | `dist/segment.css` |
58+
| `@42mk/segment/woff2` | `dist/segment.woff2` |
59+
| `@42mk/segment/woff` | `dist/segment.woff` |
60+
| `@42mk/segment/ttf` | `dist/segment.ttf` |
61+
| `@42mk/segment/svg` | `dist/segment.svg` |
62+
| `@42mk/segment/glyph-map` | `dist/glyph-map.json` |
6363

6464
### Direct file reference
6565

6666
```html
67-
<link rel="preload" href="/segment-font/dist/segment.woff2"
67+
<link rel="preload" href="/@42mk/segment/dist/segment.woff2"
6868
as="font" type="font/woff2" crossorigin>
69-
<link rel="stylesheet" href="/segment-font/dist/segment.css">
69+
<link rel="stylesheet" href="/@42mk/segment/dist/segment.css">
7070
```
7171

7272
## Build from source
@@ -109,8 +109,11 @@ Node.js 18+ (ESM build scripts).
109109
## Credits
110110

111111
- **Original design:** Pavlina Buchevska — designed the original SVG glyphs.
112+
- **Number glyphs:** Mila Jovanovikj — designed the digit glyphs `0``9`.
112113
- **Font conversion & packaging:** [Darko Bozhinovski](https://darko.io)
113114
converted the original SVG design into a distributable web font.
115+
- **Demo page & packaging fixes:** Ilija Boshkov — built the demo/landing
116+
page and tidied up the npm packaging.
114117

115118
## License
116119

demo/index.html

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
font-size: clamp(4rem, 14vw, 11rem);
317317
font-weight: 1;
318318
line-height: 1;
319-
letter-spacing: 0.04em;
319+
letter-spacing: 0.08em;
320320
margin-bottom: 1.5rem;
321321
word-break: break-all;
322322
}
@@ -484,6 +484,7 @@
484484
width: 100%;
485485
font-family: "Segment", sans-serif;
486486
font-size: clamp(2rem, 6vw, 4.5rem);
487+
letter-spacing: 0.06em;
487488
padding: 1rem 1.25rem;
488489
background: var(--dark-700);
489490
border: 1px solid var(--border);
@@ -560,7 +561,7 @@
560561
font-family: "Segment", sans-serif;
561562
font-size: 5rem;
562563
line-height: 1.15;
563-
letter-spacing: 0.03em;
564+
letter-spacing: 0.06em;
564565
word-break: break-word;
565566
padding: 2rem;
566567
background: var(--dark-800);
@@ -832,6 +833,7 @@
832833
.marquee-item {
833834
font-family: "Segment", sans-serif;
834835
font-size: clamp(2rem, 4vw, 3.5rem);
836+
letter-spacing: 0.08em;
835837
white-space: nowrap;
836838
color: var(--text-muted);
837839
transition: color 0.3s;
@@ -960,7 +962,7 @@ <h1 class="hero__title"><span class="hero__title-cyan">Seg</span><span class="he
960962
</svg>
961963
View on GitHub
962964
</a>
963-
<a href="https://www.npmjs.com/package/segment-font" class="btn btn--outline">
965+
<a href="https://www.npmjs.com/package/@42mk/segment" class="btn btn--outline">
964966
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
965967
<path d="M0 7.334v8h6.666v1.332H12v-1.332h12v-8H0zm6.666 6.664H5.334v-4H3.999v4H1.335V8.667h5.331v5.331zm4 0h-2.666V8.667h2.666v5.331zm12 0h-1.33v-4h-1.336v4h-1.335v-4h-1.33v4h-2.671V8.667h8.002v5.331zM11.333 8.667h2.666v4h-2.666v-4z"/>
966968
</svg>
@@ -1111,23 +1113,23 @@ <h2 class="section-header__title">Quick Start</h2>
11111113
<div class="code-block__header">
11121114
<span>npm</span>
11131115
<button type="button" class="code-block__copy"
1114-
onclick="copyCode(this, 'npm install segment-font')">Copy</button>
1116+
onclick="copyCode(this, 'npm install @42mk/segment')">Copy</button>
11151117
</div>
11161118
<div class="code-block__body">
11171119
<pre><span class="cmt"># Install the package</span>
1118-
<span class="kw">npm install</span> segment-font</pre>
1120+
<span class="kw">npm install</span> @42mk/segment</pre>
11191121
</div>
11201122
</div>
11211123

11221124
<div class="code-block reveal" style="transition-delay:0.1s;">
11231125
<div class="code-block__header">
11241126
<span>css</span>
11251127
<button type="button" class="code-block__copy"
1126-
onclick="copyCode(this, '@import &quot;segment-font/css&quot;;')">Copy</button>
1128+
onclick="copyCode(this, '@import &quot;@42mk/segment/css&quot;;')">Copy</button>
11271129
</div>
11281130
<div class="code-block__body">
11291131
<pre><span class="cmt">/* Import the font */</span>
1130-
<span class="kw">@import</span> <span class="str">"segment-font/css"</span>;
1132+
<span class="kw">@import</span> <span class="str">"@42mk/segment/css"</span>;
11311133

11321134
<span class="prop">.headline</span> {
11331135
<span class="kw">font-family</span>: <span class="str">"Segment"</span>, sans-serif;
@@ -1139,16 +1141,16 @@ <h2 class="section-header__title">Quick Start</h2>
11391141
<div class="code-block__header">
11401142
<span>html</span>
11411143
<button type="button" class="code-block__copy"
1142-
onclick="copyCode(this, '&lt;link rel=&quot;stylesheet&quot; href=&quot;segment-font/dist/segment.css&quot;&gt;')">Copy</button>
1144+
onclick="copyCode(this, '&lt;link rel=&quot;stylesheet&quot; href=&quot;@42mk/segment/dist/segment.css&quot;&gt;')">Copy</button>
11431145
</div>
11441146
<div class="code-block__body">
11451147
<pre><span class="cmt">&lt;!-- Direct file reference --&gt;</span>
11461148
<span class="kw">&lt;link</span> <span class="prop">rel</span>=<span class="str">"preload"</span>
1147-
<span class="prop">href</span>=<span class="str">"segment-font/dist/segment.woff2"</span>
1149+
<span class="prop">href</span>=<span class="str">"@42mk/segment/dist/segment.woff2"</span>
11481150
<span class="prop">as</span>=<span class="str">"font"</span> <span class="prop">type</span>=<span class="str">"font/woff2"</span>
11491151
<span class="prop">crossorigin</span><span class="kw">&gt;</span>
11501152
<span class="kw">&lt;link</span> <span class="prop">rel</span>=<span class="str">"stylesheet"</span>
1151-
<span class="prop">href</span>=<span class="str">"segment-font/dist/segment.css"</span><span class="kw">&gt;</span></pre>
1153+
<span class="prop">href</span>=<span class="str">"@42mk/segment/dist/segment.css"</span><span class="kw">&gt;</span></pre>
11521154
</div>
11531155
</div>
11541156

@@ -1158,12 +1160,12 @@ <h2 class="section-header__title">Quick Start</h2>
11581160
</div>
11591161
<div class="code-block__body">
11601162
<pre><span class="cmt">// Available subpath exports</span>
1161-
<span class="kw">import</span> <span class="str">"segment-font"</span> <span class="cmt">// CSS</span>
1162-
<span class="kw">import</span> <span class="str">"segment-font/css"</span> <span class="cmt">// CSS</span>
1163-
<span class="kw">import</span> <span class="str">"segment-font/woff2"</span> <span class="cmt">// .woff2</span>
1164-
<span class="kw">import</span> <span class="str">"segment-font/woff"</span> <span class="cmt">// .woff</span>
1165-
<span class="kw">import</span> <span class="str">"segment-font/ttf"</span> <span class="cmt">// .ttf</span>
1166-
<span class="kw">import</span> <span class="str">"segment-font/svg"</span> <span class="cmt">// .svg</span></pre>
1163+
<span class="kw">import</span> <span class="str">"@42mk/segment"</span> <span class="cmt">// CSS</span>
1164+
<span class="kw">import</span> <span class="str">"@42mk/segment/css"</span> <span class="cmt">// CSS</span>
1165+
<span class="kw">import</span> <span class="str">"@42mk/segment/woff2"</span> <span class="cmt">// .woff2</span>
1166+
<span class="kw">import</span> <span class="str">"@42mk/segment/woff"</span> <span class="cmt">// .woff</span>
1167+
<span class="kw">import</span> <span class="str">"@42mk/segment/ttf"</span> <span class="cmt">// .ttf</span>
1168+
<span class="kw">import</span> <span class="str">"@42mk/segment/svg"</span> <span class="cmt">// .svg</span></pre>
11671169
</div>
11681170
</div>
11691171
</div>
@@ -1189,11 +1191,23 @@ <h3 class="credit-card__name">Pavlina Buchevska Boshkova</h3>
11891191
typeface.</p>
11901192
</div>
11911193
<div class="credit-card reveal" style="transition-delay:0.1s;">
1194+
<div class="credit-card__role">Number Glyphs</div>
1195+
<h3 class="credit-card__name">Mila Jovanovikj</h3>
1196+
<p class="credit-card__desc">Designed the digit glyphs 0&ndash;9, extending the typeface with a matching set of
1197+
numerals.</p>
1198+
</div>
1199+
<div class="credit-card reveal" style="transition-delay:0.2s;">
11921200
<div class="credit-card__role">Font Packaging</div>
11931201
<h3 class="credit-card__name">Darko Bozhinovski</h3>
11941202
<p class="credit-card__desc">Converted the original SVG design into a distributable multi-format web font
11951203
package.</p>
11961204
</div>
1205+
<div class="credit-card reveal" style="transition-delay:0.3s;">
1206+
<div class="credit-card__role">Demo &amp; Packaging</div>
1207+
<h3 class="credit-card__name">Ilija Boshkov</h3>
1208+
<p class="credit-card__desc">Put this page together and handled the finishing touches around npm
1209+
packaging.</p>
1210+
</div>
11971211
</div>
11981212

11991213
<div class="credits__license reveal" style="transition-delay:0.2s;">
@@ -1231,7 +1245,7 @@ <h3 class="credits__license-title">SIL Open Font License 1.1</h3>
12311245
</svg>
12321246
Releases
12331247
</a>
1234-
<a href="https://www.npmjs.com/package/segment-font" class="footer__link">
1248+
<a href="https://www.npmjs.com/package/@42mk/segment" class="footer__link">
12351249
<svg viewBox="0 0 24 24" aria-hidden="true">
12361250
<path d="M0 7.334v8h6.666v1.332H12v-1.332h12v-8H0zm6.666 6.664H5.334v-4H3.999v4H1.335V8.667h5.331v5.331zm4 0h-2.666V8.667h2.666v5.331zm12 0h-1.33v-4h-1.336v4h-1.335v-4h-1.33v4h-2.671V8.667h8.002v5.331zM11.333 8.667h2.666v4h-2.666v-4z"
12371251
fill="currentColor" stroke="none" />

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "segment-font",
2+
"name": "@42mk/segment",
33
"version": "1.0.0",
44
"description": "Segment — a custom display/icon font.",
55
"type": "module",
@@ -36,11 +36,26 @@
3636
"webfont",
3737
"display-font"
3838
],
39-
"author": "",
39+
"author": "Pavlina Buchevska Boshkova",
40+
"contributors": [
41+
"Mila Jovanovikj (digit glyphs)",
42+
"Darko Bozhinovski (font packaging)"
43+
],
4044
"license": "OFL-1.1",
45+
"homepage": "https://42dotmk.github.io/Segment/demo/",
4146
"repository": {
4247
"type": "git",
43-
"url": ""
48+
"url": "git+https://github.com/42dotmk/Segment.git"
49+
},
50+
"bugs": {
51+
"url": "https://github.com/42dotmk/Segment/issues"
52+
},
53+
"publishConfig": {
54+
"access": "public",
55+
"provenance": true
56+
},
57+
"engines": {
58+
"node": ">=18"
4459
},
4560
"devDependencies": {
4661
"globby": "^14.0.2",

scripts/build.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const css = `@font-face {
134134
font-variant: normal;
135135
text-transform: none;
136136
line-height: 1;
137+
letter-spacing: 0.06em;
137138
-webkit-font-smoothing: antialiased;
138139
-moz-osx-font-smoothing: grayscale;
139140
}

0 commit comments

Comments
 (0)