2003-08-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
- * input/trip.ly: remove
+ * lily/all-font-metrics.cc (find_font): load AFM files first only
+ for feta fonts. This fixes problems with TeXlive and other TeX
+ distros that include AFM files for the CM fonts.
+
+ * scm/font.scm (qualifiers-to-font-name): remove.
+
+ * lily/paper-def.cc: remove get_var.
+
+ * input/trip.ly: remove file.
* input/regression/spacing-note-flags.ly (raggedright): remove
stafflinethickness
+++ /dev/null
-\header {
- title = "Trip test"
- subtitle = "Make life very difficult for lilypond"
- copyright = "public domain"
-
- footer ="This file tests as much features of lily as possible."
-}
-
-
-\version "1.7.18"
-
-%{
-
-This file tests as much features of lily as possible. If there are any
-basic faults in lily, this file will not run correctly.
-
-TODO:
-
-* autochange.
-
-* tremolo
-
-* lyrics.
-
-* drum, jazz, pop notation
-
-%}
-
-
-praeludiumRight = \notes {
- \key e \major
- \clef violin
-
- % 13 -- how to type -- where to split -- this more neatly?
- \context Staff <
- \context Voice = I \relative c'' { \stemUp r4 dis4 e4. e8 ~ |
- \shiftOn e4-.-^^\f [d8 fis8] \shiftOff gis4 ~ [gis8 fis16 e ] |
- fis4 ~ [fis8 e16 dis] e4 r8 e8 }
- \context Voice = III \relative c'' { \stemUp \shiftOn r4 bis cis \shiftOff cis |
- a' ~ [a16 gis a b] \shiftOn dis,4 cis ~ |
- [cis8 dis16 ais] bis4 cis r8 b }
- \context Voice = IV \relative c'' {
- \stemDown
- \shiftOn s4 gis }
-
- \context Voice = II \relative c' { \stemDown
-% \shiftOn % idem
-
- r4 fis \shiftOff gis gis |
- a4. cis8 gis2 |
- fis4 gis gis r8 e8 }
- > |
- % 16
-}
-
-praeludiumLeft = \notes \relative c {
- \key e \major
- \clef bass
-
- % 13
- \context Staff <
- \context Voice = two { r4 }
- \context Voice = one { \stemUp s4 dis' cis cis ~ |
- \times 4/5
- { [cis8 ( cis
-
- a \translator Staff = treble \stemDown \shiftOn d
- )
-
- cis] }
- \translator Staff = bass
- \shiftOff \stemUp
- [bis gis] cis4 |
- dis2 cis4 r8 cis }
- \context Voice = one { \stemUp bis2 }
- \context Voice = three {
- \property Voice.DynamicLineSpanner \override #'direction = #-1
- \stemUp \shiftOn r4 gis ~ [gis8
- \<
-
- gis] ~ \stemDown \shiftOff gis4 |
- a4. fis8
- \!
- gis4. a8 ~ |
- a4 gis4 gis r8 gis }
- \context Voice = four { \stemDown \shiftOn s4 fis4 e}
- \context Voice = two { \stemDown s4 dis4 cis4 }
- > |
- %16
-}
-
-
-
-
-fugaIIRight = \notes \relative c'' {
- \key e \major % E-major
- \clef violin
- \time 3/4
-
- %15
- \context Staff <
- { [b8 fis8] b4 }\\
- { fis2 }
- >
-
- \context Staff \notes\relative c''<
- {
- e4 -5
- }\\
- \\
- {
- cis-4
- }\\ \\
-
- {
- ais-3
- }\\ \\
- {
- fis-2
- }
- >
-
- %16
- \context Staff <
- { dis2 dis4 |
- cis2 cis4 |
- b4. [cis8 dis e] } \\
- { fis2. ~ |
- fis ~ |
- fis4 e2 } \\
- { [b8 fis] b2 ~ |
- [b8 a!16 gis] a2 ~ |
- a4 gis2 }
- > |
- %19
-}
-
-gracetest = \notes \grace { [c16 ( cis dis] }
-
-fugaIILeft = \notes {
- \key e \major
- \clef bass
-
- %15
- \context Staff <
- {
- \gracetest
- \relative b, < )b2 dis-\arpeggio fis a b cis dis> \stemUp ais4 |
- b2 b4 } \\
- { s2 e4 | fis2 fis4 }
- >
- \stemBoth
- cis2 [e16( fis a \clef "treble" b] |
- d'4 ) b8 b8 b4 |
- %19
-}
-
-fugaIIPedal = \notes \relative c {
- \key e \major
- \clef bass
-
- \repeat "volta" 2 { dis4.-\ltoe } \alternative { e8-\rtoe cis4 } |
- b4.-\lheel [cis8-\ltoe dis8-\rtoe e8-\rheel] |
- fis4.-\rtoe [e8-\rheel dis8-\rtoe cis8-\ltoe] |
- dis4-\rtoe e4-\rheel e,4-\ltoe |
- %19
-}
-
-% these should be two separate scores...
-\score{
- \context Score \notes <
- \context PianoStaff <
- \context Staff = treble {
- \property Staff.instrument = #"right"
- \property Staff.instr = #"rt"
- \property PianoStaff.instrument = #"hands"
- \property PianoStaff.instr = #"hs"
-
-
- \property Score.midiInstrument = "church organ"
- \praeludiumRight
- \times 4/3 { c4 c4 c4 } \mark "B"
- \fugaIIRight }
- \context Staff = bass {
- \property Staff.instrument = #"left"
- \property Staff.instr = #"lt"
- \praeludiumLeft r1 \fugaIILeft }
- >
- \context Staff = pedal \relative c <
- {
- \property Staff.instrument = #"bass"
- \property Staff.instr = #"bs"
-
- \time 4/4
- \key e \major
- \clef bass
-
- %13
- \property Staff.PhrasingSlur \override #'dashed = #5.0
- c4 \( ( d ) e\) f
-% r4 fis,4-\ltoe e4.-\lheel e'8-\rheel |
-
-% tie accs: 2nd should get no acc
-f4-\rtoe~ f8
-fis8-\rtoe fis4-\rtoe [e8-\ltoe a-\rtoe] |
- dis,4-\ltoe gis-\rtoe [cis,8-\ltoe
- (
- b!-\lheel ais-\rtoe g-\ltoe ~ ] |
-
-% tie should generate acc.
-\break
- g r4.
- )
- c2^^^-^\f
- \time 3/4
-
- \fugaIIPedal \bar "|." }
-
- >
- >
-\paper {}
- \midi {
- \tempo 4 =96 }
-}
-/*
+/*
+
all-font-metrics.cc -- implement All_font_metrics
source file of the GNU LilyPond music typesetter
scm_gc_unprotect_object (tfm_p_dict_->self_scm ());
}
+/*
+ TODO: our AFM handling is broken: the units in an AFM file are
+ relative to the design size (1000 units = 1 designsize). Hence we
+ should include design size when generating an AFM metric.
+ */
Adobe_font_metric *
All_font_metrics::find_afm (String name)
{
if (path.empty_b ())
{
- String p = ly_find_afm (name.to_str0 ());
+ String p = kpathsea_find_afm (name.to_str0 ());
if (p.length ())
path = p;
}
*/
if (afm->checksum_)
{
-
Tex_font_metric * tfm = find_tfm (name);
/* FIXME: better warning message
if (path.empty_b ())
{
- String p = ly_find_tfm (name.to_str0 ());
+ String p = kpathsea_find_tfm (name.to_str0 ());
if (p.length ())
path = p;
}
if (path.empty_b ())
return 0;
-
if (verbose_global_b)
progress_indication ("[" + path);
+
val = Tex_font_metric::make_tfm (path);
if (verbose_global_b)
Font_metric *
All_font_metrics::find_font (String name)
{
- Font_metric * f= find_afm (name);
- if (f)
- return f;
-
- f = find_tfm (name);
- if (f)
- return f;
+ if (name.left_string (4) == "feta")
+ {
+ Font_metric * f = find_afm (name);
+ if (f)
+ return f;
+ else
+ f =find_tfm (name);
+ if (f)
+ return f ;
+ }
+ else
+ {
+ Font_metric * f = find_tfm (name);
+ if (f)
+ return f;
+ else
+ f =find_afm (name);
+ if (f)
+ return f ;
+ }
warning (_f ("can't find font: `%s'", name.to_str0 ()));
warning (_ ("Loading default font"));
/*
we're in emergency recovery mode here anyway, so don't try to do
anything smart that runs the risk of failing. */
- f= find_afm (def_name);
+ Font_metric* f= find_afm (def_name);
if (f)
return f;
if (to_boolean (me->get_grob_property ("join-heads")) &&
((p_max - p_min) >= 3))
{
- Real linethickness = me->get_paper ()->get_var ("linethickness");
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real linethickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
Interval x_extent = 0.5 * Interval (-linethickness, +linethickness);
Interval y_extent = 0.5 * Interval (p_min + 1.35, p_max - 1.35);
Box line_box (x_extent, y_extent);
heads.unite (iv + ss->relative_coordinate (common, Y_AXIS) - my_y);
}
- Real lt = me->get_paper ()->get_var ("linethickness");
+ Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real sp = 1.5 * Staff_symbol_referencer::staff_space (me);
Real dy = heads.length() + sp;
Real x = 0.7;
Real hair = gh_scm2double (me->get_grob_property ("hair-thickness"));
Real fatline = gh_scm2double (me->get_grob_property ("thick-thickness"));
- Real staffline = me->get_paper ()->get_var ("linethickness");
+ Real staffline = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real staff_space = Staff_symbol_referencer::staff_space (me);
kern *= staffline;
Real ss = Staff_symbol_referencer::staff_space (me);
Real thickness = gh_scm2double (me->get_grob_property ("thickness")) / ss;
- Real slt = me->get_paper ()->get_var ("linethickness") / ss;
+ Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) / ss;
SCM sdy = me->get_grob_property ("least-squares-dy");
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
- Real line = me->get_paper ()->get_var ("linethickness");
+ Real line = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real thickness = get_thickness (me);
Real beam_translation = gh_scm2int (beam_count) < 4
SCM gap = me->get_grob_property ("gap");
Molecule the_beam;
- Real lt = me->get_paper ()->get_var ("linethickness");
+ Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
for (int i = 0; i<= stems.size(); i++)
{
/*
this is hardcoded, but this shouldn't happen anyway.
- used to be get_var ("loose_column_distance");
+ used to be get_realvar (ly_symbol2scm ("loose_column_distance"));
*/
sp->default_space_ = 1.0;
Break_algorithm::set_pscore (Paper_score*s)
{
pscore_ = s;
- linewidth_ = s->paper_->get_var ("linewidth");
+ linewidth_ = s->paper_->get_realvar (ly_symbol2scm ("linewidth"));
}
Array<Column_x_positions>
{
Grob * me = unsmob_grob (smob);
Real space = Staff_symbol_referencer::staff_space (me);
- Real th = me->get_paper ()->get_var ("linethickness");
+ Real th = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lt = me->get_grob_property ("thickness");
if (gh_number_p (lt))
th *= gh_scm2double (lt);
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real staff_size;
- Real thickness = me->get_paper ()->get_var ("linethickness");
+ Real thickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lt = me->get_grob_property ("thickness");
if (gh_number_p (lt))
thickness *= gh_scm2double (lt);
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
/*
* Draw a small vertical line through the uppermost (or, depending
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real staff_size;
- Real thickness = me->get_paper ()->get_var ("linethickness");
+ Real thickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lt = me->get_grob_property ("thickness");
if (gh_number_p (lt))
thickness *= gh_scm2double (lt);
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
/*
* Draw a vertical line that is vertically centered in the staff
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real staff_size;
- Real thickness = me->get_paper ()->get_var ("linethickness");
+ Real thickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lt = me->get_grob_property ("thickness");
if (gh_number_p (lt))
thickness *= gh_scm2double (lt);
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
// like a "|" type bar
Interval xdim (0, thickness);
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real staff_size;
- Real thickness = me->get_paper ()->get_var ("linethickness");
+ Real thickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lt = me->get_grob_property ("thickness");
if (gh_number_p (lt))
thickness *= gh_scm2double (lt);
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
// like a "||" type bar
Interval xdim (0, thickness);
brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_points)
{
#if 0
- Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
+ Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
#else
Real blotdiameter = Staff_symbol_referencer::staff_space (me)/2;
#endif
Grob *me= unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner*> (me);
- Real line = me->get_paper ()->get_var ("linethickness");
+ Real line = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM s = me->get_grob_property ("grow-direction");
if (!ly_dir_p (s))
ext.unite (gs[0]->extent (cx, X_AXIS));
Direction d = Directional_element_interface::get (me);
- Real t = me->get_paper()->get_var ("linethickness");
+ Real t = me->get_paper()->get_realvar (ly_symbol2scm ("linethickness"));
SCM lthick = me->get_grob_property ("thickness");
if (gh_number_p (lthick))
}
while (flip (&d) != LEFT);
- Real lt = sp->get_paper ()->get_var ("linethickness");
+ Real lt = sp->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real th = gh_scm2double (sp->get_grob_property ("thickness")) * lt ;
Real h = gh_scm2double (sp->get_grob_property ("height"));
-String ly_find_afm (char const * name);
-String ly_find_tfm (char const * name);
-void ly_init_kpath (char *av0);
+String kpathsea_find_afm (char const * name);
+String kpathsea_find_tfm (char const * name);
+void init_kpath (char *av0);
#include "warn.hh"
String
-ly_find_afm (char const * name)
+kpathsea_find_afm (char const * name)
{
#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
char * name_ptr = kpse_find_file (name, kpse_afm_format, true);
}
String
-ly_find_tfm (char const * name)
+kpathsea_find_tfm (char const * name)
{
String p = global_path.find (String (name) + ".tfm");
void
-ly_init_kpath (char *av0)
+init_kpath (char *av0)
{
#if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
/*
Offset my_off;
Offset his_off;
- Real thick = me->get_paper ()->get_var ("linethickness");
+ Real thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM s = me->get_grob_property ("thickness");
if (gh_number_p (s))
Real leftext = l->extent (l, X_AXIS).length ();
- Real sl = sp->get_paper ()->get_var ("linethickness");
+ Real sl = sp->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real righttrim = 0.5; // default to half a space gap on the right
sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", false);
sane_putenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", false);
- ly_init_kpath (argv[0]);
+ init_kpath (argv[0]);
bool help_b = false;
oparser_p_static = new Getopt_long (argc, argv, options_static);
SCM thick = me->get_grob_property ("thickness");
SCM height = me->get_grob_property ("height");
- Real t = me->get_paper ()->get_var ("linethickness") * gh_scm2double (thick);
+ Real t = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) * gh_scm2double (thick);
Grob *common = me->get_bound(LEFT)->common_refpoint (me->get_bound (RIGHT),
X_AXIS);
SCM thickness_scm = ligature->get_grob_property ("thickness");
Real thickness = (thickness_scm != SCM_EOL) ?
gh_scm2double (thickness_scm) : 1.4;
- thickness *= ligature->get_paper ()->get_var ("linethickness");
+ thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real head_width =
Font_interface::get_default_font (ligature)->
programming_error (_f ("Mensural_ligature:"
"thickness undefined on flexa %d; assuming 1.4",
primitive));
- thickness = 1.4 * me->get_paper ()->get_var ("linethickness");
+ thickness = 1.4 * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
}
}
int join_left = gh_scm2int (join_left_scm);
if (!join_left)
programming_error (_f ("Mensural_ligature: (join_left == 0)"));
- Real blotdiameter = (me->get_paper ()->get_var ("blotdiameter"));
+ Real blotdiameter = (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
Interval x_extent = Interval (0, thickness);
Interval y_extent = (join_left > 0) ?
Interval (-join_left * 0.5 * staff_space, 0) :
Real ss = Staff_symbol_referencer::staff_space (me);
- Real slt = me->get_paper ()->get_var ("linethickness");
+ Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real y = slt * tthick/2 * ss;
Real ythick = hair_thick * slt * ss;
Box b(Interval (0, width - 2 * ythick), Interval (-y, y));
if (lines_i)
{
Real ledgerlinethickness =
- (me->get_paper ()->get_var ("ledgerlinethickness"));
+ (me->get_paper ()->get_realvar (ly_symbol2scm ("ledgerlinethickness")));
Real blotdiameter = ledgerlinethickness;
- // (me->get_paper ()->get_var ("blotdiameter"));
+ // (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
Interval y_extent =
Interval (-0.5*(ledgerlinethickness),
+0.5*(ledgerlinethickness));
if (st)
{
Real thick = gh_scm2double (st->get_grob_property ("thickness"))
- * st->get_paper ()->get_var ("linethickness");
+ * st->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
note_head_width -= thick;
}
}
-Real
-Paper_def::get_var (String s) const
-{
- return get_realvar (ly_symbol2scm (s.to_str0 ()));
-}
Real
Paper_def::get_realvar (SCM s) const
Interval
Paper_def::line_dimensions_int (int n) const
{
- Real lw = get_var ("linewidth");
- Real ind = n? 0.0:get_var ("indent");
+ Real lw = get_realvar (ly_symbol2scm ("linewidth"));
+ Real ind = n? 0.0:get_realvar (ly_symbol2scm ("indent"));
return Interval (ind, lw);
}
-
int Paper_def::score_count_ = 0;
int
/*
todo: use symbols and hashtable idx?
-
-
*/
Font_metric *
Paper_def::find_font (SCM fn, Real m)
*/
Real stem_thickness =
gh_scm2double (stem->get_grob_property ("thickness"))
- * stem->get_paper ()->get_var ("linethickness");
+ * stem->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
o += Offset (0.5 *
x_extent * (1 + Stem::get_direction (stem))
- ((dir + 1)/2) * stem_thickness
return SCM_EOL;
}
- Real thick = me->get_paper ()->get_var ("linethickness") *
+ Real thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) *
gh_scm2double (me->get_grob_property ("thickness"));
Bezier one = get_curve (me);
width = 0;
}
- Real t = me->get_paper ()->get_var ("linethickness");
+ Real t = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM my_thick = me->get_grob_property("thickness");
if (gh_number_p (my_thick))
t *= gh_scm2double (my_thick);
Real thick = gh_scm2double (me->get_grob_property ("thickness"))
- * me->get_paper ()->get_var ("linethickness");
+ * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Grob *hed = support_head (me);
Real w = Note_head::head_extent (hed,X_AXIS)[dir];
{
Real stem_width = gh_scm2double (me->get_grob_property ("thickness"))
// URG
- * me->get_paper ()->get_var ("linethickness");
+ * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Molecule ss =Lookup::filledbox (Box (Interval (-stem_width/2, stem_width/2),
Interval (stem_y[DOWN]*dy, stem_y[UP]*dy)));
{
Real rule_thick
= gh_scm2double (me->get_grob_property ("thickness"))
- * me->get_paper ()->get_var ("linethickness");
+ * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
r += - d * rule_thick * 0.5;
Molecule
System_start_delimiter::simple_bar (Grob*me,Real h)
{
- Real w = me->get_paper ()->get_var ("linethickness") *
+ Real w = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) *
gh_scm2double (me->get_grob_property ("thickness"));
return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
}
span_points[RIGHT] -= gh_scm2double (ly_cdr (ew));
}
- Real thick = me->get_paper ()->get_var ("linethickness");
+ Real thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM st = me->get_grob_property ("thickness");
if (gh_number_p (st))
{
Real thick =
gh_scm2double (me->get_grob_property ("thickness"))
- * me->get_paper ()->get_var ("linethickness");
+ * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Bezier b;
int i = 0;
if (bracket_visibility)
{
- Real lt = me->get_paper ()->get_var ("linethickness");
+ Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
SCM thick = me->get_grob_property ("thickness");
if (gh_number_p (thick))
"assuming 1.4 linethickness");
join_thickness = 1.4;
}
- join_thickness *= ligature->get_paper ()->get_var ("linethickness");
+ join_thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Item *prev_primitive = 0;
int prev_prefix_set = 0;
programming_error (_f ("Vaticana_ligature:"
"thickness undefined; assuming 1.4",
me));
- thickness = 1.4 * me->get_paper ()->get_var ("linethickness");
+ thickness = 1.4 * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
}
Real x_offset = 0.0;
int delta_pitch = gh_scm2int (delta_pitch_scm);
if (!delta_pitch)
programming_error (_f ("Vaticana_ligature: (delta_pitch == 0)"));
- Real blotdiameter = (me->get_paper ()->get_var ("blotdiameter"));
+ Real blotdiameter = (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
Interval x_extent = Interval (0, thickness);
Interval y_extent = (delta_pitch > 0) ?
Interval (-delta_pitch * 0.5 * staff_space, 0) : // ascending join
(strcmp(cs,":|")!=0 && strcmp(cs,"|:")!=0 && strcmp(cs,"|.")!=0
&& strcmp(cs,":|:")!=0 && strcmp(cs,".|")!=0);
- Real staff_thick = me->get_paper ()->get_var ("linethickness");
+ Real staff_thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
Real half_space = 0.5;
Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
/*
not a start, but really broken in two
- */
+ */
Real left =0.;
if (bound->break_status_dir () == RIGHT)
- {
- Paper_column *pc = bound->get_column ();
- left = pc->extent (pc, X_AXIS)[RIGHT] - bound->relative_coordinate (pc, X_AXIS);
- }
+ {
+ Paper_column *pc = bound->get_column ();
+ left = pc->extent (pc, X_AXIS)[RIGHT] - bound->relative_coordinate (pc, X_AXIS);
+ }
else
- {
- /*
- the volta spanner is attached to the bar-line, which is moved
- to the right. We don't need to compensate for the left edge.
- */
- }
+ {
+ /*
+ the volta spanner is attached to the bar-line, which is moved
+ to the right. We don't need to compensate for the left edge.
+ */
+ }
Real w = dynamic_cast<Spanner*> (me)->spanner_length () - left - half_space;
Real h = gh_scm2double (me->get_grob_property ("height"));
}
ADD_INTERFACE (Volta_bracket_interface,"volta-bracket-interface",
- "Volta bracket with number",
- "bars thickness height");
+ "Volta bracket with number",
+ "bars thickness height");
(append size-independent-fonts
(cdr (assoc sym font-list-alist))))
-(define (qualifiers-to-fontnames qualifiers font-descr-alist)
- " reduce the font list by successively applying a font-qualifier."
- (if (null? qualifiers)
- font-descr-alist
-
- (qualifiers-to-fontnames
- (cdr qualifiers)
- (filter-field (caar qualifiers) (cdar qualifiers) font-descr-alist)
- )
- ))
+
(define (wild-eq? x y)
(or (eq? x y)
(display (filter pair? '(1 2 (1 2) (1 .2)))
(display (filter-field 'font-name 'cmbx paper20-style-sheet-alist))
- (display (qualifiers-to-fontname '((font-name . cmbx)) paper20-style-sheet-alist))
(display (style-to-font-name 'paper20 'large)))
)))