Make glyph gizmo able to influence flatten stage
This commit is contained in:
parent
9d8fe1c3ed
commit
1dc9c22b0f
3 changed files with 7 additions and 5 deletions
|
@ -4,7 +4,7 @@ const fs = require("fs-extra");
|
||||||
const zlib = require("zlib");
|
const zlib = require("zlib");
|
||||||
const { encode, decode } = require("@msgpack/msgpack");
|
const { encode, decode } = require("@msgpack/msgpack");
|
||||||
|
|
||||||
const Edition = 6;
|
const Edition = 7;
|
||||||
const MAX_AGE = 5;
|
const MAX_AGE = 5;
|
||||||
|
|
||||||
class GfEntry {
|
class GfEntry {
|
||||||
|
|
|
@ -67,8 +67,8 @@ function flattenSimpleGlyph(cache, skew, g) {
|
||||||
g.includeContours(CurveUtil.repToShape(cached), 0, 0);
|
g.includeContours(CurveUtil.repToShape(cached), 0, 0);
|
||||||
cache.refreshGF(ck);
|
cache.refreshGF(ck);
|
||||||
} else {
|
} else {
|
||||||
const tfBack = 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 = 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(
|
const g1 = new Geom.TransformedGeometry(
|
||||||
new SimplifyGeometry(new Geom.TransformedGeometry(g.geometry, tfBack)),
|
new SimplifyGeometry(new Geom.TransformedGeometry(g.geometry, tfBack)),
|
||||||
tfForward
|
tfForward
|
||||||
|
|
|
@ -468,8 +468,10 @@ glyph-block Autobuild-Transformed-Mathematical : begin
|
||||||
local forked : Fork pendingGlyphs forkedPara
|
local forked : Fork pendingGlyphs forkedPara
|
||||||
foreach {unicode glyphid} [items-of records] : if [not : query-glyph targetNameMap.(glyphid)]
|
foreach {unicode glyphid} [items-of records] : if [not : query-glyph targetNameMap.(glyphid)]
|
||||||
create-glyph targetNameMap.(glyphid) unicode : glyph-proc
|
create-glyph targetNameMap.(glyphid) unicode : glyph-proc
|
||||||
if [not : forked.queryByName glyphid] : console.log glyphid
|
define glyphT : forked.queryByName glyphid
|
||||||
include [forked.queryByName glyphid] AS_BASE ALSO_METRICS
|
if [not glyphT] : console.log glyphid
|
||||||
|
include glyphT AS_BASE ALSO_METRICS
|
||||||
|
set currentGlyph.gizmo glyphT.gizmo
|
||||||
|
|
||||||
link-relations relSets
|
link-relations relSets
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue