+2004-12-12 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * lily/lily-guile.cc: Use scm_from_locale_stringn.
+
+ * lily/include/guile-compatibility.hh (scm_from_locale_stringn): Add
+ compatibility.
+
2004-12-12 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/open-type-font.cc (get_indexed_char): scale metrics by
#define scm_is_integer(x) SCM_INUMP (x)
#define scm_is_string(x) SCM_STRINGP (x)
#define scm_hash_table_p scm_vector_p
+#define scm_from_locale_stringn(s, n) scm_mem2string (s, n)
#define scm_i_string_chars(x) SCM_STRING_CHARS (x)
#define scm_i_string_length(x) SCM_STRING_LENGTH (x)
inline bool ly_c_number_p (SCM x) { return SCM_NUMBERP (x); }
{
SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
String contents = gulp_file_to_string (ly_scm2string (name), true);
-
- char * data ;
- SCM scm_str = scm_i_make_string (contents.length(), &data);
- memcpy (data, contents.get_bytes(), contents.length());
-
- return scm_str;
+ return scm_from_locale_stringn (contents.get_str0 (), contents.length ());
}
))
-
(define (load-fonts paper)
(let* ((fonts (ly:paper-fonts paper))
(font-names (uniq-list (sort (map ly:font-file-name fonts) string<?)))
;; FIXME: bigcheese says FontSpecific
(else (if (string=? (font-family font) "bigcheese20")
;;#xf000 0)))
+ ;; FIXME: hmm, why does name_to_index not return actual
+ ;; unicode mapping?
+
;; ugh, we must know which font from bigcheese;
- ;; feta-proper starts at 0xe0e3
+ ;; feta-proper starts at 0xefc
;; but we cannot display feta-nummer or feta-din characters
;; this way
- #xe0e3 0)))
+ #xe0fc 0)))
(char->integer char)))
(filledbox (- x1) (- x2 x1) (* .5 thickness) (* .5 thickness)))
(define (placebox x y expr)
-
- (debugf "x,y: ~S,~S\n" x y)
- ;; FIXME: dimensions with bigcheese are broken
- ;;; help hello-world of bigcheese a bit to figure out what's
- ;;; wrong
- (set! x (+ 10 (/ x 50)))
- (if (< y -800)
- (set! y (+ y 700)))
- (if (< y -250)
- (set! y (+ y 250)))
-
- (debugf "item: ~S\n" expr)
- (debugf "x,y: ~S,~S\n" x y)
(let ((item expr))
;;(if item
;; FIXME ugly hack to skip #unspecified ...
;; ugh, experimental placement corections
;; #:x 0.0 #:y 0.0
#:x 0.0 #:y (if (memq encoding '(fetaMusic fetaBraces)) 0.15 0.69)
-
#:anchor (if (memq encoding '(fetaMusic fetaBraces)) 'west 'south-west)
#:font (pango-font-name font)
#:size-points (pango-font-size font)