]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Unify fetaDynamic and fetaNumber into one fetaText encoding
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 5 Mar 2010 05:36:32 +0000 (02:36 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 7 Mar 2010 15:40:26 +0000 (12:40 -0300)
* Load fetaText through the emmentaler OTF font.

* Put Emmentaler design size into the font name.

* Stop installing PFB files.

Documentation/notation/text.itely
lily/font-config.cc
lily/time-signature.cc
mf/GNUmakefile
python/convertrules.py
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/font.scm

index c523f37596cd30c14914e0feea69c8c8fb45bc2f..d108520536a3e6b68108584112d71ffb8cad12c3 100644 (file)
@@ -1359,10 +1359,8 @@ a1^\markup {
   \vcenter {
     \override #'(font-encoding . fetaBraces)
     \lookup #"brace120"
-    \override #'(font-encoding . fetaNumber)
-    \column { 1 3 }
-    \override #'(font-encoding . fetaDynamic)
-    sf
+    \override #'(font-encoding . fetaText)
+    \column { 1 3 sf }
     \override #'(font-encoding . fetaMusic)
     \lookup #"noteheads.s0petrucci"
   }
index a7acda7cbad5b282e7acbcbe846d64fce07dfc00..cffe4d9d69dae10f6ad645ed7d15dee24a004037 100644 (file)
@@ -60,7 +60,6 @@ init_fontconfig ()
   /* Extra trailing slash suddenly breaks fontconfig (fc-cache 2.5.0)
      on windows.  */
   dirs.push_back (lilypond_datadir + "/fonts/otf");
-  dirs.push_back (lilypond_datadir + "/fonts/type1");
   
   for (vsize i = 0; i < dirs.size (); i++)
     {
index 768b2782eb631707d2e6ed39474a0b775cf4bee1..1beda1696c3d919a41cf42fbfede6d7297ccc8c0 100644 (file)
@@ -101,7 +101,7 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den)
 {
   SCM chain = me->get_property_alist_chain (Font_interface::text_font_alist_chain (me));
   chain = scm_cons (scm_list_1 (scm_cons (ly_symbol2scm ("font-encoding"),
-                                         ly_symbol2scm ("fetaNumber"))),
+                                         ly_symbol2scm ("fetaText"))),
                    chain);
 
   SCM sn = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
index 16bf2123df69f3911c4deb05c2d8afc26373ec23..85001b5b898cda08db41785e466304eefb9f4669 100644 (file)
@@ -124,7 +124,6 @@ $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts
        $< --dir=$(outdir)
 
 ALL_FONTS = $(FETA_FONTS)
-PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
 
 # Make tfm files first, log files last,
 # so that normally log files aren't made twice
@@ -133,7 +132,6 @@ ALL_GEN_FILES = $(LOG_FILES) \
                $(LISP_FILES) \
                $(OTF_TABLES) \
                $(NCSB_OTFS) \
-               $(PFB_FILES) \
                $(OTF_FILES) \
                $(SVG_FILES)
 
@@ -151,9 +149,6 @@ INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
 INSTALLATION_OUT_FILES2 = $(SVG_FILES)
 
-INSTALLATION_OUT_DIR3 = $(local_lilypond_datadir)/fonts/type1
-INSTALLATION_OUT_FILES3 = $(PFB_FILES)
-
 export MFINPUTS := .:$(MFINPUTS)
 
 
index 7111657ca1912d9adc265a927e2af00b013cf0bc..2f0409eb3c03d63d575242938a535d7d082b6de2 100644 (file)
@@ -2983,6 +2983,11 @@ def conv(str):
 
     return str
 
+@rule ((2, 13, 16),
+       _ ("Unify fetaNumber and fetaDynamic encodings"))
+def conv(str):
+    return re.sub(r'\bfeta(Number|Dynamic)', 'fetaText', str)
+    
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,
index ea8424dbe4e77bbb20ae9c581740dc50d119855f..72f6894703d6a1ee6e80e5b01e793b67f75a0188 100644 (file)
@@ -287,7 +287,7 @@ switches off the flag.")
 category for selecting a font.  Currently, only lilypond's system
 fonts (Emmentaler) are using this property.  Available
 values are @code{fetaMusic} (Emmentaler), @code{fetaBraces},
-@code{fetaNumber} (Emmentaler), and @code{fetaDynamic} (Emmentaler).")
+@code{fetaText} (Emmentaler).")
      (font-family ,symbol? "The font family is the broadest category
 for selecting text fonts.  Options include: @code{sans},
 @code{roman}.")
index efd310c1daaf6bf985e2b7dae363fd6a1822cd6a..8251fec8192086a91a9bd347105376c4de17856f 100644 (file)
     (DoublePercentRepeatCounter
      . (
        (direction . ,UP)
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (font-size . -2)
        (padding . 0.2)
        (self-alignment-X . ,CENTER)
 
        (direction . ,ly:script-interface::calc-direction)
        (extra-spacing-width . (+inf.0 . -inf.0))
-       (font-encoding . fetaDynamic)
+       (font-encoding . fetaText)
        (font-series . bold)
        (font-shape . italic)
        (outside-staff-priority . 250)
        (avoid-slur . around)
        (cross-staff . ,ly:side-position-interface::calc-cross-staff)
        (direction . ,ly:script-interface::calc-direction)
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (font-size . -5)                ; don't overlap when next to heads.
        (padding . 0.5)
        (positioning-done . ,ly:script-interface::calc-positioning-done)
      . (
        (bound-padding  . 2.0)
        (direction . ,UP)
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (padding . 0.4)
        (self-alignment-X . ,CENTER)
        (side-axis . ,Y)
     (PercentRepeatCounter
      . (
        (direction . ,UP)
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (font-size . -2)
        (padding . 0.2)
        (self-alignment-X . ,CENTER)
     (StringNumber
      . (
        (avoid-slur . around)
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (font-size . -5)                ; don't overlap when next to heads.
        (padding . 0.5)
        (script-priority . 100)
      . (
        (direction . ,UP)
        (edge-height . (2.0 . 2.0)) ;; staff-space;
-       (font-encoding . fetaNumber)
+       (font-encoding . fetaText)
        (font-size . -4)
        (stencil . ,ly:volta-bracket-interface::print)
        (thickness . 1.6) ;; line-thickness
index 9240681daddedb1d8937f4a59174ec8d9b8517d5..8d4d749770d129975a80113fce9fee9c9d6b5454 100644 (file)
@@ -1784,7 +1784,7 @@ may be any property supported by @rinternals{font-interface},
 }
 @end lilypond"
   (interpret-markup layout
-                    (cons '((font-size . -5) (font-encoding . fetaNumber)) props)
+                    (cons '((font-size . -5) (font-encoding . fetaText)) props)
                     arg))
 
 (define-markup-command (abs-fontsize layout props size arg)
@@ -1912,7 +1912,7 @@ some punctuation; it has no letters.
   }
 }
 @end lilypond"
-  (interpret-markup layout (prepend-alist-chain 'font-encoding 'fetaNumber props) arg))
+  (interpret-markup layout (prepend-alist-chain 'font-encoding 'fetaText props) arg))
 
 (define-markup-command (roman layout props arg)
   (markup?)
@@ -2117,7 +2117,7 @@ done in a different font.  The recommended font for this is bold and italic.
 }
 @end lilypond"
   (interpret-markup
-   layout (prepend-alist-chain 'font-encoding 'fetaDynamic props) arg))
+   layout (prepend-alist-chain 'font-encoding 'fetaText props) arg))
 
 (define-markup-command (text layout props arg)
   (markup?)
@@ -2560,7 +2560,7 @@ and continue with double letters.
          ; backward slashes might use slope and point in the other direction!
          (dy (* mag (if forward 0.4 -0.4)))
          (number-stencil (interpret-markup layout
-                                           (prepend-alist-chain 'font-encoding 'fetaNumber props)
+                                           (prepend-alist-chain 'font-encoding 'fetaText props)
                                            (number->string num)))
          (num-x (horizontal-slash-interval num forward (ly:stencil-extent number-stencil X) mag))
          (center (interval-center (ly:stencil-extent number-stencil Y)))
index ee5b08a4a298a61232eba079d5e494922d031f5a..92f08f8bde8254e85b215086c7ab55e1f42937f7 100644 (file)
 ;; lookup-font should be written in  C.
 ;;
 
+;; We have a tree, where each level of the tree is a qualifier
+;; (eg. encoding, family, shape, series etc.)  this defines the levels
+;; in the tree.  The first one is encoding, so we can directly select
+;; between text or music in the first step of the selection.
+(define default-qualifier-order
+  '(font-encoding font-family font-shape font-series))
+
 (define-class <Font-tree-element>
   ())
 
@@ -70,8 +77,6 @@
    (hash-table->alist (font-children node)))
   (display "} }\n"))
 
-(define default-qualifier-order
-  '(font-encoding font-family font-shape font-series))
 
 (define-method (add-font (node <Font-tree-node>) fprops size-family)
   (define (assoc-delete key alist)
   (g-lookup-font node alist-chain))
 
 
-;; Ugh.  Currently, we load the PFB Feta fonts for `fetaDynamic' with
+;; Ugh.  Currently, we load the PFB Feta fonts for `fetaText' with
 ;; Pango.  This should be changed to load the Emmentaler fonts instead
 ;; (with Pango too), but then we need support for a `font-style'
 ;; property which isn't implemented yet.
   (list->vector
    (map (lambda (tup)
          (cons (ly:pt (cdr tup))
-               (format "feta-alphabet~a ~a"
+               (format "emmentaler~a ~a"
                        (car tup)
                        (ly:pt (cdr tup)))))
        '((11 . 11.22)
@@ -159,8 +164,8 @@ Arguments:
  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.
+ FACTOR is size factor relative to default size that is being used.
+  This is used to select the proper design size for the text fonts.
 "
   (for-each
    (lambda (x)
@@ -169,8 +174,7 @@ Arguments:
                     (cons 'font-family family))
               (cons (* factor (cadr x))
                     (caddr x))))
-   `((fetaDynamic ,(ly:pt 20.0) ,feta-alphabet-size-vector)
-     (fetaNumber ,(ly:pt 20.0) ,feta-alphabet-size-vector)
+   `((fetaText ,(ly:pt 20.0) ,feta-alphabet-size-vector)
      (fetaMusic ,(ly:pt 20.0)
                ,(list->vector
                  (map (lambda (size)
@@ -227,9 +231,8 @@ Arguments:
 
 (define-public all-music-font-encodings
   '(fetaBraces
-    fetaDynamic
     fetaMusic
-    fetaNumber))
+    fetaText))
 
 (define-public (magstep s)
   (exp (* (/ s 6) (log 2))))