* scm/translation-functions.scm (format-mark-box-numbers): add.
patch by Erlend Aasland
+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
BUG HUNTERS/SUGGESTIONS
+Erlend Aasland
Johannes Schindelin
Andreas Scherer
Arjan Bos
/* 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;
class Pango_font : public Font_metric
{
PangoContext *context_;
- PangoFontDescription *description_;
+ PangoFontDescription *pango_description_;
PangoAttrList *attribute_list_;
Real scale_;
SCM subfonts_;
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);
}
/* 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;
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)
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
return b;
}
- if (output_format_global == "tex")
+ if (output_backend_global == "tex")
{
b = tex_kludge (text);
return b;
#include <pango/pangoft2.h>
+#include "main.hh"
#include "lookup.hh"
#include "dimensions.hh"
#include "pango-font.hh"
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();
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_);
}
return item_stencil;
}
-Stencil
-Pango_font::direct_pango_text_stencil (String str) const
-{
-
-
-}
Stencil
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 ()));
/* 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 != "-")
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 ());
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 ();
(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)))))