SCM proc = gh_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"), sheet));
SCM font_name = gh_call2 (proc, fonts, alist_chain);
-#if 0
- SCM lookup = scm_assoc (ly_symbol2scm ("lookup"), properties);
+ SCM lookup = ly_assoc_chain (ly_symbol2scm ("lookup"), alist_chain);
Molecule mol;
if (gh_pair_p (lookup) && ly_symbol2string (gh_cdr (lookup)) == "name")
mol = lookup_character (me, font_name, text);
else
-#endif
- Molecule mol = lookup_text (me, font_name, text);
+ mol = lookup_text (me, font_name, text);
return mol;
}
{
/*
FIXME
+
+ huh?
*/
- return Molecule ();
+ // return Molecule ();
SCM sheet = me->paper_l ()->style_sheet_;
- SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-abbrev-to-properties-alist"), sheet));
+ SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
SCM markup = gh_car (markup_sentence);
SCM sentence = gh_cdr (markup_sentence);
- SCM p = gh_cons (gh_call1 (f, markup), alist_chain);
+ SCM p = gh_cons (gh_call2 (f, sheet, markup), alist_chain);
Axis align = X_AXIS;
- SCM a = scm_assoc (ly_symbol2scm ("align"), p);
+ SCM a = ly_assoc_chain (ly_symbol2scm ("align"), p);
if (gh_pair_p (a) && gh_number_p (gh_cdr (a)))
align = (Axis)gh_scm2int (gh_cdr (a));
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real kern = 0;
- SCM k = scm_assoc (ly_symbol2scm ("kern"), p);
+ SCM k = ly_assoc_chain (ly_symbol2scm ("kern"), p);
if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
kern = gh_scm2double (gh_cdr (k)) * staff_space;
Real raise = 0;
- SCM r = scm_assoc (ly_symbol2scm ("raise"), p);
+ SCM r = ly_assoc_chain (ly_symbol2scm ("raise"), p);
if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
raise = gh_scm2double (gh_cdr (r)) * staff_space;
(visibility-lambda . ,begin-of-line-visible)
(padding . 1.0)
(direction . 1)
- (markup-to-properties . ,markup-to-properties)
(font-family . roman)
-
(font-relative-size . -1)
(meta . ,(element-description "BarNumber"
text-interface font-interface break-aligned-interface))
(molecule-callback . ,Chord_name::brew_molecule)
(after-line-breaking-callback . ,Chord_name::after_line_breaking)
(chord-name-function . ,default-chord-name-function)
- (markup-to-properties . ,markup-to-properties)
- (meta . ,(element-description "ChordNames" font-interface chord-name-interface))
+ (font-family . roman)
+ (meta . ,(element-description "ChordNames" font-interface text-interface chord-name-interface))
))
(NoteCollision . (
(Y-offset-callbacks . (,Side_position::aligned_on_self))
(molecule-callback . ,Text_item::brew_molecule)
(script-priority . 100)
- (font-style . dynamic)
- (markup-to-properties . ,markup-to-properties)
+ (font-series . bold)
+ (font-family . dynamic)
(self-alignment-Y . 0)
(meta . ,(element-description "DynamicText" font-interface text-interface ))
))
(X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
(padding . 3.0)
(self-alignment-X . 0)
-
- (font-style . finger)
- (markup-to-properties . ,markup-to-properties)
+ (font-family . number)
+ (font-relative-size . -3)
+ (font-shape . upright)
(meta . ,(element-description "Fingering" finger-interface font-interface text-script-interface text-interface side-position-interface))
))
(molecule-callback . ,Text_item::brew_molecule)
(break-align-symbol . Instrument_name)
(visibility-lambda . ,begin-of-line-visible)
- (markup-to-properties . ,markup-to-properties)
(font-family . roman)
(meta . ,(element-description "InstrumentName" font-interface text-interface break-aligned-interface))
))
(self-alignment-X . 0)
(non-rhythmic . #t)
(word-space . 0.6)
-
- (markup-to-properties . ,markup-to-properties)
(font-family . roman)
(font-shape . upright)
(font-relative-size . 0)
-
(meta . ,(element-description "LyricText" lyric-syllable-interface text-interface font-interface ))
))
(RehearsalMark . (
- (molecule-callback . ,Text_item::brew_molecule)
- (breakable . #t)
- (markup-to-properties . ,markup-to-properties)
- (font-style . mark)
- (visibility-lambda . ,end-of-line-invisible)
- (padding . 4.0)
- (meta . ,(element-description "RehearsalMark" mark-interface side-position-interface))
+ (molecule-callback . ,Text_item::brew_molecule)
+ (breakable . #t)
+ (font-family . number)
+ (font-relative-size . 1)
+ (visibility-lambda . ,end-of-line-invisible)
+ (padding . 4.0)
+ (meta . ,(element-description "RehearsalMark" mark-interface side-position-interface))
))
(MultiMeasureRest . (
(expand-limit . 10)
(padding . 2.0) ; staffspace
(minimum-width . 12.5) ; staffspace
- (markup-to-properties . ,markup-to-properties)
- (font-style . mmrest)
+ (font-family . number)
+ (font-relative-size . 1)
(meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface font-interface ))
))
(NoteName . (
(style . default)
(molecule-callback . ,Text_item::brew_molecule)
- (markup-to-properties . ,markup-to-properties)
(meta . ,(element-description "NoteName"
note-name-interface font-interface
general-element-interface))
(Y-offset-callbacks . (,Side_position::aligned_side))
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
- (markup-to-properties . ,markup-to-properties)
-
(meta . ,(element-description "OctavateEight" text-interface font-interface ))
))
(molecule-callback . ,Text_item::brew_molecule)
(break-align-symbol . Clef_item)
(visibility-lambda . ,begin-of-line-visible)
- (markup-to-properties . ,markup-to-properties)
(font-family . roman)
-(meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface font-interface))
+ (meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface font-interface))
))
(StaffSymbol . (
,Side_position::centered_on_parent))
(no-spacing-rods . #t)
(font-shape . italic)
- (markup-to-properties . ,markup-to-properties)
-
(self-alignment-X . 0)
(meta . ,(element-description "SostenutoPedal" text-interface font-interface))
))
(self-alignment-X . 0)
(X-offset-callbacks . (,Side_position::aligned_on_self))
(Y-offset-callbacks .
- (,Side_position::aligned_side
- ,Side_position::centered_on_parent))
+ (,Side_position::aligned_side
+ ,Side_position::centered_on_parent))
(meta . ,(element-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface))
))
(molecule-callback . ,Text_item::brew_molecule)
(no-spacing-rods . #t)
(padding . 0.5)
- (markup-to-properties . ,markup-to-properties)
- (font-family . roman)
- (font-shape . italic)
- (font-relative-size . 0)
+ (font-family . roman)
+ (font-shape . italic)
+ (font-relative-size . 0)
(meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface font-interface ))
))
(TextSpanner . (
(molecule-callback . ,Text_spanner::brew_molecule)
(font-shape . italic)
- (markup-to-properties . ,markup-to-properties)
(type . "line")
(direction . 1)
(meta . ,(element-description "TextSpanner" text-spanner-interface font-interface))
(break-align-symbol . Time_signature)
(visibility-lambda . ,all-visible)
(breakable . #t)
- (markup-to-properties . ,markup-to-properties)
- (font-style . timesig)
- (meta . ,(element-description "TimeSignature" time-signature-interface font-interface))
+ (font-family . number)
+ (meta . ,(element-description "TimeSignature" time-signature-interface font-interface))
))
(TupletBracket . (
(thick . 1.0)
(after-line-breaking-callback . ,Tuplet_spanner::after_line_breaking)
(molecule-callback . ,Tuplet_spanner::brew_molecule)
- (markup-to-properties . ,markup-to-properties)
- (font-style . tuplet)
+ (font-shape . italic)
+ (font-relative-size . -1)
(meta . ,(element-description "TupletBracket" text-interface
tuplet-bracket-interface font-interface))
))
(UnaChordaPedal . (
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
- (markup-to-properties . ,markup-to-properties)
(no-spacing-rods . #t)
(self-alignment-X . 0)
(X-offset-callbacks . (,Side_position::aligned_on_self))
(direction . 1)
(padding . 1)
- (markup-to-properties . ,markup-to-properties)
(font-style . volta)
(Y-offset-callbacks . (,Side_position::aligned_side))
(thickness . 1.6) ; stafflinethickness
(height . 2.0) ; staffspace;
(minimum-space . 25)
+ (font-family . number)
+ (font-relative-size . -2)
(meta . ,(element-description "VoltaBracket" volta-bracket-interface side-position-interface font-interface))
))
((-1 medium italic roman cmti 8) . "cmti8")
((0 medium italic roman cmti 10) . "cmti10")
((1 medium italic roman cmti 12) . "cmti12")
- ((2 bold upright roman cmbx 10) . "cmbx10")
- ((1 bold upright roman cmbx 12) . "cmbx12")
((2 bold upright roman cmbx 14) . "cmbx14")
+ ((1 bold upright roman cmbx 12) . "cmbx12")
+ ((0 bold upright roman cmbx 10) . "cmbx10")
+ ((-1 bold upright roman cmbx 8) . "cmbx8")
+ ((-2 bold upright roman cmbx 7) . "cmbx7")
((-3 medium upright math msam 10) . "msam10")
((-2 medium upright math msam 10) . "msam10")
((-1 medium upright math msam 10) . "msam10")
;; FIXME: this is a not-so-cool idea to use ALIGN
;; RAISE, LOOKUP, since they are not proper elt-properties,
;; and might interfere with them.
- (markup-abbrev-to-properties-alist
+ (markup-to-properties . ,markup-to-properties)
+ (abbreviation-alist
. ((rows . ((align . 0)))
(lines . ((align . 1)))
(roman . ((font-family . roman)))
- (music . ((font-family . music)))
+ (music . ((font-family . music) (font-shape . upright)))
(finger . ((font-style . finger)))
(bold . ((font-series . bold)))
(italic . ((font-shape . italic)))
)
)
-
-
-(define (font-regexp-to-font-name paper regexp)
- (let ((style-sheet (cdr (assoc paper style-sheet-alist))))
- (let loop ((fonts style-sheet))
- (if (string-match regexp (caar fonts))
- (cdar fonts)
- (if (pair? (cdr fonts))
- (loop (cdr fonts))
- '())))))
-
;; reduce the font list by successively applying a font-qualifier.
(define (qualifiers-to-fontnames qualifiers font-descr-alist)
(if (null? qualifiers)
selected) ; return the topmost.
))
-(define markup-abbrev-to-properties-alist
- (append
- (map (lambda (x) (cons (car x) (cons 'font-style (car x))))
- style-to-font-alist)))
-
-(define (markup-to-properties markup)
+(define (markup-to-properties sheet markup)
;;(display "markup: `")
- ;;(display markup)
+ ;;(write markup)
;;(display "'\n")
(if (pair? markup)
(list markup)
- (let ((entry (assoc markup markup-abbrev-to-properties-alist)))
- (if entry (cdr entry)
+ (let ((entry (assoc markup
+ ;; assoc-chain?
+ (append (cdr (assoc 'abbreviation-alist sheet))
+ (cdr (assoc 'style-alist sheet))))))
+ (if entry
+ (cdr entry)
(list (cons markup #t))))))
; fixme, how's this supposed to work?