From 18e21a66395a1eade2434e6d22a300295ed69147 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 5 Mar 2019 15:22:16 -0800 Subject: [PATCH] rename --- fontland/fontland/table/cff/cff-dict.rkt | 2 +- fontland/fontland/table/cff/cff-font.rkt | 2 +- fontland/fontland/table/cff/cff-index.rkt | 7 ++++--- fontland/fontland/table/cff/cff-pointer.rkt | 6 +++--- fontland/fontland/table/cff/cff-private-dict.rkt | 2 +- fontland/fontland/table/cff/cff-top.rkt | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/fontland/fontland/table/cff/cff-dict.rkt b/fontland/fontland/table/cff/cff-dict.rkt index 4902d621..3097d539 100644 --- a/fontland/fontland/table/cff/cff-dict.rkt +++ b/fontland/fontland/table/cff/cff-dict.rkt @@ -8,7 +8,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFDict.js |# (define CFFDict% - (class xenobase% + (class x:base% (super-new) (init-field [(@ops ops)]) (field [fields (for/hash ([field (in-list @ops)]) diff --git a/fontland/fontland/table/cff/cff-font.rkt b/fontland/fontland/table/cff/cff-font.rkt index 2bb1480b..9f3707c5 100644 --- a/fontland/fontland/table/cff/cff-font.rkt +++ b/fontland/fontland/table/cff/cff-font.rkt @@ -11,7 +11,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFFont.js ;; so it should return a hash. (define CFFFont% - (class xenobase% + (class x:base% (super-new) (define/augride (decode stream parent) diff --git a/fontland/fontland/table/cff/cff-index.rkt b/fontland/fontland/table/cff/cff-index.rkt index 3b385b40..cff15dc0 100644 --- a/fontland/fontland/table/cff/cff-index.rkt +++ b/fontland/fontland/table/cff/cff-index.rkt @@ -3,7 +3,7 @@ (provide CFFIndex) (define CFFIndex% - (class xenobase% + (class x:base% (super-new) (init-field [(@type type) #f]) @@ -15,8 +15,9 @@ (not (hash-ref ctx 'hdrSize))) (loop (hash-ref ctx 'parent)) (if ctx (hash-ref ctx 'x:version) -1)))) - - (define/augride (decode stream parent) + + (augride [@decode decode]) + (define (@decode stream parent) (match (decode (if (>= (getCFFVersion parent) 2) uint32be uint16be) stream) [0 null] [count (define offSize (decode uint8 stream)) diff --git a/fontland/fontland/table/cff/cff-pointer.rkt b/fontland/fontland/table/cff/cff-pointer.rkt index 50757462..d98f4e6c 100644 --- a/fontland/fontland/table/cff/cff-pointer.rkt +++ b/fontland/fontland/table/cff/cff-pointer.rkt @@ -23,7 +23,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFPointer.js (inherit-field offset-type) (define/override (decode stream parent operands) - (set! offset-type (class xenobase% + (set! offset-type (class x:base% (super-new) (define/augment (decode . args) (first operands)))) (super decode stream parent operands)) @@ -32,14 +32,14 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFPointer.js (cond [(not stream) ;; compute the size (so ctx.pointerSize is correct) - (set! offset-type (class xenobase% + (set! offset-type (class x:base% (super-new) (define/augment (size . args) 0))) (send this size value ctx) (Ptr 0)] [else (define ptr #false) - (set! offset-type (class xenobase% + (set! offset-type (class x:base% (super-new) (define/augment (encode stream val) (set! ptr val)))) (super encode stream value ctx) diff --git a/fontland/fontland/table/cff/cff-private-dict.rkt b/fontland/fontland/table/cff/cff-private-dict.rkt index 08904030..14bad40a 100644 --- a/fontland/fontland/table/cff/cff-private-dict.rkt +++ b/fontland/fontland/table/cff/cff-private-dict.rkt @@ -11,7 +11,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFPrivateDict.js |# (define CFFBlendOp - (class xenobase% + (class x:base% (define/augment (decode stream parent operands) (match (reverse operands) [(cons numBlends operands) diff --git a/fontland/fontland/table/cff/cff-top.rkt b/fontland/fontland/table/cff/cff-top.rkt index a522c092..b6896b3d 100644 --- a/fontland/fontland/table/cff/cff-top.rkt +++ b/fontland/fontland/table/cff/cff-top.rkt @@ -14,7 +14,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFTop.js |# (define PredefinedOp% - (class xenobase% + (class x:base% (super-new) (init-field [(@predefinedOps predefinedOps)] [(@type type) #f]) @@ -113,7 +113,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFTop.js (define ptr (CFFPointer CFFPrivateDict)) (define (CFFPrivateOp . args) (apply make-object - (class xenobase% + (class x:base% (super-new) (define/augment (decode stream parent operands) (hash-set! parent 'length (first operands))