From 611aeaedc85a63440c9e8e554b53bd4f4b474220 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 6 Mar 2019 21:22:23 -0800 Subject: [PATCH] patch --- fontland/fontland/glyph.rkt | 3 +-- fontland/fontland/unsafe/freetype.rkt | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fontland/fontland/glyph.rkt b/fontland/fontland/glyph.rkt index ac0148e9..40ea375e 100644 --- a/fontland/fontland/glyph.rkt +++ b/fontland/fontland/glyph.rkt @@ -38,12 +38,11 @@ https://github.com/mbutterick/fontkit/blob/master/src/glyph/Glyph.js (FT_Load_Glyph face (glyph-id g) FT_LOAD_NO_RECURSE) (define glyph (FT_FaceRec-glyph face)) (define ft-glyph-metrics (FT_GlyphSlotRec-metrics glyph)) - #R (FT_Glyph_Metrics->list ft-glyph-metrics) (set-glyph-metrics! g (mhash)) (hash-set*! (glyph-metrics g) 'advanceWidth (FT_Glyph_Metrics-horiAdvance ft-glyph-metrics) 'leftBearing (FT_Glyph_Metrics-horiBearingX ft-glyph-metrics))) - #R (glyph-metrics g)) + (glyph-metrics g)) (define (+ttf-glyph . args) (apply +glyph #:constructor ttf-glyph args)) diff --git a/fontland/fontland/unsafe/freetype.rkt b/fontland/fontland/unsafe/freetype.rkt index aa5f3021..ea64fcd9 100644 --- a/fontland/fontland/unsafe/freetype.rkt +++ b/fontland/fontland/unsafe/freetype.rkt @@ -315,7 +315,8 @@ -> (cond [(zero? err) ;; see https://www.freetype.org/freetype2/docs/tutorial/step1.html - + ;; for meaning of these arguments + (FT_Set_Char_Size ftf 0 1000 0 0) ftf] [(= err 1) (error 'FT_New_Face (format "font ~v not found" path))]