| LIBRARIES:
|
|-- ly/ .ly \include files
-|-- mf/ MetaFont sources for Emmentaler and Aybabtu fonts
+|-- mf/ MetaFont sources for Emmentaler fonts
|-- ps/ PostScript library files
|-- scm/ Scheme sources for LilyPond and subroutine files
|-- tex/ TeX and texinfo library files
--- /dev/null
+\header {
+
+ texidoc = "Use an alternative music font (gonville). To use this,
+put gonville-20.otf and gonville-brace.otf in a directory where
+lilypond can find them (use the --include option to extend the search
+path)."
+
+}
+
+\version "2.13.6"
+
+\paper {
+ myStaffSize = 20
+
+ %% bogus statement, because myStaffSize must be assigned before
+ %% the scheme statement starts parsing.
+ bogus = 42
+
+ #(add-music-fonts fonts "gonville" 'gonville '(20)
+ (/ myStaffSize 20))
+}
+
+sampleMusic = \relative c'' {
+ a4-\trill_\f b8 c16 d32
+}
+
+
+{
+ \set Staff.instrumentName = #"Default"
+ \sampleMusic
+}
+
+\score {
+ {
+ \set Staff.instrumentName = #"Feta"
+ \sampleMusic
+ }
+ \layout {
+ #(define font-defaults
+ '((font-family . feta) (font-encoding . fetaMusic)))
+ }
+}
+
+\score {
+ \relative c'' {
+ \set Staff.instrumentName = #"Gonv"
+ \sampleMusic
+ }
+ \layout {
+ #(define font-defaults
+ '((font-family . gonville) (font-encoding . fetaMusic)))
+ }
+}
+
+\relative c''
+{
+ \set Staff.instrumentName = #"Gonv override"
+ c2^\trill c
+ \override NoteHead #'font-family = #'gonville
+ \override Script #'font-family = #'gonville
+ c^\trill c
+}
+++ /dev/null
-\header {
-
- texidoc = "The default music font can be overridden by setting
- @code{(font-family . gonville)} in the @code{font-defaults} in the
- paper block."
-
-}
-
-\version "2.13.6"
-
-\paper {
- % Load the alternative font definitions into the font tree.
-% temporarily disabled to allow a release. -gp
-% #(add-music-fonts fonts "gonville" 'gonville (/ staff-height (* 20 pt)))
-}
-
-%{
- Note: for this to work, do something like
-
- wget -P out http://www.chiark.greenend.org.uk/~sgtatham/gonville/gonville-r8724.tar.gz
- tar xzf out/gonville-r8724.tar.gz
- ln out/gonville-r8724/lilyfonts/otf/gonville* out/share/lilypond/current/fonts/otf/
- (cd out/share/lilypond/current/fonts/otf && for i in gonville*; do mv $i $(echo $i | sed s/gonville/gonville-/); done)
-
-
- To show all available fonts, do
-
- lilypond -dshow-available-fonts blabla
-
-%}
-
-\relative c'' {
- \set Staff.instrumentName = #"Default"
- a4-\trill b8 c16 d32
-}
-
-\score {
- \relative c'' {
- \set Staff.instrumentName = #"Feta"
- a4-\trill b8
- c16 d32
- }
- \layout {
- #(define font-defaults
- '((font-family . feta) (font-encoding . fetaMusic)))
- }
-}
-
-\score {
- \relative c'' {
-% temporarily disabled to allow a release. -gp
-% \set Staff.instrumentName = #"Gonville"
- a4-\trill b8 c16 d32
- }
- \layout {
- #(define font-defaults
- '((font-family . gonville) (font-encoding . fetaMusic)))
- }
-}
" additional SFNT font tables called @code{LILC},"
" @code{LILF}, and @code{LILY}, needed for typesetting"
" musical elements. Currently, only the Emmentaler and"
- " the Aybabtu fonts fulfill these requirements.\n"
+ " the Emmentaler-Brace fonts fulfill these requirements.\n"
"\n"
"Note that only @code{ly:font-get-glyph} and derived"
" code (like @code{\\lookup}) can access glyphs from"
"\n"
"Note that this command can only be used to access glyphs from"
" fonts loaded with @code{ly:system-font-load}; currently, this"
- " means either the Emmentaler or Aybabtu fonts, corresponding"
+ " means either the Emmentaler or Emmentaler-Brace "
+ " fonts, corresponding"
" to the font encodings @code{fetaMusic} and @code{fetaBraces},"
" respectively.")
{
"\n"
"Note that this command can only be used to access glyphs from"
" fonts loaded with @code{ly:system-font-load}; currently, this"
- " means either the Emmentaler or Aybabtu fonts, corresponding"
+ " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
" to the font encodings @code{fetaMusic} and @code{fetaBraces},"
" respectively.")
{
"\n"
"Note that this command can only be used to access glyphs from"
" fonts loaded with @code{ly:system-font-load}; currently, this"
- " means either the Emmentaler or Aybabtu fonts, corresponding"
+ " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
" to the font encodings @code{fetaMusic} and @code{fetaBraces},"
" respectively.")
{
"\n"
"Note that this command can only be used to access glyphs from"
" fonts loaded with @code{ly:system-font-load}; currently, this"
- " means either the Emmentaler or Aybabtu fonts, corresponding"
+ " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
" to the font encodings @code{fetaMusic} and @code{fetaBraces},"
" respectively.")
{
"\n"
"Note that this command can only be used to access glyphs from"
" fonts loaded with @code{ly:system-font-load}; currently, this"
- " means either the Emmentaler or Aybabtu fonts, corresponding"
+ " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
" to the font encodings @code{fetaMusic} and @code{fetaBraces},"
" respectively.")
{
BRACES = a b c d e f g h i
OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
- $(outdir)/aybabtu.otf
+ $(outdir)/emmentaler-brace.otf
PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe)
OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
$(BRACES:%=$(outdir)/feta-braces-%.otf-table)
ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
-$(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
+$(outdir)/emmentaler-brace.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
cat $^ > $@
-$(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
+$(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
echo '(design_size . 20)' > $@
$(outdir)/feta%.otf-gtable
cd $(outdir) && $(FONTFORGE) -script $(notdir $(basename ,$@).pe)
-$(outdir)/aybabtu.otf \
-$(outdir)/aybabtu.svg: $(outdir)/aybabtu.pe \
+$(outdir)/emmentaler-brace.otf \
+$(outdir)/emmentaler-brace.svg: $(outdir)/emmentaler-brace.pe \
$(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
- $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
- cd $(outdir) && $(FONTFORGE) -script aybabtu.pe
+ $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable
+ cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
$(outdir)/%.pfb: $(outdir)/%.log
$(outdir)/parmesan11.lisp \
$(outdir)/feta-alphabet11.lisp
-$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts \
- $(outdir)/aybabtu.fontname \
- $(outdir)/aybabtu.otf-table \
- $(outdir)/aybabtu.otf-gtable \
- $(outdir)/aybabtu.pe
+$(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \
+ $(outdir)/emmentaler-brace.fontname \
+ $(outdir)/emmentaler-brace.otf-table \
+ $(outdir)/emmentaler-brace.otf-gtable \
+ $(outdir)/emmentaler-brace.pe
-$(outdir)/aybabtu.otf \
-$(outdir)/aybabtu.svg: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
+$(outdir)/emmentaler-brace.otf \
+$(outdir)/emmentaler-brace.svg: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
-$(outdir)/aybabtu.fontname:
- echo -n 'aybabtu' > $@
-$(outdir)/aybabtu.subfonts:
+$(outdir)/emmentaler-brace.fontname:
+ echo -n 'emmentaler-brace' > $@
+$(outdir)/emmentaler-brace.subfonts:
echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
$(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts
+++ /dev/null
-#!@FONTFORGE@
-# all your brace are belong to us
-
-Open("feta-braces-b.pfb");
-SelectAll();
-Scale(200, 0, 0);
-Generate("feta-braces-b.scale.pfb");
-
-Open("feta-braces-c.pfb");
-SelectAll();
-Scale(300, 0, 0);
-Generate("feta-braces-c.scale.pfb");
-
-Open("feta-braces-d.pfb");
-SelectAll();
-Scale(400, 0, 0);
-Generate("feta-braces-d.scale.pfb");
-
-Open("feta-braces-e.pfb");
-SelectAll();
-Scale(500, 0, 0);
-Generate("feta-braces-e.scale.pfb");
-
-Open("feta-braces-f.pfb");
-SelectAll();
-Scale(600, 0, 0);
-Generate("feta-braces-f.scale.pfb");
-
-Open("feta-braces-g.pfb");
-SelectAll();
-Scale(700, 0, 0);
-Generate("feta-braces-g.scale.pfb");
-
-Open("feta-braces-h.pfb");
-SelectAll();
-Scale(800, 0, 0);
-Generate("feta-braces-h.scale.pfb");
-
-Open("feta-braces-i.pfb");
-SelectAll();
-Scale(900, 0, 0);
-Generate("feta-braces-i.scale.pfb");
-
-
-New()
-
-MergeFonts("feta-braces-a.pfb");
-MergeFonts("feta-braces-b.scale.pfb");
-MergeFonts("feta-braces-c.scale.pfb");
-MergeFonts("feta-braces-d.scale.pfb");
-MergeFonts("feta-braces-e.scale.pfb");
-MergeFonts("feta-braces-f.scale.pfb");
-MergeFonts("feta-braces-g.scale.pfb");
-MergeFonts("feta-braces-h.scale.pfb");
-MergeFonts("feta-braces-i.scale.pfb");
-
-SetFontNames("Aybabtu-Regular", "Aybabtu", "Aybabtu Regular", "Regular", "GNU GPL", "@TOPLEVEL_VERSION@");
-
-i = 0;
-while (i < CharCnt())
- Select(i);
-# crashes fontforge, use PUA for now -- jcn
-# SetUnicodeValue(i + 0xF0000, 0);
-/*
-PRIVATE AREA
- In the BMP, the range 0xe000 to 0xf8ff will never be assigned to any
- characters by the standard and is reserved for private usage. For the
- Linux community, this private area has been subdivided further into the
- range 0xe000 to 0xefff which can be used individually by any end-user
- and the Linux zone in the range 0xf000 to 0xf8ff where extensions are
- coordinated among all Linux users. The registry of the characters
- assigned to the Linux zone is currently maintained by H. Peter Anvin
- <Peter.Anvin@linux.org>.
-*/
- SetUnicodeValue(i + 0xE000, 0);
- ++i;
-endloop
-
-LoadTableFromFile("LILF", "aybabtu.subfonts")
-LoadTableFromFile("LILC", "aybabtu.otf-table")
-LoadTableFromFile("LILY", "aybabtu.otf-gtable")
-
-Generate("aybabtu.otf");
-Generate("aybabtu.svg");
--- /dev/null
+#!@FONTFORGE@
+# all your brace are belong to us
+
+Open("feta-braces-b.pfb");
+SelectAll();
+Scale(200, 0, 0);
+Generate("feta-braces-b.scale.pfb");
+
+Open("feta-braces-c.pfb");
+SelectAll();
+Scale(300, 0, 0);
+Generate("feta-braces-c.scale.pfb");
+
+Open("feta-braces-d.pfb");
+SelectAll();
+Scale(400, 0, 0);
+Generate("feta-braces-d.scale.pfb");
+
+Open("feta-braces-e.pfb");
+SelectAll();
+Scale(500, 0, 0);
+Generate("feta-braces-e.scale.pfb");
+
+Open("feta-braces-f.pfb");
+SelectAll();
+Scale(600, 0, 0);
+Generate("feta-braces-f.scale.pfb");
+
+Open("feta-braces-g.pfb");
+SelectAll();
+Scale(700, 0, 0);
+Generate("feta-braces-g.scale.pfb");
+
+Open("feta-braces-h.pfb");
+SelectAll();
+Scale(800, 0, 0);
+Generate("feta-braces-h.scale.pfb");
+
+Open("feta-braces-i.pfb");
+SelectAll();
+Scale(900, 0, 0);
+Generate("feta-braces-i.scale.pfb");
+
+
+New()
+
+MergeFonts("feta-braces-a.pfb");
+MergeFonts("feta-braces-b.scale.pfb");
+MergeFonts("feta-braces-c.scale.pfb");
+MergeFonts("feta-braces-d.scale.pfb");
+MergeFonts("feta-braces-e.scale.pfb");
+MergeFonts("feta-braces-f.scale.pfb");
+MergeFonts("feta-braces-g.scale.pfb");
+MergeFonts("feta-braces-h.scale.pfb");
+MergeFonts("feta-braces-i.scale.pfb");
+
+SetFontNames("Emmentaler-Brace-Regular", "Emmentaler-Brace", "Emmentaler-Brace Regular", "Regular", "GNU GPL", "@TOPLEVEL_VERSION@");
+
+i = 0;
+while (i < CharCnt())
+ Select(i);
+# crashes fontforge, use PUA for now -- jcn
+# SetUnicodeValue(i + 0xF0000, 0);
+/*
+PRIVATE AREA
+ In the BMP, the range 0xe000 to 0xf8ff will never be assigned to any
+ characters by the standard and is reserved for private usage. For the
+ Linux community, this private area has been subdivided further into the
+ range 0xe000 to 0xefff which can be used individually by any end-user
+ and the Linux zone in the range 0xf000 to 0xf8ff where extensions are
+ coordinated among all Linux users. The registry of the characters
+ assigned to the Linux zone is currently maintained by H. Peter Anvin
+ <Peter.Anvin@linux.org>.
+*/
+ SetUnicodeValue(i + 0xE000, 0);
+ ++i;
+endloop
+
+LoadTableFromFile("LILF", "emmentaler-brace.subfonts")
+LoadTableFromFile("LILC", "emmentaler-brace.otf-table")
+LoadTableFromFile("LILY", "emmentaler-brace.otf-gtable")
+
+Generate("emmentaler-brace.otf");
+Generate("emmentaler-brace.svg");
switches off the flag.")
(font-encoding ,symbol? "The font encoding is the broadest
category for selecting a font. Currently, only lilypond's system
-fonts (Emmentaler and Aybabtu) are using this property. Available
-values are @code{fetaMusic} (Emmentaler), @code{fetaBraces} (Aybabtu),
+fonts (Emmentaler) are using this property. Available
+values are @code{fetaMusic} (Emmentaler), @code{fetaBraces},
@code{fetaNumber} (Emmentaler), and @code{fetaDynamic} (Emmentaler).")
(font-family ,symbol? "The font family is the broadest category
for selecting text fonts. Options include: @code{sans},
;; Each size family is a vector of fonts, loaded with a delay. The
;; vector should be sorted according to ascending design size.
-(define-public (add-music-fonts node name family factor)
+(define-public (add-music-fonts node name family design-size-list factor)
+ "Setup 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-LIST is a list of numbers, used as suffix for font filenames
+ FACTOR is size factor relative to default size that is being used. This is used
+ to select the proper design size for text fonts.
+"
(for-each
(lambda (x)
(add-font node
`((fetaDynamic ,(ly:pt 20.0) ,feta-alphabet-size-vector)
(fetaNumber ,(ly:pt 20.0) ,feta-alphabet-size-vector)
(fetaMusic ,(ly:pt 20.0)
- #(
- ,(delay (ly:system-font-load (string-append name "-11")))
- ,(delay (ly:system-font-load (string-append name "-13")))
- ,(delay (ly:system-font-load (string-append name "-14")))
- ,(delay (ly:system-font-load (string-append name "-16")))
- ,(delay (ly:system-font-load (string-append name "-18")))
- ,(delay (ly:system-font-load (string-append name "-20")))
- ,(delay (ly:system-font-load (string-append name "-23")))
- ,(delay (ly:system-font-load (string-append name "-26")))
- ))
+ ,(list->vector
+ (map (lambda (size)
+ (delay (ly:system-font-load (format "~a-~a" name size))))
+ design-size-list
+ )))
(fetaBraces ,(ly:pt 20.0)
#(,(delay (ly:system-font-load
- ;;; TODO: rename aybabtu to emmentaler-brace
- (if (string=? name "emmentaler")
- "aybabtu"
- (string-append name "-brace"))
- )))))))
-
+ (format "~a-brace" name)))))
+ )))
+
(define-public (add-pango-fonts node lily-family family factor)
;; Synchronized with the `text-font-size' variable in
;; layout-set-absolute-staff-size-in-module (see paper.scm).
(define-public (make-pango-font-tree roman-str sans-str typewrite-str factor)
(let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
- (add-music-fonts n "emmentaler" 'feta factor)
-;; Let's not do this [yet], see input/regression/gonville.ly
-;; (add-music-fonts n "gonville" 'gonville factor)
+ (add-music-fonts n "emmentaler" 'feta '(11 13 14 16 18 20 23 26) factor)
(add-pango-fonts n 'roman roman-str factor)
(add-pango-fonts n 'sans sans-str factor)
(add-pango-fonts n 'typewriter typewrite-str factor)
(define (internal-font? file-name)
(or (string-startswith file-name "Emmentaler")
(string-startswith file-name "emmentaler")
- (string-startswith file-name "aybabtu")
- (string-startswith file-name "Aybabtu")))
+ ))
(define (load-font-via-GS font-name-filename)
(define (ps-load-file file-name)
(string-length font)))
(let* ((font-name (ly:font-name font))
(full-name (if font-name font-name (ly:font-file-name font))))
- (if (string-prefix? "Aybabtu" full-name)
- "aybabtu"
- (string-downcase full-name)))))
+ (string-downcase full-name))))
(define-public (modified-font-metric-font-scaling font)
(let* ((designsize (ly:font-design-size font))