You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is not possible to draw the letters "V" and "A" correctly next to each other, because the library racket/draw does not expose the kerning table of a font.
Describe the solution you'd like
I would like to have a function, which returns the kerning similar to kerning-value of "sfont".
It would be nice to have a function, which calculates the kerning between two strings or characters. It seems to me that currently this is the only way to calculate the kerning between two strings:
#lang racket/gui
(definefont (make-font #:size 16 #:face "Latin Modern Roman"))
(defineframe (new frame% [label ""]))
(definecanvas (new canvas% [parent frame]))
(definedc (send canvas get-dc))
(defineleft "A")
(defineright "V")
(defineboth (string-append left right))
(define-values (left-text-width left-text-height left-baseline-height left-extra-height)
(send dc get-text-extent left font #t))
(values left-text-width left-text-height left-baseline-height left-extra-height)
(printf "\n")
(define-values (right-text-width right-text-height right-baseline-height right-extra-height)
(send dc get-text-extent right font #t))
(values right-text-width right-text-height right-baseline-height right-extra-height)
(printf "\n")
(define-values (both-text-width both-text-height both-baseline-height both-extra-height)
(send dc get-text-extent both font #t))
(values both-text-width both-text-height both-baseline-height both-extra-height)
(printf "\n")
(- (+ left-text-width right-text-width)
both-text-width)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It is not possible to draw the letters "V" and "A" correctly next to each other, because the library racket/draw does not expose the kerning table of a font.
Describe the solution you'd like
I would like to have a function, which returns the kerning similar to kerning-value of "sfont".
It would be nice to have a function, which calculates the kerning between two strings or characters. It seems to me that currently this is the only way to calculate the kerning between two strings:
The text was updated successfully, but these errors were encountered: