Skip to content

Commit

Permalink
Merge branch 'master' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Feb 1, 2019
2 parents 6b85351 + 918799f commit 80e8ce8
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 69 deletions.
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

10 changes: 10 additions & 0 deletions hint/source/fonts.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"param": "source/parameters/regular.toml",
"allchar": true
},
{
"input": "source/fonts/hc-regular.ttf",
"param": "source/parameters/regular.toml",
"allchar": true
},
{
"input": "source/fonts/j-regular.ttf",
"param": "source/parameters/regular.toml",
Expand All @@ -41,6 +46,11 @@
"param": "source/parameters/bold.toml",
"allchar": true
},
{
"input": "source/fonts/hc-bold.ttf",
"param": "source/parameters/bold.toml",
"allchar": true
},
{
"input": "source/fonts/j-bold.ttf",
"param": "source/parameters/bold.toml",
Expand Down
38 changes: 19 additions & 19 deletions hint/source/parameters/bold.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
[hinting]
PPEM_MIN = 11
PPEM_MAX = 36
CANONICAL_STEM_WIDTH = [[12,90],[18,90],[26,97],[36,97]]
CANONICAL_STEM_WIDTH_DENSE = [[12,72],[36,72]]
PPEM_MAX = 48
CANONICAL_STEM_WIDTH = [[12,90],[18,90],[26,97],[36,97],[48,97]]
CANONICAL_STEM_WIDTH_DENSE = [[12,72],[36,72],[48,72]]
ABSORPTION_LIMIT = 120
STEM_SIDE_MIN_RISE = 36
STEM_SIDE_MIN_DESCENT = 51
STEM_CENTER_MIN_RISE = 36
STEM_CENTER_MIN_DESCENT = 50
STEM_SIDE_MIN_DIST_RISE = 75
STEM_SIDE_MIN_DIST_DESCENT = 72
BOTTOM_UNIFY_FORCE = [[11,100],[36,0]]
BOTTOM_UNIFY_FORCE_DIAG = [[11,100],[36,0]]
TOP_UNIFY_FORCE = [[11,50],[36,0]]
TOP_UNIFY_FORCE_DIAG = [[11,50],[36,0]]
BOTTOM_UNIFY_FORCE = [[11,100],[36,0],[48,0]]
BOTTOM_UNIFY_FORCE_DIAG = [[11,100],[36,0],[48,0]]
TOP_UNIFY_FORCE = [[11,50],[36,0],[48,0]]
TOP_UNIFY_FORCE_DIAG = [[11,50],[36,0],[48,0]]
SLOPE_FUZZ = 0.121
SLOPE_FUZZ_NEG = 0.08
BLUEZONE_BOTTOM_CENTER = -70
BLUEZONE_BOTTOM_LIMIT = -48
BLUEZONE_TOP_CENTER = 830
RISE = [[11,15],[24,0],[36,0]]
SINK = [[11,0],[36,0]]
SINK_DIAGL = [[11,0],[36,0]]
GRAVITY = [[11,0],[36,0]]
CONCENTRATE = [[11,0],[36,0]]
CHEBYSHEV_4 = [[11,0],[36,0]]
CHEBYSHEV_5 = [[11,0],[36,0]]
TOP_CUT = [[11,0],[16,0],[36,1]]
BOTTOM_CUT = [[11,0],[36,0]]
TOP_CUT_DIAGH = [[11,0],[36,0]]
BOTTOM_CUT_DIAGL = [[11,0],[36,0]]
TOP_CUT_DIAG_DIST = [[11,0],[36,1]]
RISE = [[11,15],[24,0],[36,0],[48,0]]
SINK = [[11,0],[36,0],[48,0]]
SINK_DIAGL = [[11,0],[36,0],[48,0]]
GRAVITY = [[11,0],[36,0],[48,0]]
CONCENTRATE = [[11,0],[36,0],[48,0]]
CHEBYSHEV_4 = [[11,0],[36,0],[48,0]]
CHEBYSHEV_5 = [[11,0],[36,0],[48,0]]
TOP_CUT = [[11,0],[16,0],[36,1],[48,1]]
BOTTOM_CUT = [[11,0],[36,0],[48,0]]
TOP_CUT_DIAGH = [[11,0],[36,0],[48,0]]
BOTTOM_CUT_DIAGL = [[11,0],[36,0],[48,0]]
TOP_CUT_DIAG_DIST = [[11,0],[36,1],[48,1]]
PPEM_INCREASE_GLYPH_LIMIT = 19
BLUEZONE_TOP_BAR = [[12,820],[14,825],[15,840],[16,815],[36,799]]
BLUEZONE_TOP_DOTBAR = [[12,808],[36,791]]
Expand Down
36 changes: 18 additions & 18 deletions hint/source/parameters/regular.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
[hinting]
PPEM_MIN = 11
PPEM_MAX = 36
PPEM_MAX = 48
PPEM_LOCK_BOTTOM = 20
CANONICAL_STEM_WIDTH = [[11,67],[36,67]]
CANONICAL_STEM_WIDTH_DENSE = [[11,67],[36,67]]
CANONICAL_STEM_WIDTH = [[11,67],[36,67],[48,67]]
CANONICAL_STEM_WIDTH_DENSE = [[11,67],[36,67],[48,67]]
ABSORPTION_LIMIT = 120
STEM_SIDE_MIN_RISE = 36
STEM_SIDE_MIN_DESCENT = 53
STEM_CENTER_MIN_RISE = 36
STEM_CENTER_MIN_DESCENT = 50
STEM_SIDE_MIN_DIST_RISE = 75
STEM_SIDE_MIN_DIST_DESCENT = 75
BOTTOM_UNIFY_FORCE = [[11,100],[24,5],[36,0]]
BOTTOM_UNIFY_FORCE_DIAG = [[11,50],[15,50],[16,45],[17,5],[36,0]]
TOP_UNIFY_FORCE = [[11,50],[15,50],[16,35],[24,10],[36,0]]
TOP_UNIFY_FORCE_DIAG = [[11,50],[15,50],[16,35],[24,10],[36,0]]
MAX_SW_OVERFLOW_CPXS = [[11,1],[15,25],[20,50],[36,50]]
MAX_SW_SHRINK_CPXS = [[11,25],[20,50],[36,50]]
BOTTOM_UNIFY_FORCE = [[11,100],[24,5],[36,0],[48,0]]
BOTTOM_UNIFY_FORCE_DIAG = [[11,50],[15,50],[16,45],[17,5],[36,0],[48,0]]
TOP_UNIFY_FORCE = [[11,50],[15,50],[16,35],[24,10],[36,0],[48,0]]
TOP_UNIFY_FORCE_DIAG = [[11,50],[15,50],[16,35],[24,10],[36,0],[48,0]]
MAX_SW_OVERFLOW_CPXS = [[11,1],[15,25],[20,50],[36,50],[48,50]]
MAX_SW_SHRINK_CPXS = [[11,25],[20,50],[36,50],[48,50]]
Y_FUZZ = 8
BLUEZONE_BOTTOM_CENTER = -70
BLUEZONE_BOTTOM_LIMIT = -45
BLUEZONE_TOP_CENTER = 835
BLUEZONE_TOP_LIMIT = 813
RISE = [[11,20],[15,20],[20,15],[26,0],[36,0]]
SINK = [[11,8],[36,0]]
SINK_DIAGL = [[11,0],[36,0]]
GRAVITY = [[11,0],[36,0]]
CONCENTRATE = [[11,0],[36,0]]
CHEBYSHEV_4 = [[11,0],[36,0]]
CHEBYSHEV_5 = [[11,0],[36,0]]
TOP_CUT = [[11,0],[18,0],[19,0],[36,0]]
BOTTOM_CUT = [[11,0],[36,0]]
RISE = [[11,20],[15,20],[20,15],[26,0],[36,0],[48,0]]
SINK = [[11,8],[36,0],[48,0]]
SINK_DIAGL = [[11,0],[36,0],[48,0]]
GRAVITY = [[11,0],[36,0],[48,0]]
CONCENTRATE = [[11,0],[36,0],[48,0]]
CHEBYSHEV_4 = [[11,0],[36,0],[48,0]]
CHEBYSHEV_5 = [[11,0],[36,0],[48,0]]
TOP_CUT = [[11,0],[18,0],[19,0],[36,0],[48,0]]
BOTTOM_CUT = [[11,0],[36,0],[48,0]]
2 changes: 1 addition & 1 deletion make/pass1/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function pass(ctx, config, argv) {
family: globalConfig.families[argv.family].naming.zh_TW + " " + argv.subfamily,
style: globalConfig.styles[argv.style].name
},
zh_TW: {
zh_HK: {
family: globalConfig.families[argv.family].naming.zh_HK + " " + argv.subfamily,
style: globalConfig.styles[argv.style].name
},
Expand Down
34 changes: 21 additions & 13 deletions make/punct/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,25 @@ sanitizers.halfRight = function(glyph, gid) {
deleteGPOS(this.font, gid);
return glyph;
};
sanitizers.halfComp = function(glyph, gid, isType = false) {
const targetW = Math.min(
this.em,
Math.ceil(glyph.advanceWidth / this.em) * (this.em * (isType ? 1 : 1 / 2))
);
if (!glyph.contours) return glyph;
for (let c of glyph.contours) for (let z of c) z.x *= targetW / glyph.advanceWidth;
glyph.advanceWidth = targetW;
deleteGPOS(this.font, gid);
return glyph;
};

function HalfCompN(n, ov) {
return function(glyph, gid, isType = false) {
const targetW = Math.min(
this.em * n,
Math.ceil(glyph.advanceWidth / this.em) * (this.em * (isType || ov ? 1 : 1 / 2))
);
if (glyph.contours) {
for (let c of glyph.contours) for (let z of c) z.x *= targetW / glyph.advanceWidth;
}
glyph.advanceWidth = targetW;
deleteGPOS(this.font, gid);
return glyph;
};
}

sanitizers.halfComp = HalfCompN(1);
sanitizers.halfComp2 = HalfCompN(2);
sanitizers.halfComp3 = HalfCompN(3);

const sanitizerTypes = {
"“": "halfRight",
Expand All @@ -79,8 +87,8 @@ const sanitizerTypes = {
"\u2011": "halfComp",
"\u2012": "halfComp",
"\u2010": "halfComp",
"\u2e3a": "halfComp",
"\u2e3b": "halfComp"
"\u2e3a": "halfComp2",
"\u2e3b": "halfComp3"
};

exports.sanitizeSymbols = async function sanitizeSymbols(isType) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sarasa-gothic",
"version": "0.7.0",
"version": "0.7.2",
"main": "./run",
"dependencies": {
"caryll-iddb": "^0.1.2",
Expand Down
Binary file modified sources/iosevka-term/iosevka-term-bold.ttf
Binary file not shown.
Binary file modified sources/iosevka-term/iosevka-term-bolditalic.ttf
Binary file not shown.
Binary file modified sources/iosevka-term/iosevka-term-italic.ttf
Binary file not shown.
Binary file modified sources/iosevka-term/iosevka-term-regular.ttf
Binary file not shown.
Binary file modified sources/iosevka/iosevka-bold.ttf
Binary file not shown.
Binary file modified sources/iosevka/iosevka-bolditalic.ttf
Binary file not shown.
Binary file modified sources/iosevka/iosevka-italic.ttf
Binary file not shown.
Binary file modified sources/iosevka/iosevka-regular.ttf
Binary file not shown.
Binary file modified sources/noto-sans/noto-sans-bold.ttf
Binary file not shown.
Binary file modified sources/noto-sans/noto-sans-bolditalic.ttf
Binary file not shown.
Binary file modified sources/noto-sans/noto-sans-italic.ttf
Binary file not shown.
Binary file modified sources/noto-sans/noto-sans-regular.ttf
Binary file not shown.

0 comments on commit 80e8ce8

Please sign in to comment.