disco very

main
Matthew Butterick 7 years ago
parent bf36013ef3
commit 46211de41c

@ -17,8 +17,9 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/GlyphInfo.js
[(list? features-in)
(for ([feature (in-list features-in)])
(hash-set! features feature #t))]
[(object? features-in)
(hash-set! features (· features-in features))])
[(dict? features-in)
(for ([(feature val) (in-dict features-in)])
(hash-set! features feature val))])
(field [ligatureID #f]
[ligatureComponent #f]

@ -157,5 +157,6 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/GSUBProcessor.js
(set-field! glyphs (· this glyphIterator) (· this glyphs))
(report* (for/list ([g (· this glyphs)]) (· g id)) (· this glyphIterator index))
#t)]
[else #f])])))
[else #f])]
[else (error 'unimplemented-gsub-lookup)])))

@ -109,6 +109,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/OTProcessor.js
(send (· this glyphIterator) reset (· lookup flags))
(while (< (or (· this glyphIterator index) 0) (length (· this glyphs)))
(report 'start-while++++++++++++++++++)
(report (length (· this glyphs)) 'glyphs-length-top)
(report (for/list ([g (· this glyphs)]) (· g id)) 'gids-top)
(report (· this glyphIterator index) giterator-idx-top)
@ -118,7 +119,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/OTProcessor.js
[(not (dict-has-key? (· this glyphIterator cur features) feature))
(send (· this glyphIterator) next)]
[else
(report/file '=================)
(report/file 'start-lookup-branch=================)
(report* (for/list ([g (· this glyphs)]) (· g id)) (for/list ([g (· this glyphIterator glyphs)]) (· g id)) (for/list ([g glyphs]) (· g id)) (· this glyphIterator index) (· this glyphIterator cur id) (· this glyphIterator peekIndex))
(for/or ([table (in-list (· lookup subTables))])
(send this applyLookup (· lookup lookupType) table))

@ -7295,18 +7295,20 @@ var OTProcessor = function () {
this.glyphIterator.reset(lookup.flags);
while (this.glyphIterator.index < glyphs.length) {
console.log("start while +++++++++++++++++++++++++++++");
console.log("glyphs.length at top = " + glyphs.length);
console.log("glyph ids at top =" + glyphs.map(function(o) { return o.id;}))
console.log("this.glyphIterator.index at top = " + this.glyphIterator.index);
console.log("feature = " + feature);
console.log("this.glyphIterator.cur.id = " + this.glyphIterator.cur.id);
console.log("this.glyphIterator.cur.features = "
+ Object.getOwnPropertyNames(this.glyphIterator.cur.features));
console.log("(feature in this.glyphIterator.cur.features) = " + (feature in this.glyphIterator.cur.features))
if (!(feature in this.glyphIterator.cur.features)) {
this.glyphIterator.next();
continue;
}
console.log("==================================");
console.log("start lookup branch ==================================");
console.log("glyph ids =" + glyphs.map(function(o) { return o.id;}))
console.log("this.glyph ids =" + this.glyphs.map(function(o) { return o.id;}))
console.log("glyphIterator.glyph ids =" + this.glyphIterator.glyphs.map(function(o) { return o.id;}))

File diff suppressed because it is too large Load Diff

Binary file not shown.
Loading…
Cancel
Save