From 4d9f3cfaf6a94ee4bf11ed9170732ee5e7f528c5 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 17 Dec 2004 09:24:21 +0000 Subject: [PATCH] * lily/include/open-type-font.hh (count): New method. * mf/aybabtu.pe.in: Typo. * lily/include/guile-compatibility.hh (SCM_HASHTABLE_P): Add compat. --- ChangeLog | 11 +++++++++++ lily/include/guile-compatibility.hh | 1 + lily/include/open-type-font.hh | 1 + lily/open-type-font.cc | 7 ++++++- lily/system-start-delimiter.cc | 5 ++--- mf/aybabtu.pe.in | 2 +- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a094a7170..bb21ff56fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-12-17 Jan Nieuwenhuizen + + * lily/include/open-type-font.hh (count): New method. + + * mf/aybabtu.pe.in: Typo. + + * Documentation/user/out/lilypond-internals.nexi (Scheme + functions): Typo. + + * lily/include/guile-compatibility.hh (SCM_HASHTABLE_P): Add compat. + 2004-12-17 Han-Wen Nienhuys * buildscripts/gen-bigcheese-scripts.py (i): use symbols for diff --git a/lily/include/guile-compatibility.hh b/lily/include/guile-compatibility.hh index 6d3046570a..a0db2d3ff8 100644 --- a/lily/include/guile-compatibility.hh +++ b/lily/include/guile-compatibility.hh @@ -35,6 +35,7 @@ inline SCM scm_caadr (SCM x) { return SCM_CAADR (x); } inline SCM scm_cadar (SCM x) { return SCM_CADAR (x); } #define scm_gc_unregister_collectable_memory(a, b, c) scm_done_free (b) #define scm_gc_register_collectable_memory(a, b, c) scm_done_malloc (b) +#define SCM_HASHTABLE_P(x) (SCM_VECTORP (x)) #define SCM_VECTOR_REF(v, i) (SCM_VELTS ((v))[(i)]) #define scm_from_bool(x) (x ? SCM_BOOL_T : SCM_BOOL_F) #define scm_from_int(x) SCM_MAKINUM (x) diff --git a/lily/include/open-type-font.hh b/lily/include/open-type-font.hh index 1f9890e342..251868bc0a 100644 --- a/lily/include/open-type-font.hh +++ b/lily/include/open-type-font.hh @@ -36,6 +36,7 @@ public: static SCM make_otf (String); virtual ~Open_type_font(); virtual Offset attachment_point (String) const; + virtual int count () const; virtual Box get_indexed_char (int) const; virtual int name_to_index (String) const; //virtual unsigned glyph_name_to_charcode (String) const; diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index 9d0154a771..e17fbc1bd0 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -138,7 +138,6 @@ Open_type_font::attachment_point (String glyph_name) const return point_constant * ly_scm2offset (att_scm); } - Box Open_type_font::get_indexed_char (int signed_idx) const { @@ -212,6 +211,12 @@ Open_type_font::glyph_name_to_index (String glyph_name) const } #endif +int +Open_type_font::count () const +{ + return ((Open_type_font*) this)->index_to_charcode_map_.size (); +} + Real Open_type_font::design_size () const { diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index add49a7ca3..81154f3cb2 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -162,7 +162,6 @@ Stencil System_start_delimiter::staff_brace (Grob *me, Real y) { Font_metric *fm = 0; - /* We go through the style sheet to lookup the font file name. This is better than using find_font directly, esp. because that triggers mktextfm for non-existent @@ -182,6 +181,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y) { int cmp = (lo + hi) / 2; b = fm->get_indexed_char (cmp); + //b = fm->get_indexed_char (fm->name_to_index ("brace" + to_string (cmp))); if (b[Y_AXIS].is_empty () || b[Y_AXIS].length () > y) hi = cmp; else @@ -189,8 +189,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y) } while (hi - lo > 1); - /* FIXME: ascii? */ - Stencil stil (fm->get_indexed_char_stencil (lo)); + Stencil stil (fm->find_by_name ("brace" + to_string (lo))); b = stil.extent_box (); b[X_AXIS] = Interval (0, 0); diff --git a/mf/aybabtu.pe.in b/mf/aybabtu.pe.in index 566d7c0430..2e293060ba 100644 --- a/mf/aybabtu.pe.in +++ b/mf/aybabtu.pe.in @@ -1,6 +1,6 @@ #!@FONTFORGE@ -# all your braces are belong to us +# all your brace are belong to us New(); -- 2.39.2