The `fontland` library does not have an official public API but it will give
you the answer, which is 1446.
#lang racket
(require fontland fontland/ttf-glyph)
(define f (open-font "/System/Library/Fonts/Supplemental/Arial Unicode.ttf"))
;; `layout` uses OpenType positioning & substitution tables to create a glyph
run,
;; which is a structure with two vectors: a vector of glyphs and a vector of
glyph positions
;; once we have the glyph we can `glyph-decode` it and inspect its yMax value.
(match (layout f "♖")
[(glyphrun (vector glyph _ ...) _) (hash-ref (glyph-decode glyph) 'yMax)])
> On 21 Jul 20, at 4:25 AM, Jens Axel Søgaard wrote:
>
> It helps to use the correct font...
>
> It turns out the chess rook is not in "Courier", it is in "Arial Unicode MS".
> The raw pango functions aren't clever enough to find an alternative font,
> but I think `text` from `pict` is. I am not sure of the details here though.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/43A50577-DCC4-49DE-B33E-8CB16A1B2A10%40mbtype.com.