]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/main.hh: rename format to backend.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Jan 2005 22:21:40 +0000 (22:21 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Jan 2005 22:21:40 +0000 (22:21 +0000)
* scm/translation-functions.scm (format-mark-box-numbers): add.
patch by Erlend Aasland

ChangeLog
THANKS
lily/include/main.hh
lily/include/pango-font.hh
lily/lily-parser.cc
lily/main.cc
lily/modified-font-metric.cc
lily/pango-font.cc
lily/paper-book.cc
lily/text-item.cc
scm/translation-functions.scm

index 046552ddd8815fffaa3fb565c4f77f29d4e8439b..7766add75a4a9d6a4c4f8e7576807c7110991ba4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/include/main.hh: rename format to backend.
+
+       * scm/translation-functions.scm (format-mark-box-numbers): add.
+       patch by Erlend Aasland
+
 2005-01-03  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/pango-font.cc (text_stencil): dump string as (utf-8-string
diff --git a/THANKS b/THANKS
index b2b930fa5423b2b0a1bc85be6b8f69a8acd249dd..c0d3c6986e228cfb40d7bb408627b3ae5a3e3994 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -25,6 +25,7 @@ Jonathan Walther
 
 BUG HUNTERS/SUGGESTIONS
 
+Erlend Aasland
 Johannes Schindelin
 Andreas Scherer
 Arjan Bos
index 02d8e1fa396cb2c0b8d6aa58109586cd1b9e27f1..3ff399afc5b915ead7fd2ffc322c92f5c9618189 100644 (file)
@@ -28,7 +28,7 @@ extern String init_name_global;
 /* options */
 extern Array<String> dump_header_fieldnames_global;
 extern bool no_layout_global_b;
-extern String output_format_global;
+extern String output_backend_global;
 extern String output_name_global;
 extern bool safe_global_b;
 extern bool verbose_global_b;
index 77139c08b88ba21b04ec2addb09c85e098017c00..750515b648a5242037c1cb94b33dda2b5b9c8cbd 100644 (file)
@@ -22,7 +22,7 @@
 class Pango_font : public Font_metric
 {
   PangoContext *context_;
-  PangoFontDescription *description_; 
+  PangoFontDescription *pango_description_; 
   PangoAttrList *attribute_list_;
   Real scale_;
   SCM subfonts_;
index feb9943a7c26c6e305751bf6045635276b9fb820..456702e079e965c05d6fbd43bb663f33b3c60f9c 100644 (file)
@@ -86,7 +86,7 @@ Lily_parser::print_smob (SCM s, SCM port, scm_print_state*)
 void
 Lily_parser::parse_file (String init, String name, String out_name)
 {
-  if (output_format_global == "tex")
+  if (output_backend_global == "tex")
     {
       try_load_text_metrics (out_name); 
     }
index c75826be295876693e528ba9a7825fbfe4d542cf..85de1661a9975aee36539233ab7f2b4aa8088122 100644 (file)
@@ -46,7 +46,7 @@ bool no_layout_global_b = false;
 /* Selected output format.
    One of tex, ps, scm, as.
 */
-String output_format_global = "ps";
+String output_backend_global = "ps";
 
 /* Current output name. */
 String output_name_global;
@@ -254,9 +254,9 @@ prepend_load_path (String dir)
 static void
 determine_output_options ()
 {
-  bool found_gnome = (output_format_global == "gnome");
-  bool found_svg = (output_format_global == "svg");
-  bool found_tex = (output_format_global == "tex");
+  bool found_gnome = (output_backend_global == "gnome");
+  bool found_svg = (output_backend_global == "svg");
+  bool found_tex = (output_backend_global == "tex");
 
 
   if (make_pdf || make_png)
@@ -416,7 +416,7 @@ parse_argv (int argc, char **argv)
              printf (_ ("Read the sources for more information.").to_str0 ());
              exit (0);
            }
-         output_format_global = option_parser->optional_argument_str0_;
+         output_backend_global = option_parser->optional_argument_str0_;
          break;
        case 'H':
          dump_header_fieldnames_global
index 67f30b3f4fd0c4447e6bf993b27e091bf514d832..fce72a1abace0222cae6f2120e5a0fd4f53b2f75 100644 (file)
@@ -187,7 +187,7 @@ Modified_font_metric::text_dimension (String text) const
       return b;
     }
 
-  if (output_format_global == "tex")
+  if (output_backend_global == "tex")
     {
       b = tex_kludge (text);
       return b;
index fbdf13ba05a1717b10a7798c3de49dd40d7d1c84..dbd41e443bed15f0d96383676ee18c73b32fb00e 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <pango/pangoft2.h>
 
+#include "main.hh"
 #include "lookup.hh"
 #include "dimensions.hh"
 #include "pango-font.hh"
@@ -31,7 +32,7 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap,
   context_ =
     pango_ft2_get_context (PANGO_RESOLUTION, PANGO_RESOLUTION);
 
-  description_ = pango_font_description_copy (description);
+  pango_description_ = pango_font_description_copy (description);
   //  context_ = pango_ft2_font_map_create_context (fontmap);  
   attribute_list_= pango_attr_list_new();
 
@@ -49,7 +50,7 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap,
 
 Pango_font::~Pango_font ()
 {
-  pango_font_description_free (description_);
+  pango_font_description_free (pango_description_);
   g_object_unref (context_);
   pango_attr_list_unref (attribute_list_);
 }
@@ -133,12 +134,6 @@ Pango_font::pango_item_string_stencil (PangoItem *item, String str, Real dx) con
   return item_stencil;  
 }
 
-Stencil
-Pango_font::direct_pango_text_stencil (String str) const
-{
-
-
-}
 
 Stencil
 Pango_font::text_stencil (String str) const
@@ -164,14 +159,14 @@ Pango_font::text_stencil (String str) const
       ptr = ptr->next;      
     }
 
-  if (output_format_global != "ps")
+  if (output_backend_global != "ps")
     {
       /*
        For Pango based backends, we take a shortcut.
        */
       SCM exp
        = scm_list_3 (ly_symbol2scm ("utf-8-string"),
-                     scm_makfrom0str (pango_font_description_to_filename (description_)),
+                     scm_makfrom0str (pango_font_description_to_filename (pango_description_)),
                      scm_makfrom0str (str.to_str0 ()));
 
 
index 8ce6188fa5d13e0c54f82a18dd2d5af48667c467..353d28572c35a40115abbf75e0f929cc7fcbec64 100644 (file)
@@ -139,7 +139,7 @@ Paper_book::output (String outname)
   /* Generate all stencils to trigger font loads.  */
   pages ();
   
-  String format = output_format_global;
+  String format = output_backend_global;
   String file_name = outname;
       
   if (file_name != "-")
@@ -207,7 +207,7 @@ Paper_book::classic_output (String outname)
     scopes = scm_cons (score_systems_[0].header_, scopes);
   //end ugh
 
-  String format = output_format_global;
+  String format = output_backend_global;
   String mod_nm = "scm framework-" + format;
       
   SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
index 9e32dba9590fab3975db997c0defc8b1ef7beb32..066789fad871277e3b3c8b938b06eeb9da2cef13 100644 (file)
@@ -38,8 +38,8 @@ Text_interface::interpret_string (SCM layout_smob,
   String str = ly_scm2string (markup);
 
 #if HAVE_PANGO_FT2
-  if (output_format_global != "tex"
-      && output_format_global != "texstr")
+  if (output_backend_global != "tex"
+      && output_backend_global != "texstr")
     {
       Font_metric *fm = select_pango_font (layout, props);
       return fm->text_stencil (str).smobbed_copy ();
index a4228e8fd9de20387d9e2af07fab7fc6425b43f8..8d8a5fcbf2689518365ca3261c82c3557f9da439 100644 (file)
@@ -34,3 +34,8 @@
 (define-public (format-mark-numbers mark context)
   (make-bold-markup (number->string mark)))
 
+(define-public (format-mark-box-letters mark context)
+  (make-bold-markup (make-box-markup (make-markletter-markup (1- mark)))))
+
+(define-public (format-mark-box-numbers mark context)
+  (make-bold-markup (make-box-markup (make-markletter-markup (1- mark)))))