main
Matthew Butterick 6 years ago
parent 61a9ea4d8c
commit ef9212fcbc

@ -1,6 +1,6 @@
#lang debug racket
(require sugar/debug sugar/cache racket/class racket/match
db racket/logging racket/draw openssl/sha1 racket/runtime-path)
(require sugar/cache racket/match
db racket/runtime-path)
(provide (all-defined-out))
(define-runtime-path db-file "fontland.sqlite")
@ -20,7 +20,7 @@
(define (add-record! rec)
(query-exec-logging "insert or replace into layouts (crc, layout) values ($1, $2)" (car rec) (cdr rec)))
(define/caching (get-layout-from-db which)
(define (get-layout-from-db which)
(match (query-rows-logging "select layout from layouts where crc==$1" which)
[(list (vector val)) val]
[_ #false]))

@ -3,10 +3,7 @@
"tables.rkt"
racket/dict
sugar/unstable/dict
racket/string
sugar/unstable/class
sugar/unstable/js
racket/class)
racket/string)
(provide (all-defined-out))

@ -1,6 +1,5 @@
#lang racket/base
(require (for-syntax)
sugar/unstable/dict
(require sugar/unstable/dict
"unsafe/freetype.rkt"
"table-stream.rkt"
"struct.rkt"

@ -1,7 +1,5 @@
#lang racket/base
(require sugar/unstable/js
racket/class
"glyph-position.rkt")
(require "glyph-position.rkt")
(provide (all-defined-out))
#|

@ -12,21 +12,4 @@
(define-runtime-path fira-path "assets/fira.ttf")
(define-runtime-path fira-otf-path "assets/fira.otf")
(define-runtime-path charter-directory-path "assets/charter-directory.rktd")
(define-runtime-path charter-italic-directory-path "assets/charter-italic-directory.rktd")
(define-syntax (test-module stx)
(syntax-case stx ()
[(_ . EXPRS)
#`(module+ test
(require #,(datum->syntax stx 'rackunit) #,(datum->syntax stx 'racket/serialize))
. EXPRS)]))
(define (is-mark? codepoint)
;; mark classes = Mn Me Mc
(regexp-match #px"\\p{Mn}|\\p{Me}|\\p{Mc}" (string (integer->char codepoint))))
(module+ test
(require rackunit)
(check-true (and (is-mark? #x300) #t))
(check-false (and (is-mark? #x2ee) #t)))
(define-runtime-path charter-italic-directory-path "assets/charter-italic-directory.rktd")

@ -1,10 +1,8 @@
#lang debug racket/base
(require racket/serialize
racket/class
racket/list
racket/match
sugar/unstable/dict
sugar/unstable/js
"table/loca.rkt"
"table-stream.rkt"
"directory.rkt"

@ -1,6 +1,5 @@
#lang debug racket
(require sugar/unstable/js
xenomorph
(require xenomorph
"tables.rkt"
"struct.rkt"
(for-syntax "tables.rkt"))

@ -4,7 +4,7 @@
racket/list
racket/promise
"../struct.rkt")
(provide loca)
(provide loca loca-pre-encode loca-post-decode)
(define 16bit-style 0)
(define 32bit-style 1)

@ -2,12 +2,8 @@
(require (for-syntax racket/base)
racket/match
racket/list
racket/class
racket/dict
"glyph.rkt"
"struct.rkt"
sugar/unstable/dict
sugar/unstable/js
xenomorph
racket/struct)
(provide (all-defined-out))

Loading…
Cancel
Save