Created
February 17, 2013 21:16
-
-
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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