Make glyph gizmo able to influence flatten stage

This commit is contained in:
be5invis 2021-05-31 01:53:13 -07:00
parent 9d8fe1c3ed
commit 1dc9c22b0f
3 changed files with 7 additions and 5 deletions

View file

@ -4,7 +4,7 @@ const fs = require("fs-extra");
const zlib = require("zlib");
const { encode, decode } = require("@msgpack/msgpack");
const Edition = 6;
const Edition = 7;
const MAX_AGE = 5;
class GfEntry {

View file

@ -67,8 +67,8 @@ function flattenSimpleGlyph(cache, skew, g) {
g.includeContours(CurveUtil.repToShape(cached), 0, 0);
cache.refreshGF(ck);
} else {
const tfBack = new Transform(1, -skew, 0, 1, 0, 0);
const tfForward = new Transform(1, +skew, 0, 1, 0, 0);
const tfBack = g.gizmo ? g.gizmo.inverse() : new Transform(1, -skew, 0, 1, 0, 0);
const tfForward = g.gizmo ? g.gizmo : new Transform(1, +skew, 0, 1, 0, 0);
const g1 = new Geom.TransformedGeometry(
new SimplifyGeometry(new Geom.TransformedGeometry(g.geometry, tfBack)),
tfForward

View file

@ -468,8 +468,10 @@ glyph-block Autobuild-Transformed-Mathematical : begin
local forked : Fork pendingGlyphs forkedPara
foreach {unicode glyphid} [items-of records] : if [not : query-glyph targetNameMap.(glyphid)]
create-glyph targetNameMap.(glyphid) unicode : glyph-proc
if [not : forked.queryByName glyphid] : console.log glyphid
include [forked.queryByName glyphid] AS_BASE ALSO_METRICS
define glyphT : forked.queryByName glyphid
if [not glyphT] : console.log glyphid
include glyphT AS_BASE ALSO_METRICS
set currentGlyph.gizmo glyphT.gizmo
link-relations relSets