Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Aug 8, 2020
2 parents 961cfcc + fc1e2cf commit d7f4527
Show file tree
Hide file tree
Showing 333 changed files with 91 additions and 52 deletions.
12 changes: 9 additions & 3 deletions hinting-params/bold.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"hintPlugin": "@chlorophytum/hm-ideograph",
"hintOptions": {
"CANONICAL_STEM_WIDTH": 0.097,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
"STEM_SIDE_MIN_DIST_DESCENT": 0.072,
"SLOPE_FUZZ_POS": 0.16,
"SLOPE_FUZZ_POST": 0.27
}
},
{
Expand All @@ -26,6 +28,8 @@
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.175,
"SLOPE_FUZZ_POS": 0.175,
"SLOPE_FUZZ_POST": 0.175,
"SLOPE_FUZZ_NEG": 0.175,
"CANONICAL_STEM_WIDTH": 0.097,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
Expand All @@ -43,8 +47,10 @@
],
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.06,
"SLOPE_FUZZ_NEG": 0.06,
"SLOPE_FUZZ": 0.03,
"SLOPE_FUZZ_POS": 0.03,
"SLOPE_FUZZ_POST": 0.03,
"SLOPE_FUZZ_NEG": 0.03,
"CANONICAL_STEM_WIDTH": 0.097,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
}
Expand Down
14 changes: 11 additions & 3 deletions hinting-params/extralight.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"passes": [
{
"hintPlugin": "@chlorophytum/hm-ideograph",
"hintOptions": { "CANONICAL_STEM_WIDTH": 0.029 }
"hintOptions": {
"CANONICAL_STEM_WIDTH": 0.029,
"SLOPE_FUZZ_POS": 0.16,
"SLOPE_FUZZ_POST": 0.27
}
},
{
"hintPlugin": "@chlorophytum/hm-ideograph",
Expand All @@ -23,6 +27,8 @@
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.175,
"SLOPE_FUZZ_POS": 0.175,
"SLOPE_FUZZ_POST": 0.175,
"SLOPE_FUZZ_NEG": 0.175,
"CANONICAL_STEM_WIDTH": 0.029
}
Expand All @@ -39,8 +45,10 @@
],
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.06,
"SLOPE_FUZZ_NEG": 0.06,
"SLOPE_FUZZ": 0.03,
"SLOPE_FUZZ_POS": 0.03,
"SLOPE_FUZZ_POST": 0.03,
"SLOPE_FUZZ_NEG": 0.03,
"CANONICAL_STEM_WIDTH": 0.029
}
}
Expand Down
14 changes: 11 additions & 3 deletions hinting-params/light.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"passes": [
{
"hintPlugin": "@chlorophytum/hm-ideograph",
"hintOptions": { "CANONICAL_STEM_WIDTH": 0.04 }
"hintOptions": {
"CANONICAL_STEM_WIDTH": 0.04,
"SLOPE_FUZZ_POS": 0.16,
"SLOPE_FUZZ_POST": 0.27
}
},
{
"hintPlugin": "@chlorophytum/hm-ideograph",
Expand All @@ -23,6 +27,8 @@
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.175,
"SLOPE_FUZZ_POS": 0.175,
"SLOPE_FUZZ_POST": 0.175,
"SLOPE_FUZZ_NEG": 0.175,
"CANONICAL_STEM_WIDTH": 0.04
}
Expand All @@ -39,8 +45,10 @@
],
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.06,
"SLOPE_FUZZ_NEG": 0.06,
"SLOPE_FUZZ": 0.03,
"SLOPE_FUZZ_POS": 0.03,
"SLOPE_FUZZ_POST": 0.03,
"SLOPE_FUZZ_NEG": 0.03,
"CANONICAL_STEM_WIDTH": 0.04
}
}
Expand Down
14 changes: 11 additions & 3 deletions hinting-params/regular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"passes": [
{
"hintPlugin": "@chlorophytum/hm-ideograph",
"hintOptions": { "CANONICAL_STEM_WIDTH": 0.067 }
"hintOptions": {
"CANONICAL_STEM_WIDTH": 0.067,
"SLOPE_FUZZ_POS": 0.16,
"SLOPE_FUZZ_POST": 0.27
}
},
{
"hintPlugin": "@chlorophytum/hm-ideograph",
Expand All @@ -23,6 +27,8 @@
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.175,
"SLOPE_FUZZ_POS": 0.175,
"SLOPE_FUZZ_POST": 0.175,
"SLOPE_FUZZ_NEG": 0.175
}
},
Expand All @@ -38,8 +44,10 @@
],
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.06,
"SLOPE_FUZZ_NEG": 0.06
"SLOPE_FUZZ": 0.03,
"SLOPE_FUZZ_POS": 0.03,
"SLOPE_FUZZ_POST": 0.03,
"SLOPE_FUZZ_NEG": 0.03
}
}
]
Expand Down
12 changes: 9 additions & 3 deletions hinting-params/semibold.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"hintPlugin": "@chlorophytum/hm-ideograph",
"hintOptions": {
"CANONICAL_STEM_WIDTH": 0.072,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
"STEM_SIDE_MIN_DIST_DESCENT": 0.072,
"SLOPE_FUZZ_POS": 0.16,
"SLOPE_FUZZ_POST": 0.27
}
},
{
Expand All @@ -26,6 +28,8 @@
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.175,
"SLOPE_FUZZ_POS": 0.175,
"SLOPE_FUZZ_POST": 0.175,
"SLOPE_FUZZ_NEG": 0.175,
"CANONICAL_STEM_WIDTH": 0.072,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
Expand All @@ -43,8 +47,10 @@
],
"trackFeatures": ["vert", "palt", "pkna", "hkna", "vkna"],
"trackScripts": ["kana"],
"SLOPE_FUZZ": 0.06,
"SLOPE_FUZZ_NEG": 0.06,
"SLOPE_FUZZ": 0.03,
"SLOPE_FUZZ_POS": 0.03,
"SLOPE_FUZZ_POST": 0.03,
"SLOPE_FUZZ_NEG": 0.03,
"CANONICAL_STEM_WIDTH": 0.072,
"STEM_SIDE_MIN_DIST_DESCENT": 0.072
}
Expand Down
3 changes: 2 additions & 1 deletion make/pass1/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ async function pass(ctx, config, argv) {
await ctx.run(
nameFont,
"a",
!!argv.mono,
globalConfig.nameTupleSelector[argv.subfamily],
ENCODINGS[argv.subfamily],
{
en_US: {
copyright: globalConfig.version,
copyright: globalConfig.copyright,
version: `Version ${packageConfig.version}`,
family: globalConfig.families[argv.family].naming.en_US + " " + argv.subfamily,
style: globalConfig.styles[argv.style].name
Expand Down
21 changes: 16 additions & 5 deletions make/pass1/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ const langIDMap = {

function createNameTuple(nameTable, langID, family, style, localizedStyle) {
const compat = compatibilityName(family, style);
if (!compat.standardFour) {
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, PREFERRED_FAMILY, family));
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, PREFERRED_STYLE, style));
}
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, PREFERRED_FAMILY, family));
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, PREFERRED_STYLE, style));
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, FAMILY, compat.family));
const compatStyle = compat.standardFour ? localizedStyle : compat.style;
nameTable.push(nameEntry(WINDOWS, UNICODE, langID, STYLE, compatStyle));
Expand All @@ -77,7 +75,7 @@ function createNameTuple(nameTable, langID, family, style, localizedStyle) {
}
}

async function nameFont(ctx, demand, selectorList, encodings, namings) {
async function nameFont(ctx, demand, fMono, selectorList, encodings, namings) {
const font = this.items[demand];
const nameTable = [];
const defaultNg = namings.en_US;
Expand Down Expand Up @@ -121,6 +119,19 @@ async function nameFont(ctx, demand, selectorList, encodings, namings) {
cp850: true,
ascii: true
};
// Set Panose bits
font.OS_2.panose = [
2,
0,
(1 + font.OS_2.usWeightClass / 100) | 0,
fMono ? 9 : 0,
0,
0,
0,
0,
0,
0
];
}

exports.nameFont = nameFont;
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "sarasa-gothic",
"version": "0.12.11",
"version": "0.12.12",
"main": "./run",
"dependencies": {
"@chlorophytum/cli": "^0.8.0",
"@chlorophytum/final-hint-format-hltt": "^0.8.0",
"@chlorophytum/font-format-ttf": "^0.8.0",
"@chlorophytum/hint-store-provider-file": "^0.8.0",
"@chlorophytum/hm-combine": "^0.8.0",
"@chlorophytum/hm-ideograph": "^0.9.0",
"@chlorophytum/cli": "^0.10.0",
"@chlorophytum/final-hint-format-hltt": "^0.10.0",
"@chlorophytum/font-format-ttf": "^0.10.0",
"@chlorophytum/hint-store-provider-file": "^0.10.0",
"@chlorophytum/hm-combine": "^0.10.0",
"@chlorophytum/hm-ideograph": "^0.10.1",
"colors": "^1.4.0",
"fs-extra": "^8.1.0",
"fs-extra": "^9.0.1",
"megaminx": "^0.9.0",
"otfcc-ttcize": "^0.10.2",
"verda": "^1.0.0-10",
"verda": "^1.1.0",
"which": "^2.0.2",
"yargs": "^15.3.0"
"yargs": "^15.4.1"
},
"engines": {
"node": ">=12.0.0"
Expand All @@ -25,8 +25,8 @@
"build": "verda -f verdafile.js"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",
"prettier": "^2.0.5"
}
}
Loading

0 comments on commit d7f4527

Please sign in to comment.