You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
587 B
Racket
24 lines
587 B
Racket
7 years ago
|
#lang fontkit/racket
|
||
|
(require "gsub-processor.rkt" "gpos-processor.rkt")
|
||
|
(provide (all-defined-out))
|
||
|
|
||
|
#|
|
||
|
https://github.com/mbutterick/fontkit/blob/master/src/opentype/OTLayoutEngine.js
|
||
|
|#
|
||
|
|
||
|
(define-subclass object% (OTLayoutEngine font)
|
||
|
(field [glyphInfos #f]
|
||
|
[plan #f]
|
||
|
[GSUBProcessor #f]
|
||
|
[GPOSProcessor #f])
|
||
|
|
||
|
(report 'dingdong)
|
||
|
(when (· font has-gsub-table?)
|
||
|
(set-field! GSUBProcessor this (+GSUBProcessor font (· font GSUB))))
|
||
|
|
||
|
(when (· font has-gpos-table?)
|
||
|
(set-field! GPOSProcessor this (+GPOSProcessor font (· font GPOS))))
|
||
|
|
||
|
|
||
|
|
||
|
)
|