found.
* Documentation/user/changing-defaults.itely (Text encoding): node
on encoding.
2004-07-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/score-engraver.cc (initialize): abort if ecrm10.pfa not
+ found.
+
* lily/text-item.cc (interpret_string): insert encoding setting
here
does not specify encoding). The variable @code{inputencoding} may be
set to a string or symbol specifying the encoding, eg.
-@example
+@verbatim
\paper {
inputencoding = "latin1"
}
-@end example
+@end verbatim
There is a special encoding, called @code{TeX}. This encoding does not
reencode text for the font used. Rather, it tries to guess the width
@node Overview of text markup commands
@subsection Overview of text markup commands
-}
+
@include markup-commands.tely
#(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.3.8"
\encoding "latin1"
\header {
composer = "ARTHUR GRAY"
\consists "Skip_event_swallow_translator"
- \consistsend "Axis_group_engraver"
+ \consists "Axis_group_engraver"
}
\context {
if (tr->must_be_last ())
{
SCM cons = scm_cons (str, SCM_EOL);
- trans_list = ly_c_pair_p (trans_list)
- ? scm_set_cdr_x (scm_last_pair (trans_list), cons)
- : cons;
+ if (ly_c_pair_p (trans_list))
+ scm_set_cdr_x (scm_last_pair (trans_list), cons);
+ else
+ trans_list= cons;
}
else
{
SCM ly_list_qsort_uniq_x (SCM lst);
SCM ly_output_formats();
+SCM ly_kpathsea_expand_path (SCM);
/*
snarfing.
public:
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
static bool has_interface (Grob*);
- static String glyph_name (Grob*, int, String);
- static SCM brew_internal_stencil (SCM);
+ static String glyph_name (Grob*, int, String, bool);
+ static SCM brew_internal_stencil (SCM, bool);
DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM,SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM ));
LY_DEFINE (ly_kpathsea_expand_path, "ly:kpathsea-expand-path",
1, 0, 0, (SCM name),
- "Read the file @var{name}, and return its expanded path, or "
+ "Return the expanded path of @var{name}, or"
"@code{#f} if not found.")
{
SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
{
if (to_boolean (sml))
{
- Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
+ Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, "", false));
s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
}
else
{
- Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
+ Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, "", true));
/*
ugh.
SCM nn = THIS->lexer_->lookup_identifier ("drumPitchNames");
THIS->lexer_->push_note_state (alist_to_hashq (nn));
}
- /* FIXME: This used to be: */
- Music
-/* Grouped_music_list */
+ Music
{ $$ = $3;
THIS->lexer_->pop_state ();
}
| FIGURES
{ THIS->lexer_->push_figuredbass_state (); }
- /* FIXME: This used to be:
Music
- but that breaks web build
- */
- Grouped_music_list
{
Music *chm = MY_MAKE_MUSIC ("UntransposableMusic");
chm->set_property ("element", $3->self_scm ());
THIS->lexer_->push_chord_state (alist_to_hashq (nn));
}
- /* FIXME:
Music
-*/
- Grouped_music_list
{
Music *chm = MY_MAKE_MUSIC ("UnrelativableMusic");
chm->set_property ("element", $3->self_scm ());
}
| LYRICS
{ THIS->lexer_->push_lyric_state (); }
- /* FIXME:
Music
-*/
- Grouped_music_list
{
$$ = $3;
THIS->lexer_->pop_state ();
}
-/*
- Combination of dot-count and duration-log.
- */
-static SCM
-head_characteristic (Grob * col)
-{
- Grob * s = unsmob_grob (col->get_property ("rest"));
-
- if (!s)
- return SCM_BOOL_F;
- else
- return scm_cons (s->get_property ("duration-log"),
- scm_int2num (Rhythmic_head::dot_count (s)));
-}
/*
TODO: look at horizontal-shift to determine ordering between rests
make this function easily usable in C++
*/
String
-Rest::glyph_name (Grob *me, int balltype, String style)
+Rest::glyph_name (Grob *me, int balltype, String style, bool try_ledgers)
{
bool ledgered_b = false;
-
- if (balltype == 0 || balltype == 1)
+ if (try_ledgers && (balltype == 0 || balltype == 1))
{
Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0;
Real pos = Staff_symbol_referencer::get_position (me);
MAKE_SCHEME_CALLBACK (Rest,print,1);
SCM
-Rest::brew_internal_stencil (SCM smob)
+Rest::brew_internal_stencil (SCM smob, bool ledgered)
{
Grob* me = unsmob_grob (smob);
style = ly_scm2string (scm_symbol_to_string (style_scm));
Font_metric *fm = Font_interface::get_default_font (me);
- String font_char = glyph_name (me, balltype, style);
+ String font_char = glyph_name (me, balltype, style, ledgered);
Stencil out = fm->find_by_name (font_char);
if (out.is_empty ())
me->warning (_f ("rest `%s' not found", font_char.to_str0 ()));
SCM
Rest::print (SCM smob)
{
- return brew_internal_stencil (smob);
+ return brew_internal_stencil (smob, true);
}
MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
/*
Rest::extent_callback (SCM smob, SCM ax)
{
Axis a = (Axis) ly_scm2int (ax);
- SCM m = brew_internal_stencil (smob);
+
+ /*
+ Don't want ledgers: ledgers depend on Y position, which depends on
+ rest collision, which depends on stem size which depends on beam
+ slop of opposite note column.
+
+ consequence: we get too small extents and potential collisions
+ with ledgered rests.
+ */
+ SCM m = brew_internal_stencil (smob, a != X_AXIS);
return ly_interval2scm (unsmob_stencil (m)->extent (a));
}
Font_metric *fm = all_fonts_global->find_afm ("feta20");
if (!fm)
error (_f ("can't find `%s'", "feta20.afm")
- + "\n" +_ ("Fonts have not been installed properly. Aborting"));
+ + "\n" +_ ("Music font has not been installed properly. Aborting"));
+
+ SCM pfa_path = ly_kpathsea_expand_path (scm_makfrom0str ("ecrm10.pfa"));
+ if (!ly_c_string_p (pfa_path))
+ error (_f ("can't find `%s'", "ecrm10.pfa")
+ + "\n" +_f ("Install the ec-mftraced package from %s. Aborting",
+ "http://lilypond.org/download/fonts/"));
pscore_ = new Paper_score;