X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Ffont.scm;h=d759d60934590614bfb3c070d064d67e82760515;hb=b293e2046fc5a4cedf01d602c77b55ff41376735;hp=662f655a8d5c1045ea12ad710d82ac8da07c16d0;hpb=eb084823eddda9aacd20ad104b2013ea77e9a781;p=lilypond.git diff --git a/scm/font.scm b/scm/font.scm index 662f655a8d..d759d60934 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2004--2010 Han-Wen Nienhuys +;;;; Copyright (C) 2004--2012 Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -151,16 +151,28 @@ "Set up music fonts. Arguments: - NODE the font tree to modify. - NAME is the basename for the music font. NAME-DESIGNSIZE.otf should be the music font, - NAME-brace.otf should have piano braces. - DESIGN-SIZE-ALIST is a list of (ROUNDED . DESIGN-SIZE). ROUNDED is - a suffix for font filenames, while DESIGN-SIZE should be the actual - design size. The latter is used for text fonts loaded through - pango/fontconfig - FACTOR is a size factor relative to the default size that is being used. - This is used to select the proper design size for the text fonts. -" +@itemize +@item +@var{node} is the font tree to modify. + +@item +@var{name} is the basename for the music font. +@file{@var{name}-.otf} should be the music font, +@file{@var{name}-brace.otf} should have piano braces. + +@item +@var{family} is the family name of the music font. + +@item +@var{design-size-alist} is a list of @code{(rounded . designsize)}. +@code{rounded} is a suffix for font filenames, while @code{designsize} +should be the actual design size. The latter is used for text fonts +loaded through pango/@/fontconfig. + +@item +@var{factor} is a size factor relative to the default size that is being +used. This is used to select the proper design size for the text fonts. +@end itemize" (for-each (lambda (x) (add-font node @@ -173,7 +185,7 @@ Arguments: ,(list->vector (map (lambda (tup) (cons (ly:pt (cdr tup)) - (format "~a-~a ~a" + (format #f "~a-~a ~a" name (car tup) (ly:pt (cdr tup))))) @@ -182,12 +194,12 @@ Arguments: ,(list->vector (map (lambda (size-tup) (delay (ly:system-font-load - (format "~a-~a" name (car size-tup))))) + (format #f "~a-~a" name (car size-tup))))) design-size-alist ))) (fetaBraces ,(ly:pt 20.0) #(,(delay (ly:system-font-load - (format "~a-brace" name))))) + (format #f "~a-brace" name))))) ))) (define-public (add-pango-fonts node lily-family family factor) @@ -227,7 +239,7 @@ Arguments: (define-public (make-century-schoolbook-tree factor) (make-pango-font-tree - "Century Schoolbook L,serif" + "Century Schoolbook L" "sans-serif" "monospace" factor)) (define-public all-text-font-encodings