Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Dec 23, 2023
2 parents d960a26 + 57b8f92 commit 87529a1
Show file tree
Hide file tree
Showing 355 changed files with 4,020 additions and 3,992 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It is highly recommended to completely remove the old version of the fonts befor

## To build

You need [Node.js](https://nodejs.org/en/) (version 18 or newer), [AFDKO](https://github.com/adobe-type-tools/afdko) (latest) and [ttfautohint](https://www.freetype.org/ttfautohint) installed, then run:
You need [Node.js](https://nodejs.org/en/) (version 20 or newer), [AFDKO](https://github.com/adobe-type-tools/afdko) (latest) and [ttfautohint](https://www.freetype.org/ttfautohint) installed, then run:

```bash
npm install
Expand Down
2 changes: 1 addition & 1 deletion README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Sarasa Gothic 提供了多种字重和字型的组合,以满足不同的场景

### 要求

安装 [Node.js](https://nodejs.org/en/)[ttfautohint](https://www.freetype.org/ttfautohint)
安装 [Node.js](https://nodejs.org/en/)[AFDKO](https://github.com/adobe-type-tools/afdko)[ttfautohint](https://www.freetype.org/ttfautohint)

### 创建所有字体

Expand Down
203 changes: 98 additions & 105 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"buildOptions":{},
"familyOrder": ["gothic", "ui", "mono", "mono-slab", "term", "term-slab", "fixed", "fixed-slab"],
"buildOptions": {},
"familyOrder": ["Gothic", "Ui", "Mono", "MonoSlab", "Term", "TermSlab", "Fixed", "FixedSlab"],
"families": {
"gothic": {
"isTNUM": true,
"Gothic": {
"isGothic": true,
"latinGroup": "Inter",
"naming": {
Expand All @@ -15,8 +14,7 @@
"ko_KR": "사라사 고딕"
}
},
"ui": {
"isTNUM": true,
"Ui": {
"isPWID": true,
"latinGroup": "Inter",
"naming": {
Expand All @@ -28,9 +26,9 @@
"ko_KR": "사라사 고딕 UI"
}
},
"mono": {
"Mono": {
"isMono": true,
"latinGroup": "iosevka-n",
"latinGroup": "IosevkaN",
"naming": {
"en_US": "Sarasa Mono",
"zh_CN": "等距更纱黑体",
Expand All @@ -40,10 +38,10 @@
"ko_KR": "사라사 고정 폭고딕"
}
},
"term": {
"Term": {
"isMono": true,
"isTerm": true,
"latinGroup": "iosevka-n-term",
"latinGroup": "IosevkaNTerm",
"naming": {
"en_US": "Sarasa Term",
"zh_CN": "Sarasa Term",
Expand All @@ -53,10 +51,10 @@
"ko_KR": "Sarasa Term"
}
},
"fixed": {
"Fixed": {
"isMono": true,
"isTerm": true,
"latinGroup": "iosevka-n-fixed",
"latinGroup": "IosevkaNFixed",
"naming": {
"en_US": "Sarasa Fixed",
"zh_CN": "Sarasa Fixed",
Expand All @@ -66,9 +64,9 @@
"ko_KR": "Sarasa Fixed"
}
},
"mono-slab": {
"MonoSlab": {
"isMono": true,
"latinGroup": "iosevka-n-slab",
"latinGroup": "IosevkaNSlab",
"naming": {
"en_US": "Sarasa Mono Slab",
"zh_CN": "等距更纱黑体 Slab",
Expand All @@ -78,9 +76,9 @@
"ko_KR": "사라사 고정 폭고딕 Slab"
}
},
"term-slab": {
"TermSlab": {
"isMono": true,
"latinGroup": "iosevka-n-term-slab",
"latinGroup": "IosevkaNTermSlab",
"isTerm": true,
"naming": {
"en_US": "Sarasa Term Slab",
Expand All @@ -91,9 +89,9 @@
"ko_KR": "Sarasa Term Slab"
}
},
"fixed-slab": {
"FixedSlab": {
"isMono": true,
"latinGroup": "iosevka-n-fixed-slab",
"latinGroup": "IosevkaNFixedSlab",
"isTerm": true,
"naming": {
"en_US": "Sarasa Fixed Slab",
Expand All @@ -106,92 +104,91 @@
}
},
"styleOrder": [
"extralight",
"extralightitalic",
"light",
"lightitalic",
"regular",
"italic",
"semibold",
"semibolditalic",
"bold",
"bolditalic"
"ExtraLight",
"ExtraLightItalic",
"Light",
"LightItalic",
"Regular",
"Italic",
"SemiBold",
"SemiBoldItalic",
"Bold",
"BoldItalic"
],
"latinGroups": {
"Inter": {
"isCff": false,
"styleToFileSuffixMap": {
"extralight": "ExtraLight",
"extralightitalic": "ExtraLightItalic",
"light": "Light",
"lightitalic": "LightItalic",
"regular": "Regular",
"italic": "Italic",
"semibold": "SemiBold",
"semibolditalic": "SemiBoldItalic",
"bold": "Bold",
"bolditalic": "BoldItalic"
}
"bakeFeatures": [
{ "tag": "ss03" },
{ "tag": "tnum", "range": ["0", "9"] },
{ "tag": "cv03", "range": ["0", "9"] },
{ "tag": "cv04", "range": ["0", "9"] },
{ "tag": "cv02", "range": ["0", "9"] },
{ "tag": "cv10" }
],
"dropFeatures": [
"cv01",
"cv02",
"cv03",
"cv04",
"cv05",
"cv06",
"cv07",
"cv08",
"cv09",
"cv10",
"cv11",
"cv12",
"cv13",
"ss01",
"ss02",
"ss03",
"ss04",
"ss05",
"ss06",
"ss07",
"ss08"
]
}
},
"styles": {
"extralight": {
"name": "Extralight"
"ExtraLight": {
"name": "ExtraLight"
},
"extralightitalic": {
"name": "Extralight Italic",
"uprightStyleMap": "extralight"
"ExtraLightItalic": {
"name": "ExtraLight Italic",
"uprightStyleMap": "ExtraLight"
},
"light": {
"Light": {
"name": "Light"
},
"lightitalic": {
"LightItalic": {
"name": "Light Italic",
"uprightStyleMap": "light"
"uprightStyleMap": "Light"
},
"regular": {
"Regular": {
"name": "Regular"
},
"italic": {
"Italic": {
"name": "Italic",
"uprightStyleMap": "regular"
"uprightStyleMap": "Regular"
},
"semibold": {
"name": "Semibold"
"SemiBold": {
"name": "SemiBold"
},
"semibolditalic": {
"name": "Semibold Italic",
"uprightStyleMap": "semibold"
"SemiBoldItalic": {
"name": "SemiBold Italic",
"uprightStyleMap": "SemiBold"
},
"bold": {
"Bold": {
"name": "Bold"
},
"bolditalic": {
"BoldItalic": {
"name": "Bold Italic",
"uprightStyleMap": "bold"
}
},
"subfamilyOrder": ["cl", "sc", "tc", "hc", "j", "k"],
"subfamilies": {
"cl": {
"name": "CL"
},
"sc": {
"name": "SC"
},
"tc": {
"name": "TC"
},
"hc": {
"name": "HC"
},
"j": {
"name": "J"
},
"k": {
"name": "K"
"uprightStyleMap": "Bold"
}
},
"subfamilyOrder": ["CL", "SC", "TC", "HC", "J", "K"],
"os2encodings": {
"J": {
"gbk": false,
Expand Down Expand Up @@ -242,34 +239,30 @@
"shsSourceMap": {
"defaultRegion": "SourceHanSans",
"region": {
"j": "SourceHanSans",
"k": "SourceHanSansK",
"cl": "SourceHanSansK",
"sc": "SourceHanSansSC",
"tc": "SourceHanSansTC",
"hc": "SourceHanSansHC",
"j-hw": "SourceHanSansHW",
"k-hw": "SourceHanSansHWK",
"cl-hw": "SourceHanSansHWK",
"sc-hw": "SourceHanSansHWSC",
"tc-hw": "SourceHanSansHWTC",
"hc-hw": "SourceHanSansHWHC"
"J": "SourceHanSans",
"K": "SourceHanSansK",
"CL": "SourceHanSansK",
"SC": "SourceHanSansSC",
"TC": "SourceHanSansTC",
"HC": "SourceHanSansHC",
"J-HW": "SourceHanSansHW",
"K-HW": "SourceHanSansHWK",
"CL-HW": "SourceHanSansHWK",
"SC-HW": "SourceHanSansHWSC",
"TC-HW": "SourceHanSansHWTC",
"HC-HW": "SourceHanSansHWHC"
},
"style": {
"extralight": "ExtraLight",
"light": "Light",
"regular": "Regular",
"semibold": "Medium",
"bold": "Bold"
"styleMap": {
"SemiBold": "Medium"
},
"classicalRegion": "cl",
"classicalOverridePrefix":"AdvocateAncientSansTC",
"classicalOverrideSuffix": {
"extralight": "ExtraLight-subset",
"light": "Light-subset",
"regular": "Regular-subset",
"semibold": "Medium-subset",
"bold": "Bold-subset"
"classicalOverridePrefix": "AdvocateAncientSansTC",
"classicalOverrideSuffixMap": {
"ExtraLight": "ExtraLight-subset",
"Light": "Light-subset",
"Regular": "Regular-subset",
"SemiBold": "Medium-subset",
"Bold": "Bold-subset"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 14 additions & 2 deletions make/pass1/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as url from "url";
import { CliProc, Ot } from "ot-builder";

import { bakeFeature } from "../helpers/bake-feature.mjs";
import { dropCharacters } from "../helpers/drop.mjs";
import { dropCharacters, dropFeature } from "../helpers/drop.mjs";
import { readFont, writeFont } from "../helpers/font-io.mjs";
import { italize } from "../helpers/geometry.mjs";
import { isEnclosedAlphanumerics, isIdeograph, isKorean, isPua } from "../helpers/unicode-kind.mjs";
Expand All @@ -26,7 +26,19 @@ async function pass(argv) {

if (main.head.unitsPerEm !== 1000) CliProc.rebaseFont(main, 1000);

if (argv.tnum) bakeFeature("tnum", main, c => c >= 0x30 && c <= 0x39);
if (argv.latinCfg && argv.latinCfg.bakeFeatures) {
for (const feature of argv.latinCfg.bakeFeatures) {
let filter = feature.range
? c => c >= feature.range[0].codePointAt(0) && c <= feature.range[1].codePointAt(0)
: _ => true;
bakeFeature(feature.tag, main, filter);
}
}
if (argv.latinCfg && argv.latinCfg.dropFeatures) {
dropFeature(main.gsub, argv.latinCfg.dropFeatures);
dropFeature(main.gpos, argv.latinCfg.dropFeatures);
}

initVhea(main, as);

// Drop enclosed alphanumerics and PUA
Expand Down
2 changes: 1 addition & 1 deletion make/punct/as.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function pass(argv) {
dropFeature(main.gsub, ["ccmp", "aalt", "pwid", "fwid", "hwid", "twid", "qwid"]);
if (argv.mono) {
dropFeature(main.gsub, ["locl"]);
dropFeature(main.gpos, ["kern", "vkrn", "palt", "vpal"]);
dropFeature(main.gpos, ["kern", "vkrn", "halt", "palt", "vpal"]);
}
aliasFeatMap(main, "vert", 0x2014, 0x2015);
CliProc.gcFont(main, Ot.ListGlyphStoreFactory);
Expand Down
Loading

0 comments on commit 87529a1

Please sign in to comment.