]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh+git://jneem@git.sv.gnu.org/srv/git/lilypond
authorJoe Neeman <joeneeman@gmail.com>
Sun, 3 Dec 2006 12:27:00 +0000 (14:27 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Sun, 3 Dec 2006 12:27:00 +0000 (14:27 +0200)
13 files changed:
.gitignore
Documentation/topdocs/NEWS.tely
THANKS
lily/accidental-placement.cc
lily/all-font-metrics.cc
lily/include/all-font-metrics.hh
lily/include/font-metric.hh
lily/include/open-type-font.hh
lily/main.cc
lily/pango-font.cc
lily/separation-item.cc
scm/lily.scm
stepmake/aclocal.m4

index 64f8beaac7411d080b9b4e5a6d2112ffdd0a545c..10f95a70a904dcb6d23c01f2b9a6c644a9ca9f2f 100644 (file)
@@ -33,3 +33,7 @@ gcstat*.scm
 *-midi.ly
 a.out
 .dotest
+/.sconf_temp
+out-scons
+/.sconsign.dblite
+/scons.cache
index 2c561886c76dbf0362fa260144d23cefeed05ee7..528204b090e7dca18a8bafbf5105e7ef09199923 100644 (file)
@@ -94,7 +94,9 @@ now positioned automatically to avoid collisions.
 uneven vertical spacing.
 
 @lilypond[ragged-right]
-#(set-default-paper-size "a6" 'landscape)
+
+%% todo: fix 'landscape PDF.
+#(set-default-paper-size "a6" )
 \header {
   tagline = ##f
 }
diff --git a/THANKS b/THANKS
index 38623616d3e9f0a7703e42120e7dcfd69067204a..e7d226a2d8311b5513e6d2a36033699b52bb1c5c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -2,6 +2,27 @@ Release 2.10
 ************
 
 
+
+DEVELOPMENT TEAM
+
+Han-Wen Nienhuys  - Core development
+Jan Nieuwenhuizen - Core development
+Joe Neeman        - Core development
+Graham Percival   - Documentation Editor and Bug Meister
+Mats Bengtsson    - Support Guru 
+
+
+BUG HUNTERS/SUGGESTIONS
+
+Phillip Kirlin
+
+
+
+
+Release 2.10
+************
+
+
 DEVELOPMENT TEAM
 
 Han-Wen Nienhuys  - Core development
index 71c6af771ead00ccdbaf94586afd3f9cbd4af606..f8245b0cbf08edd7bd0b00e16fd30735cd563764 100644 (file)
@@ -316,6 +316,19 @@ Accidental_placement::calc_positioning_done (SCM smob)
   common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS);
   common[Y_AXIS] = common_refpoint_of_array (stems, common[Y_AXIS], Y_AXIS);
 
+  for (vsize i = 0; i < heads.size  (); i++)
+    {
+      if (Grob *s = Rhythmic_head::get_stem (heads[i]))
+       {
+         stems.push_back (s);
+         common[Y_AXIS] = s->common_refpoint (common[Y_AXIS], Y_AXIS);
+       }
+    }
+
+  vector_sort (stems, less<Grob*> ());
+  uniq (stems);
+  
+
   for (vsize i = apes.size (); i--;)
     {
       Accidental_placement_entry *ape = apes[i];
index 4d95f9e6c1c00fd4aab59a5b1f3e7f6e0d38f202..bf2aadd4bb057cc6252538665fe756f2fb9b6b67 100644 (file)
 #include "scm-hash.hh"
 #include "warn.hh"
 
+
+Index_to_charcode_map const *
+All_font_metrics::get_index_to_charcode_map (string filename, FT_Face face)
+{
+  if (filename_charcode_maps_map_.find (filename)
+      == filename_charcode_maps_map_.end ())
+    filename_charcode_maps_map_[filename] = make_index_to_charcode_map (face);
+
+  return &filename_charcode_maps_map_[filename];
+}
+
+
 All_font_metrics::All_font_metrics (string path)
 {
   otf_dict_ = new Scheme_hash_table;
@@ -166,6 +178,17 @@ All_font_metrics::find_font (string name)
 
 All_font_metrics *all_fonts_global;
 
+LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
+          (),
+          "Forget all about previously loaded fonts. ")
+{
+  delete all_fonts_global;
+  all_fonts_global = new All_font_metrics (global_path.to_string ());
+
+  return SCM_UNSPECIFIED;
+}
+
+
 LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
           (SCM name),
           "Load the font @var{name}. ")
@@ -177,3 +200,4 @@ LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
   return fm->self_scm ();
 }
 
+
index c8c0de2f0a78f748bb61d70b9423c8666e1541c1..34a05e701f21cb1a5ae16b276ceaa8122b0ab729 100644 (file)
@@ -18,7 +18,8 @@
 #include <pango/pangoft2.h>
 #endif
 
-/**
+
+/*
    Interface to all .afm files living in the filesystem.
 */
 class All_font_metrics
@@ -32,8 +33,13 @@ class All_font_metrics
   int pango_dpi_;
 #endif
 
+  map<string, Index_to_charcode_map > filename_charcode_maps_map_;
+  
   All_font_metrics (All_font_metrics const &);
 public:
+
+  Index_to_charcode_map const *get_index_to_charcode_map (string filename, FT_Face face);
+
   All_font_metrics (string search_path);
   ~All_font_metrics ();
 
@@ -49,6 +55,7 @@ public:
 };
 
 extern All_font_metrics *all_fonts_global;
+SCM ly_reset_all_fonts ();
 
 #endif /* ALL_FONTS_HH */
 
index dfcd1e80035378121974ec2347826cc368dab0b4..1107ba9af8e4d08fd6231f60f7ed2279078cbd0d 100644 (file)
 #include "lily-proto.hh"
 #include "smobs.hh"
 #include "virtual-methods.hh"
+#include "freetype.hh"
+
+#include <map>
+using namespace std;
+
+typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
 
 class Font_metric
 {
index c0490be6e5042f0c28c4908ad2313841888015a6..9cd34497ab26240a7dbfb605af528d5370a42fbf 100644 (file)
@@ -9,13 +9,9 @@
 #ifndef OPEN_TYPE_FONT_HH
 #define OPEN_TYPE_FONT_HH
 
-#include <map>
-using namespace std;
 
-#include "freetype.hh"
 #include "font-metric.hh"
 
-typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
 Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
 void get_unicode_name (char*s, FT_ULong code);
 void get_glyph_index_name (char*s, FT_ULong code);
@@ -58,4 +54,5 @@ public:
 string get_otf_table (FT_Face face, string tag);
 FT_Face open_ft_face (string str);
 
+
 #endif /* OPEN_TYPE_FONT_HH */
index 9a21728eb308e2c370d1cbda54ae3c67128f007f..728cd89508570f2fff306e3dd3a9ddc679c9c5bb 100644 (file)
@@ -393,8 +393,7 @@ main_with_guile (void *, int, char **)
   init_fontconfig ();
 
   init_freetype ();
-
-  all_fonts_global = new All_font_metrics (global_path.to_string ());
+  ly_reset_all_fonts ();
 
   if (!init_scheme_variables.empty ()
       || !init_scheme_code_string.empty ())
@@ -601,13 +600,19 @@ setup_guile_env ()
   bool overwrite = true;
   if (!yield)
     {
-      yield = "70";
+      yield = "65";
       overwrite = false;
     }
 
   sane_putenv ("GUILE_MIN_YIELD_1", yield, overwrite);
   sane_putenv ("GUILE_MIN_YIELD_2", yield, overwrite);
   sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
+
+
+  sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1",
+              "10485760", overwrite);
+  sane_putenv ("GUILE_MAX_SEGMENT_SIZE",
+              "104857600", overwrite);
 }
 
 void
index ca08a4b0d23c8fc42357d77d38a3b57456d9406d..3d58e0dd0ed69cbbd4a701b425d6c94e3d27549e 100644 (file)
@@ -15,9 +15,6 @@
 /* Ugh.  */
 
 #include "pango-font.hh"
-
-#include "open-type-font.hh"   // Index_to_charcode_map
-
 #include "dimensions.hh"
 #include "file-name.hh"
 #include "international.hh"
@@ -25,6 +22,7 @@
 #include "main.hh"
 #include "string-convert.hh"
 #include "warn.hh"
+#include "all-font-metrics.hh"
 
 #if HAVE_PANGO_FT2
 #include "stencil.hh"
@@ -82,22 +80,6 @@ Pango_font::derived_mark () const
 }
 
 
-map<string, Index_to_charcode_map > filename_charcode_maps_map;
-Index_to_charcode_map const *get_index_to_charcode_map (string postscript_name, FT_Face face);
-
-
-Index_to_charcode_map const *
-get_index_to_charcode_map (string filename, FT_Face face)
-{
-  if (filename_charcode_maps_map.find (filename) == filename_charcode_maps_map.end ())
-    filename_charcode_maps_map[filename] = make_index_to_charcode_map (face);
-
-  if (filename_charcode_maps_map.find (filename) == filename_charcode_maps_map.end ())
-    return 0;
-  
-  return &filename_charcode_maps_map[filename];
-}
-
 void
 get_glyph_index_name (char *s, FT_ULong code)
 {
@@ -165,7 +147,7 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
   Index_to_charcode_map const *cmap = 0;
   bool has_glyph_names = ftface->face_flags & FT_FACE_FLAG_GLYPH_NAMES;
   if  (! has_glyph_names)
-    cmap = get_index_to_charcode_map (file_name, ftface);
+    cmap = all_fonts_global->get_index_to_charcode_map (file_name, ftface);
 
   bool is_ttf = string (FT_Get_X11_Font_Format (ftface)) == "TrueType";
   bool cid_keyed = false;
index 79f1f81caa224fb5e424df0227e24b2a71c52e79..4a7f0f06720bb67d5779f434021ddfc90ac2c3c6 100644 (file)
@@ -258,11 +258,11 @@ Separation_item::extremal_break_aligned_grob (Grob *me,
 
 ADD_INTERFACE (Separation_item,
               "Item that computes widths to generate spacing rods. "
-              "This is done in concert with @ref{separation-spanner-interface}.",
+              "This is done in concert with @ref{separating-group-spanner-interface}.",
 
               "X-extent "
               "conditional-elements "
-              "elements"
+              "elements "
               "padding "
               "skylines "
               );
index c7dbb06e0f5208ac3a99a8af8d0071a205902308..954aa97d2af9c10d9568dcad47db2328f9702791 100644 (file)
@@ -363,34 +363,37 @@ The syntax is the same as `define*-public'."
                         ".scm"))
         (outfile    (open-file  out-file-name  "w")))
 
-    (display (format "Dumping gc protected objs to ~a...\n" out-file-name))
+    (display (format "Dumping GC statistics ~a...\n" out-file-name))
     (display
      (map (lambda (y)
            (let ((x (car y))
                  (c (cdr y)))
-             
-             (string-append
-              (string-join
-               (map object->string (list (object-address x) c x))
-               " ")
-              "\n")))
-
+             (display 
+              (format "~a (~a) = ~a\n" (object-address x) c x)
+              outfile)))
          (filter
           (lambda (x)
             (not (symbol? (car x))))
           protects))
      outfile)
 
-                                       ;    (display (ly:smob-protects))
+    (format outfile "\nprotected symbols: ~a\n"
+           (length (filter symbol?  (map car protects))))
+    
+            
+
+    ;; (display (ly:smob-protects))
     (newline outfile)
     (if (defined? 'gc-live-object-stats)
        (let* ((stats #f))
          (display "Live object statistics: GC'ing\n")
+         (ly:reset-all-fonts)
          (gc)
          (gc)
          (ly:set-option 'debug-gc-assert-parsed-dead #t)
          (gc)
-         
+         (ly:set-option 'debug-gc-assert-parsed-dead #f)
+
          (set! stats (gc-live-object-stats))
          (display "Dumping live object statistics.\n")
          
@@ -399,7 +402,26 @@ The syntax is the same as `define*-public'."
             (format outfile "~a: ~a\n" (car x) (cdr x)))
           (sort (gc-live-object-stats)
                 (lambda (x y)
-                  (string<? (car x) (car y)))))))))
+                  (string<? (car x) (car y)))))))
+
+
+    (newline outfile)
+    (let*
+       ((stats (gc-stats)))
+      
+      (for-each
+       (lambda (sym)
+        (display
+         (format "~a ~a ~a\n"
+                 gc-protect-stat-count
+                 sym
+                 (cdr (assoc sym stats)))
+         outfile))
+       '(protected-objects bytes-malloced cell-heap-size
+                          
+                          )))
+    
+    ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -512,12 +534,13 @@ The syntax is the same as `define*-public'."
 
     (for-each
      (lambda (x)
-       (ly:set-option 'debug-gc-assert-parsed-dead #f)
        (lilypond-file handler x)
        (ly:clear-anonymous-modules)
        (if (ly:get-option 'debug-gc)
-          (dump-gc-protects)))
-     
+          (dump-gc-protects)
+          (if (= (rand 40) 1)
+              (ly:reset-all-fonts))))
+
      files)
     failed))
 
index be97fa96de6dc2b1ff96b03d69f21050b5efa6e9..25a0f5426b65915f87b8c4e0831102b947db6a1f 100644 (file)
@@ -34,7 +34,7 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [
     ## grab the first version number in  --version output.
     eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '\(^\| \)[0-9][0-9]*\.[0-9]' \
         | head -n 1 \
-       | tr ' ' '\n' | grep '[0-9]\.[0-9]' | head -n 1 | sed 's/\([0-9.]*\).*/\1/g'\`\"
+       | tr ' ' '\n' | sed 's/\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/g' | grep '\(^\| \)[0-9][0-9]*\.[0-9]' | head -n 1\`\"
 
     if test -z "$_ver"; then
         ## If empty, try date [fontforge]