test16 passes

main
Matthew Butterick 8 years ago
parent 7609fd1126
commit 9974acaff1

@ -63,25 +63,25 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/GPOSProcessor.js
(send this applyPositionValue 0 (· pair value2))
#t])])])])]
[(3) ;; Cursive Attachment Positioning
#;(report/file 'cursive-attachment-positioning-unimplemented)
(report/file 'cursive-attachment-positioning-unimplemented)
(void)]
[(4) ;; Mark to base positioning
#;(report/file 'mark-to-base-positioning-unimplemented)
(report/file 'mark-to-base-positioning-unimplemented)
(void)]
[(5) ;; Mark to ligature positioning
#;(report/file 'mark-to-ligature-positioning-unimplemented)
(report/file 'mark-to-ligature-positioning-unimplemented)
(void)]
[(6) ;; Mark to mark positioning
#;(report/file 'mark-to-mark-positioning-unimplemented)
(report/file 'mark-to-mark-positioning-unimplemented)
(void)]
[(7) ;; Contextual positioning
#;(report/file 'contextual-positioning-unimplemented)
(report/file 'contextual-positioning-unimplemented)
(void)]
[(8) ;; Chaining contextual positioning
#;(report/file 'chaining-contextual-positioning-unimplemented)
(report/file 'chaining-contextual-positioning-unimplemented)
(void)]
[(9) ;; Extension positioning
#;(report/file 'extension-contextual-positioning-unimplemented)
(report/file 'extension-contextual-positioning-unimplemented)
(void)]
[else
(raise-argument-error 'GPOSProcessor:applyLookup "supported GPOS table" lookupType)]))

@ -56,7 +56,9 @@ https://github.com/mbutterick/fontkit/blob/master/src/layout/LayoutEngine.js
(report*/file 'end-sub glyphs)
#;(error 'stop)
(report/file 'ready-position)
(report (for/list ((g (in-list glyphs))) (· g id)) 'shecky)
(define positions (send this position glyphs features script language))
(report (for/list ((p (in-list positions))) (list (· p xAdvance) (· p xOffset))))
(report/file 'fired-position)
;; Let the layout engine clean up any state it might have

@ -40,6 +40,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/opentype/OTLayoutEngine.js
#;(report/file (· this glyphInfos))
(define new-glyphinfos
(send (· this plan) process (· this GSUBProcessor) (· this glyphInfos)))
(set! glyphInfos new-glyphinfos) ; update OTLayoutEngine state for positioning pass
(report/file new-glyphinfos)
;; Map glyph infos back to normal Glyph objects
(report/file (for/list ([glyphInfo (in-list new-glyphinfos)])

@ -9199,8 +9199,11 @@ var LayoutEngine = function () {
// Substitute and position the glyphs
glyphs = this.substitute(glyphs, features, script, language);
console.log("ready position")
console.log("glyph ids" + glyphs.map(function(g) { return g.id;}))
var positions = this.position(glyphs, features, script, language);
console.log("positions" + positions.map(function(o) { return o.xAdvance;}))
console.log("fired position")
// Let the layout engine clean up any state it might have
if (this.engine && this.engine.cleanup) {
this.engine.cleanup();

@ -49,7 +49,7 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/font/embedded.coffee
(for ([g (in-list glyphs)])
(· g id))
(define positions (· glyphRun positions))
(report/file (for/list ([p (in-list positions)])
#;(report/file (for/list ([p (in-list positions)])
(list (· p xAdvance) (· p xOffset))))
(define-values (subset-idxs new-positions)
(for/lists (idxs posns)

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -16,7 +16,7 @@
(define-runtime-path this "test16rkt.pdf")
(make-doc this #f proc #:test #f)
(make-doc this #f proc)
#;(define-runtime-path that "test16crkt.pdf")
#;(make-doc that #t proc #:pdfkit #f)
(define-runtime-path that "test16crkt.pdf")
(make-doc that #t proc #:pdfkit #f)
Loading…
Cancel
Save