From f9d4fe7ed96d0695bfef20278c9592bc4d7ceadb Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 2 Nov 2006 12:12:03 +0000 Subject: [PATCH] use glyph indexing for glyph name .notdef make \caps markup default to smallCaps document utf-8 meaning of phrases. strip -Werror. trim warning messages. --- ChangeLog | 18 ++++++++++++++++++ buildscripts/git-update-changelog.py | 6 ++++++ configure.in | 2 -- input/regression/utf-8.ly | 1 + lily/pango-font.cc | 8 +++++--- lily/tie-configuration.cc | 6 ++++++ lily/tie.cc | 3 ++- lily/ttf.cc | 4 ++++ python/midi.c | 9 +++++---- scm/define-markup-commands.scm | 5 ++++- 10 files changed, 51 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54775341f5..c405a2399d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2006-11-01 Han-Wen Nienhuys + + * python/midi.c: + trim warning messages. + + * configure.in: + strip -Werror. + + * input/regression/utf-8.ly: + document utf-8 meaning of phrases. + + * scm/define-markup-commands.scm: + make \caps markup default to smallCaps + + * lily/pango-font.cc: + * lily/ttf.cc: + use glyph indexing for glyph name .notdef + 2006-11-02 Jan Nieuwenhuizen * input/regression/utf-8.ly: Fix doc to match order of language diff --git a/buildscripts/git-update-changelog.py b/buildscripts/git-update-changelog.py index a1cb3cf2f9..44a7aa09b8 100644 --- a/buildscripts/git-update-changelog.py +++ b/buildscripts/git-update-changelog.py @@ -150,6 +150,12 @@ Run this file from the CVS directory, with --git-dir log = log[len (first):] file_adddel = [] +<<<<<<< HEAD/buildscripts/git-update-changelog.py +======= + + collated_log = '' + collated_message = '' +>>>>>>> b1b4484cce6e2fe9d312b7617e801efa00dea57b/buildscripts/git-update-changelog.py collated_log = '' collated_message = '' diff --git a/configure.in b/configure.in index 7170cf9caa..16cb3c3f21 100644 --- a/configure.in +++ b/configure.in @@ -165,8 +165,6 @@ STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.8) AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}") -CXXFLAGS="$CXXFLAGS -Werror" - # Gather requirements and generate output. STEPMAKE_END diff --git a/input/regression/utf-8.ly b/input/regression/utf-8.ly index ac309fba78..a9b4179fac 100644 --- a/input/regression/utf-8.ly +++ b/input/regression/utf-8.ly @@ -45,6 +45,7 @@ japanese = \lyricmode { あさきゆめみじ ゑひもせず } +% "a legal song to you" portuguese = \lyricmode { à vo cê uma can ção legal } diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 7d50025c38..e075029154 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -178,12 +178,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, if (errorcode) programming_error ("FT_Get_Glyph_Name returns error"); } - + SCM char_id = SCM_EOL; if (glyph_name[0] == '\0' && cmap - - /* Ugh should ask FreeType about font type. */ && is_ttf && cmap->find (pg) != cmap->end ()) { @@ -200,6 +198,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, continue; } + + if (glyph_name == string (".notdef") && is_ttf) + glyph_name[0] = '\0'; + if (glyph_name[0] == '\0' && is_ttf) { // access by glyph index directly. diff --git a/lily/tie-configuration.cc b/lily/tie-configuration.cc index 2e15eb72eb..27f44691dd 100644 --- a/lily/tie-configuration.cc +++ b/lily/tie-configuration.cc @@ -80,6 +80,12 @@ Tie_configuration::column_span_length () const return column_ranks_[RIGHT] - column_ranks_[LEFT]; } +int +Tie_configuration::column_span_length () const +{ + return column_ranks_[RIGHT] - column_ranks_[LEFT]; +} + Real Tie_configuration::distance (Tie_configuration const &a, Tie_configuration const &b) diff --git a/lily/tie.cc b/lily/tie.cc index 264bc9172a..1263237688 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -213,7 +213,8 @@ Tie::calc_control_points (SCM smob) (void) get_grob_direction (me); Grob *yparent = me->get_parent (Y_AXIS); - if (Tie_column::has_interface (yparent) + if ((Tie_column::has_interface (yparent) + || Semi_tie_column::has_interface (yparent)) && unsmob_grob_array (yparent->get_object ("ties")) && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1) { diff --git a/lily/ttf.cc b/lily/ttf.cc index 3c6370fd25..0e5526f8e1 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -180,6 +180,10 @@ print_trailer (void *out, get_unicode_name (glyph_name, ucode); } + if (glyph_name == string (".notdef")) + glyph_name[0] = '\0'; + + if (!glyph_name[0]) { get_glyph_index_name (glyph_name, i); diff --git a/python/midi.c b/python/midi.c index ef6c7af810..f80a469380 100644 --- a/python/midi.c +++ b/python/midi.c @@ -332,8 +332,6 @@ pymidi_parse_track (PyObject *self, PyObject *args) unsigned char *track, *track_end; unsigned long track_size; - PyObject * sobj = PyTuple_GetItem (args, 0); - debug_print ("%s", "\n"); if (!PyArg_ParseTuple (args, "s#", &track, &track_size)) return 0; @@ -394,8 +392,6 @@ pymidi_parse (PyObject *self, PyObject *args) unsigned char *midi, *midi_end; unsigned long midi_size; - PyObject *sobj = PyTuple_GetItem (args, 0); - debug_print ("%s", "\n"); if (!PyArg_ParseTuple (args, "s#", &midi, &midi_size)) return 0; @@ -430,5 +426,10 @@ initmidi (void) add_constants (d); Midi_warning = PyString_FromString ("midi.warning"); PyDict_SetItemString (d, "warning", Midi_warning); + + /* + FIXME. + */ + (void) midi_warning; } diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 4d87479283..73e243a6a1 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -896,7 +896,7 @@ some punctuation. It doesn't have any letters. " "Set font size to -3." (interpret-markup layout (prepend-alist-chain 'font-size -3 props) arg)) -(define-markup-command (caps layout props arg) (markup?) +(define-markup-command (fontCaps layout props arg) (markup?) "Set @code{font-shape} to @code{caps}." (interpret-markup layout (prepend-alist-chain 'font-shape 'caps props) arg)) @@ -966,6 +966,9 @@ some punctuation. It doesn't have any letters. " #f #f))) +(define-markup-command (caps layout props arg) (markup?) + (interpret-markup layout props (make-smallCaps-markup arg))) + (define-markup-command (dynamic layout props arg) (markup?) "Use the dynamic font. This font only contains @b{s}, @b{f}, @b{m}, @b{z}, @b{p}, and @b{r}. When producing phrases, like ``pi@`{u} @b{f}'', the -- 2.39.5