Skip to content

Commit

Permalink
Release 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Mar 30, 2024
2 parents 200e60f + 24961d4 commit 7e4844e
Show file tree
Hide file tree
Showing 167 changed files with 61 additions and 24 deletions.
1 change: 0 additions & 1 deletion checkenv.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ function check(util) {

check("otc2otf");
check("otf2ttf");
check("ttfautohint");
43 changes: 33 additions & 10 deletions make/punct/build-continuous-em-dash.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
alterContours,
copyGeometryData,
getAdvanceHeight,
getAdvanceWidth
getAdvanceWidth,
setAdvanceWidth
} from "../helpers/geometry.mjs";
import { GlyphFinder } from "../helpers/glyph-finder.mjs";

Expand Down Expand Up @@ -35,22 +36,44 @@ export function buildContinuousEmDash(font) {

function buildHGlyph(emDash, bound) {
const g1 = new Ot.Glyph();
const adw = getAdvanceWidth(emDash);

copyGeometryData(g1, emDash);
alterContours(g1, (x, y) => [
x <= (bound.xMin + bound.xMax) / 2 ? bound.xMax - 1.05 * adw : x,
y
const adw = getAdvanceWidth(g1);
g1.geometry = new Ot.Glyph.ContourSet([
[
Ot.Glyph.Point.create(bound.xMax - adw, bound.yMax, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(
bound.xMax - adw - (bound.yMax - bound.yMin) / 2,
(bound.yMin + bound.yMax) / 2,
Ot.Glyph.PointType.Corner
),
Ot.Glyph.Point.create(bound.xMax - adw, bound.yMin, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(bound.xMax, bound.yMin, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(bound.xMax, bound.yMax, Ot.Glyph.PointType.Corner)
]
]);

return g1;
}
function buildVGlyph(emDashV, boundV) {
function buildVGlyph(emDashV, bound) {
const g1 = new Ot.Glyph();
const adh = getAdvanceHeight(emDashV);

copyGeometryData(g1, emDashV);
alterContours(g1, (x, y) => [
x,
y >= (boundV.yMin + boundV.yMax) / 2 ? boundV.yMin + 1.05 * adh : y
const adh = getAdvanceHeight(g1);
g1.geometry = new Ot.Glyph.ContourSet([
[
Ot.Glyph.Point.create(bound.xMin, bound.yMin, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(bound.xMax, bound.yMin, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(bound.xMax, bound.yMin + adh, Ot.Glyph.PointType.Corner),
Ot.Glyph.Point.create(
(bound.xMin + bound.xMax) / 2,
bound.yMin + adh + (bound.xMax - bound.xMin) / 2,
Ot.Glyph.PointType.Corner
),
Ot.Glyph.Point.create(bound.xMin, bound.yMin + adh, Ot.Glyph.PointType.Corner)
]
]);

return g1;
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "1.0.8",
"version": "1.0.9",
"main": "./run",
"scripts": {
"build": "verda -f verdafile.mjs",
Expand Down
Loading

0 comments on commit 7e4844e

Please sign in to comment.