From 6a7826c8b13e12b8b9509cc8ca64b69e1c82f857 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 5 Dec 2018 16:48:56 -0800 Subject: [PATCH] gbye --- fontland/fontland/glyphinfo.rkt | 56 --------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 fontland/fontland/glyphinfo.rkt diff --git a/fontland/fontland/glyphinfo.rkt b/fontland/fontland/glyphinfo.rkt deleted file mode 100644 index 3cb8f764..00000000 --- a/fontland/fontland/glyphinfo.rkt +++ /dev/null @@ -1,56 +0,0 @@ -#lang racket/base -(require sugar/unstable/class - sugar/unstable/dict - sugar/unstable/js - racket/class - racket/list - racket/dict - "helper.rkt") -(provide (all-defined-out)) - -#| -approximates -https://github.com/mbutterick/fontkit/blob/master/src/opentype/GlyphInfo.js -|# - -(define-subclass object% (GlyphInfo font-in id-in [codePoints-in empty] [features-in (mhasheq)]) - (field [_font font-in] - [codePoints codePoints-in] - [_id id-in] - [features (mhasheq)]) - - (cond - [(list? features-in) - (for ([feature (in-list features-in)]) - (hash-set! features feature #t))] - [(dict? features-in) - (for ([(feature val) (in-dict features-in)]) - (hash-set! features feature val))]) - - (field [ligatureID #f] - [ligatureComponent #f] - [ligated #f] - [isLigated #f] ;todo: is this deliberate or accidental? see gsub-processor - [cursiveAttachment #f] - [markattachment #f] - [shaperInfo #f] - [substituted #f] - [isMark #f] - [isLigature #f]) - - (define/public (id [id-in #f]) - (cond - [(not id-in) _id] - [else (set-field! _id this id-in) - (set-field! substituted this #t) - - (cond - ;; we're out of the GDEF business - #;[(and (· this _font GDEF) (· this _font GDEF glyphClassDef)) - (define classID (send (+OTProcessor) getClassID id-in (· this _font GDEF glyphClassDef))) - (set-field! isMark this (= classID 3)) - (set-field! isLigature this (= classID 2))] - [else - (set-field! isMark this (andmap is-mark? (· this codePoints))) - (set-field! isLigature this (> (length (· this codePoints)) 1))])]))) -