2 ;;; font.scm -- implement Font stuff
4 ;;; source file of the GNU LilyPond music typesetter
6 ;;; (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
9 ;; Should separate default sizes
10 ;; into separate list/alist ?
14 Each entry in this vector has the following format
20 #(SIZE-FONT-ENTRIES... ) ))
22 where each SIZE-FONT-ENTRY is
24 (cons DESIGN-SIZE FONT-NAME)
28 (cons DESIGN-SIZE (list FONT-NAME1 FONT-NAME2 .. ))
32 (define-public (magstep x)
33 (exp (* (/ x 6) (log 2))))
36 (define-public paper20-font-vector
37 '((#(medium upright number) .
38 (10 . #((10.0 . "feta-nummer10"))))
39 (#(medium upright roman) .
40 (10.0 . #((6.0 . "cmr6")
46 (20.0 . #((11.22 . ("feta11" "parmesan11"))
47 (12.60 . ("feta13" "parmesan13"))
48 (14.14 . ("feta14" "parmesan14"))
49 (15.87 . ("feta16" "parmesan16"))
50 (17.82 . ("feta18" "parmesan18"))
51 (20.0 . ("feta20" "parmesan20"))
52 (22.45 . ("feta23" "parmesan23"))
53 (25.20 . ("feta26" "parmesan26"))
55 (#(medium upright sans) .
56 (10.0 . #((8.0 . "cmss8")
61 (#(medium upright typewriter) .
62 (10.0 . #((8.0 . "cmtt8")
66 (#(bold italic roman) .
67 (10.0 . #((8.0 . "cmbxti8")
71 (#(medium italic roman) .
72 (10.0 . #((7.0 . "cmti7")
76 (#(bold upright roman) .
77 (10.0 . #((6.0 . "cmbx6")
82 (#(bold-narrow upright roman) .
83 (10.0 . #((10.0 . "cmb10")
85 (#(medium caps roman) .
86 (10.0 . #((10.0 . "cmcsc10"))))
88 ;; this is a little pointless, since feta-din scales linearly
90 (14.0 . #((8.0 . "feta-din10")
96 (10.0 . #((10.0 . "msam10"))))
99 (define (scale-font-entry entry factor)
102 (cons (* (cadr entry) factor)
105 (define size-independent-fonts
107 (10 . #((10.0 . ("feta-braces00"
115 "feta-braces80")))))))
117 (define-public (scale-font-list factor)
118 (append size-independent-fonts
119 (map (lambda (y) (scale-font-entry y factor)) paper20-font-vector)