From: Mats Bengtsson Date: Wed, 20 Jan 1999 23:18:08 +0000 (+0100) Subject: patch::: 1.1.23.mb1 X-Git-Tag: release/1.1.24~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a341f45c2cf1494d291ebb21fd64d5c679ee6e19;p=lilypond.git patch::: 1.1.23.mb1 pl 23.mb1 - bf: Position and possible SIGSEGV in Mark_engraver - Added padding support in G_staff_side_item - bf: Correct direction of textual scripts. - bf, lookup.cc: Fewer warnings about missing text styles. Same units used in all .afm files. --- diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index 6bf67ce169..f0a3d4d250 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -973,9 +973,9 @@ files like file(init.fly) that read the user file into the middle of another file. Using it in a user file will lead to an infinite loop. dit(code(\mark) var(unsigned)code(;) or code(\mark) var(string)code(;)) -Allowed in music only. Prints a mark over or under (?) the staff. -You must add code(Mark_engraver) to the Score context and it only -seems to work if the mark appears at the beginning of a line. +Allowed in music only. Prints a mark over or under (depending on the +code(markDirection) property) the staff. +You must add code(Mark_engraver) to the Score context. dit(code(\midi) var(statementlist)) Appears in a score block to indicate that musical output should be produced and to set output @@ -1301,6 +1301,13 @@ setting to 2 shows a number and a bracket if there is no beam; setting to 3 shows a number, and if there is no beam it adds a bracket; setting to 4 shows both a number and a bracket unconditionally. +dit(code(markScriptPadding)) Determines the extra space added between +the mark and the closest staff line or note. + +dit(code(markDirection)) Determines if marks should be printed above +or below the staff. Set to code(\up) to print marks above the staff; +set to code(\down) to print marks below the staff. + ) subsubsubsect(Staff properties) diff --git a/NEWS b/NEWS index 766301d266..71c7f63348 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +pl 23.mb1 + - bf: Position and possible SIGSEGV in Mark_engraver + - Added padding support in G_staff_side_item + - bf: Correct direction of textual scripts. + - bf, lookup.cc: Fewer warnings about missing text styles. + Same units used in all .afm files. + pl 22.jcn4 - bf's: repeat-engraver; \bar "|:", ":|" now deprecated for repeats - bf: :|, |: diff --git a/VERSION b/VERSION index cc4957f34f..7864b2e373 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=23 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=mb1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 4d4b505197..88eaf5d612 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -112,7 +112,7 @@ class Indentable_file(File): class Afm_file (File): def print_f_dimen(self, f): - f = f * 1000 + f = f dimstr = '%.2f' % f diff --git a/input/test/mark.ly b/input/test/mark.ly index 30bd288f24..a054b62147 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -20,6 +20,9 @@ two = \notes\relative c{ \score{ < \global \one \two > \paper { - \translator { \OrchestralPartStaffContext } + \translator { \OrchestralPartStaffContext + markScriptPadding = "4.0"; +% markDirection = \down; + } } } diff --git a/lily/g-staff-side.cc b/lily/g-staff-side.cc index 9b166c6927..3988f0b9e9 100644 --- a/lily/g-staff-side.cc +++ b/lily/g-staff-side.cc @@ -27,6 +27,7 @@ G_staff_side_item::G_staff_side_item () dir_ = CENTER; to_position_l_ = 0; transparent_b_ = true; + padding_f_ = 0; } void @@ -71,11 +72,9 @@ G_staff_side_item::do_post_processing () Real coord = e->relative_coordinate (common, Y_AXIS); dim.unite (coord + e->extent (Y_AXIS)); } - if (!support_l_arr_.size ()) - dim = Interval (0,0); Interval sym_dim = to_position_l_->extent (Y_AXIS); - Real off = dim_cache_[Y_AXIS].relative_coordinate (common); + Real off = dim_cache_[Y_AXIS].relative_coordinate (common) - padding_f_ * dir_; dim_cache_[Y_AXIS].set_offset (dim[dir_] - sym_dim[-dir_] - off); } diff --git a/lily/include/g-staff-side.hh b/lily/include/g-staff-side.hh index c39dcd9f3f..add3ff2d5c 100644 --- a/lily/include/g-staff-side.hh +++ b/lily/include/g-staff-side.hh @@ -23,6 +23,7 @@ public: Score_element * to_position_l_; Direction dir_; Link_array support_l_arr_; + Real padding_f_; G_staff_side_item (); void set_victim (Score_element*); diff --git a/lily/lookup.cc b/lily/lookup.cc index 35367f5e0e..2b73a7ba82 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -101,8 +101,8 @@ Lookup::afm_find (String s, bool warn) const return a; a.dim_ = m.B_; - a.dim_[X_AXIS] *= 1 / 1000.0; - a.dim_[Y_AXIS] *= 1 / 1000.0; + // a.dim_[X_AXIS] *= 1 / 1000.0; + // a.dim_[Y_AXIS] *= 1 / 1000.0; a.lambda_ = gh_list (ly_symbol ("char"), @@ -340,6 +340,10 @@ static Dict_initialiser cmr_init[] = { {"finger", "feta-nummer"}, {"italic", "cmti"}, {"roman", "cmr"}, + {"large", "cmbx"}, + {"Large", "cmbx"}, + {"mark", "feta-nummer"}, + {"nummer", "feta-nummer"}, {0,0} }; diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 891215abe5..0322590da1 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -18,6 +18,8 @@ #include "g-staff-side.hh" #include "stem.hh" #include "rhythmic-head.hh" +#include "align-element.hh" +#include "vertical-group-element.hh" ADD_THIS_TRANSLATOR (Mark_engraver); @@ -55,7 +57,7 @@ Mark_engraver::do_process_requests () text_p_->style_str_ = text_p_->text_str_.index_any_i ("0123456789") >= 0 ? "mark" : "Large"; - Scalar prop = get_property ("markdir", 0); + Scalar prop = get_property ("markDirection", 0); if (prop.isnum_b ()) { staff_side_p_->dir_ = (Direction) (int) prop; @@ -67,11 +69,11 @@ Mark_engraver::do_process_requests () staff_side_p_->set_victim(text_p_); - // Scalar padding = get_property ("markScriptPadding", 0); - // if (padding.length_i() && padding.isnum_b ()) - // { - // script_p_->padding_f_ = Real(padding); - // } + Scalar padding = get_property ("markScriptPadding", 0); + if (padding.length_i() && padding.isnum_b ()) + { + staff_side_p_->padding_f_ = Real(padding); + } // Scalar break_priority = get_property ("markBreakPriority", 0); // if (break_priority.length_i() && break_priority.isnum_b ()) // { @@ -89,7 +91,10 @@ Mark_engraver::do_pre_move_processing () if (staff_side_p_) { Staff_symbol* s_l = get_staff_info().staff_sym_l_; - staff_side_p_->add_support (s_l); + if (s_l != 0) + { + staff_side_p_->add_support (s_l); + } typeset_element (text_p_); typeset_element (staff_side_p_); text_p_ = 0; @@ -104,6 +109,8 @@ Mark_engraver::acknowledge_element (Score_element_info i) if (staff_side_p_) { if (dynamic_cast (i.elem_l_) || + // dynamic_cast (i.elem_l_) || + dynamic_cast (i.elem_l_) || dynamic_cast (i.elem_l_)) { staff_side_p_->add_support (i.elem_l_); diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 43140d7dcc..2a0667a892 100644 --- a/lily/staff-info.cc +++ b/lily/staff-info.cc @@ -22,6 +22,7 @@ Staff_info::Staff_info() score_l_ =0; time_C_ = 0; rhythmic_C_ =0; + staff_sym_l_=0; } Score_column* diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 792c3aa02f..ba48473450 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -13,6 +13,7 @@ #include "text-def.hh" #include "note-head.hh" #include "stem.hh" +#include "staff-sym.hh" class Text_engraver : public Engraver { @@ -80,6 +81,7 @@ Text_engraver::do_process_requests () G_text_item *text = new G_text_item; G_staff_side_item *ss = new G_staff_side_item; ss->set_victim (text); + ss->dir_ = r->dir_; text->text_str_ = t->text_str_; @@ -94,8 +96,14 @@ Text_engraver::do_process_requests () void Text_engraver::do_pre_move_processing () { + Staff_symbol* s_l = get_staff_info().staff_sym_l_; for (int i=0; i < texts_.size (); i++) { + if (s_l != 0) + { + positionings_[i]->add_support (s_l); + } + typeset_element (texts_[i]); typeset_element (positionings_[i]); } diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 3925ccc051..b533da3a4f 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -6,7 +6,8 @@ STEPMAKE_TEMPLATES=metafont metapost install install-out EXTRA_DIST_FILES += TODO README feta.mp mfplain.ini -FET_FILES = $(wildcard feta[0-9]*.mf) feta-din10.mf +FET_FILES = $(wildcard feta[0-9]*.mf) feta-din10.mf \ + $(wildcard feta-nummer[0-9]*.mf) LYTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.ly)) LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log)) diff --git a/mf/cmbx12.afm.in b/mf/cmbx12.afm.in new file mode 100644 index 0000000000..845e102db1 --- /dev/null +++ b/mf/cmbx12.afm.in @@ -0,0 +1,133 @@ +FontName cmr +StartFontMetrics +StartCharMetrics +C 0; Character-0; B 0.00 0.00 9.83040 7.19440 +C 1; Character-1; B 0.00 0.00 9.83040 7.19440 +C 2; Character-2; B 0.00 0.00 9.17504 7.19440 +C 3; Character-3; B 0.00 0.00 8.25269 7.19440 +C 4; Character-4; B 0.00 0.00 7.86432 7.19440 +C 5; Character-5; B 0.00 0.00 9.22360 7.19440 +C 6; Character-6; B 0.00 0.00 8.51968 7.19440 +C 7; Character-7; B 0.00 0.00 9.17504 7.19440 +C 8; Character-8; B 0.00 0.00 8.51968 7.19440 +C 9; Character-9; B 0.00 0.00 9.17504 7.19440 +C 10; Character-10; B 0.00 0.00 8.51968 7.19440 +C 11; Character-11; B 0.00 0.00 6.88128 7.28177 +C 12; Character-12; B 0.00 0.00 6.55360 7.28177 +C 13; Character-13; B 0.00 0.00 6.55360 7.28177 +C 14; Character-14; B 0.00 0.00 9.83040 7.28177 +C 15; Character-15; B 0.00 0.00 9.83040 7.28177 +C 16; Character-16; B 0.00 0.00 3.27680 4.66033 +C 17; Character-17; B 0.00 0.00 3.60448 4.66033 +C 18; Character-18; B 0.00 0.00 5.89824 7.28177 +C 19; Character-19; B 0.00 0.00 5.89824 7.28177 +C 20; Character-20; B 0.00 0.00 5.89824 6.62641 +C 21; Character-21; B 0.00 0.00 5.89824 7.28177 +C 22; Character-22; B 0.00 0.00 5.89824 6.21473 +C 23; Character-23; B 0.00 0.00 8.90805 7.28177 +C 24; Character-24; B 0.00 0.00 5.24288 0 +C 25; Character-25; B 0.00 0.00 6.01961 7.28177 +C 26; Character-26; B 0.00 0.00 8.51968 4.66033 +C 27; Character-27; B 0.00 0.00 9.17504 4.66033 +C 28; Character-28; B 0.00 0.00 5.89824 5.67979 +C 29; Character-29; B 0.00 0.00 10.67995 7.19440 +C 30; Character-30; B 0.00 0.00 11.99067 7.19440 +C 31; Character-31; B 0.00 0.00 9.17504 7.70412 +C 32; Character-32; B 0.00 0.00 3.27680 4.66033 +C 33; Character-33; B 0.00 0.00 3.59235 7.28177 +C 34; Character-34; B 0.00 0.00 6.09243 7.28177 +C 35; Character-35; B 0.00 0.00 9.83040 7.28177 +C 36; Character-36; B 0.00 0.00 5.89824 7.86432 +C 37; Character-37; B 0.00 0.00 9.83040 7.86432 +C 38; Character-38; B 0.00 0.00 9.17504 7.28177 +C 39; Character-39; B 0.00 0.00 3.27680 7.28177 +C 40; Character-40; B 0.00 0.00 4.58752 7.86432 +C 41; Character-41; B 0.00 0.00 4.58752 7.86432 +C 42; Character-42; B 0.00 0.00 5.89824 7.86432 +C 43; Character-43; B 0.00 0.00 9.17504 6.55360 +C 44; Character-44; B 0.00 0.00 3.27680 1.50491 +C 45; Character-45; B 0.00 0.00 3.93216 4.66033 +C 46; Character-46; B 0.00 0.00 3.27680 1.50491 +C 47; Character-47; B 0.00 0.00 5.89824 7.86432 +C 48; Character-48; B 0.00 0.00 5.89824 6.75749 +C 49; Character-49; B 0.00 0.00 5.89824 6.75749 +C 50; Character-50; B 0.00 0.00 5.89824 6.75749 +C 51; Character-51; B 0.00 0.00 5.89824 6.75749 +C 52; Character-52; B 0.00 0.00 5.89824 6.75749 +C 53; Character-53; B 0.00 0.00 5.89824 6.75749 +C 54; Character-54; B 0.00 0.00 5.89824 6.75749 +C 55; Character-55; B 0.00 0.00 5.89824 6.75749 +C 56; Character-56; B 0.00 0.00 5.89824 6.75749 +C 57; Character-57; B 0.00 0.00 5.89824 6.75749 +C 58; Character-58; B 0.00 0.00 3.27680 4.66033 +C 59; Character-59; B 0.00 0.00 3.27680 4.66033 +C 60; Character-60; B 0.00 0.00 3.59235 5.24288 +C 61; Character-61; B 0.00 0.00 9.17504 4.05159 +C 62; Character-62; B 0.00 0.00 5.57056 5.24288 +C 63; Character-63; B 0.00 0.00 5.57056 7.28177 +C 64; Character-64; B 0.00 0.00 9.17504 7.28177 +C 65; Character-65; B 0.00 0.00 8.90805 7.19440 +C 66; Character-66; B 0.00 0.00 8.38619 7.19440 +C 67; Character-67; B 0.00 0.00 8.51968 7.19440 +C 68; Character-68; B 0.00 0.00 9.04155 7.19440 +C 69; Character-69; B 0.00 0.00 7.74296 7.19440 +C 70; Character-70; B 0.00 0.00 7.41528 7.19440 +C 71; Character-71; B 0.00 0.00 9.27213 7.19440 +C 72; Character-72; B 0.00 0.00 9.22360 7.19440 +C 73; Character-73; B 0.00 0.00 4.39335 7.19440 +C 74; Character-74; B 0.00 0.00 6.09243 7.19440 +C 75; Character-75; B 0.00 0.00 9.23573 7.19440 +C 76; Character-76; B 0.00 0.00 7.08760 7.19440 +C 77; Character-77; B 0.00 0.00 11.18968 7.19440 +C 78; Character-78; B 0.00 0.00 9.22360 7.19440 +C 79; Character-79; B 0.00 0.00 8.85949 7.19440 +C 80; Character-80; B 0.00 0.00 8.05851 7.19440 +C 81; Character-81; B 0.00 0.00 8.85949 7.19440 +C 82; Character-82; B 0.00 0.00 8.79883 7.19440 +C 83; Character-83; B 0.00 0.00 6.55360 7.19440 +C 84; Character-84; B 0.00 0.00 8.20413 7.19440 +C 85; Character-85; B 0.00 0.00 9.06583 7.19440 +C 86; Character-86; B 0.00 0.00 8.90805 7.19440 +C 87; Character-87; B 0.00 0.00 12.18485 7.19440 +C 88; Character-88; B 0.00 0.00 8.90805 7.19440 +C 89; Character-89; B 0.00 0.00 8.90805 7.19440 +C 90; Character-90; B 0.00 0.00 7.20896 7.19440 +C 91; Character-91; B 0.00 0.00 3.27680 7.86432 +C 92; Character-92; B 0.00 0.00 6.09243 7.28177 +C 93; Character-93; B 0.00 0.00 3.27680 7.86432 +C 94; Character-94; B 0.00 0.00 5.89824 7.28177 +C 95; Character-95; B 0.00 0.00 3.27680 7.28177 +C 96; Character-96; B 0.00 0.00 3.27680 7.28177 +C 97; Character-97; B 0.00 0.00 5.73440 4.66033 +C 98; Character-98; B 0.00 0.00 6.55360 7.28177 +C 99; Character-99; B 0.00 0.00 5.24288 4.66033 +C 100; Character-100; B 0.00 0.00 6.55360 7.28177 +C 101; Character-101; B 0.00 0.00 5.38245 4.66033 +C 102; Character-102; B 0.00 0.00 3.60448 7.28177 +C 103; Character-103; B 0.00 0.00 5.89824 4.66033 +C 104; Character-104; B 0.00 0.00 6.55360 7.28177 +C 105; Character-105; B 0.00 0.00 3.27680 7.28177 +C 106; Character-106; B 0.00 0.00 3.60448 7.28177 +C 107; Character-107; B 0.00 0.00 6.22592 7.28177 +C 108; Character-108; B 0.00 0.00 3.27680 7.28177 +C 109; Character-109; B 0.00 0.00 9.83040 4.66033 +C 110; Character-110; B 0.00 0.00 6.55360 4.66033 +C 111; Character-111; B 0.00 0.00 5.89824 4.66033 +C 112; Character-112; B 0.00 0.00 6.55360 4.66033 +C 113; Character-113; B 0.00 0.00 6.22592 4.66033 +C 114; Character-114; B 0.00 0.00 4.81812 4.66033 +C 115; Character-115; B 0.00 0.00 4.65307 4.66033 +C 116; Character-116; B 0.00 0.00 4.58752 6.65763 +C 117; Character-117; B 0.00 0.00 6.55360 4.66033 +C 118; Character-118; B 0.00 0.00 6.22592 4.66033 +C 119; Character-119; B 0.00 0.00 8.51968 4.66033 +C 120; Character-120; B 0.00 0.00 6.22592 4.66033 +C 121; Character-121; B 0.00 0.00 6.22592 4.66033 +C 122; Character-122; B 0.00 0.00 5.24288 4.66033 +C 123; Character-123; B 0.00 0.00 5.89824 4.66033 +C 124; Character-124; B 0.00 0.00 11.79648 4.66033 +C 125; Character-125; B 0.00 0.00 5.89824 7.28177 +C 126; Character-126; B 0.00 0.00 5.89824 7.28177 +C 127; Character-127; B 0.00 0.00 5.89824 7.28177 +EndCharMetrics +EndFontMetrics