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.
typesetting/fontland/fontland/struct.rkt

22 lines
698 B
Racket

6 years ago
#lang debug racket
(provide (all-defined-out))
6 years ago
(struct ttf-font (port decoded-tables src directory ft-face hb-font hb-buf crc get-head-table-proc)
6 years ago
#:transparent #:mutable)
6 years ago
6 years ago
(define (ft-face this)
(or (force (ttf-font-ft-face this)) (error 'ft-face-not-available)))
6 years ago
(define (font-directory this)
(or (force (ttf-font-directory this)) (error 'directory-not-available)))
6 years ago
(define (hb-font this)
(or (force (ttf-font-hb-font this)) (error 'hb-font-not-available)))
(define (hb-buf this)
6 years ago
(or (force (ttf-font-hb-buf this)) (error 'hp-buf-not-available)))
(struct glyph (id codepoints font is-mark? is-ligature? metrics) #:transparent #:mutable)
(struct ttf-glyph glyph () #:transparent)