Skip to content

Instantly share code, notes, and snippets.

@soegaard
Created February 17, 2013 21:16
Show Gist options
  • Select an option

  • Save soegaard/4973526 to your computer and use it in GitHub Desktop.

Select an option

Save soegaard/4973526 to your computer and use it in GitHub Desktop.
Render an "a" using Times Roman size 72. Is the right edge of the "a" missing?
#lang racket
(require racket/draw)
(define a-font
(make-font #:size 72
#:face "Times Roman"))
(define bm (make-object bitmap% 200 200))
(define bm-dc (new bitmap-dc% [bitmap bm]))
(define fine-pen (new pen% [color "black"] [width 1]))
(define a-path (new dc-path%))
(send a-path text-outline a-font "a" 50 50)
(send bm-dc draw-path a-path 0 0 'odd-even)
bm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment