2005-05-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/output-ps.scm (glyph-string): take cid? argument. Use
+ findresource iso. findfont for CID CFF fonts.
+
* VERSION (PACKAGE_NAME): release 2.5.25
* ly/Welcome_to_LilyPond.ly: add \version
PANGO_ASCENT (ink_rect)));
b.scale (scale_);
-
+
SCM glyph_exprs = SCM_EOL;
SCM *tail = &glyph_exprs;
+
+ bool cid_keyed = false;
for (int i = 0; i < pgs->num_glyphs; i++)
{
PangoGlyphInfo *pgi = pgs->glyphs + i;
/*
CID entry
*/
+ cid_keyed = true;
char_id = scm_from_int (pg);
}
else
((Pango_font *) this)->register_font_file (file_name, ps_name);
pango_fc_font_unlock_face (fcfont);
- SCM expr = scm_list_4 (ly_symbol2scm ("glyph-string"),
+ SCM expr = scm_list_5 (ly_symbol2scm ("glyph-string"),
scm_makfrom0str (ps_name.to_str0 ()),
scm_from_double (size),
+ scm_from_bool (cid_keyed),
ly_quote_scm (glyph_exprs));
return Stencil (b, expr);
(let* ((font (car font-name-filename))
(name (cadr font-name-filename))
(file-name (caddr font-name-filename))
- (bare-file-name (ly:find-file file-name)))
+ (bare-file-name (ly:find-file file-name))
+ )
(cons
(munge-lily-font-name name)
(list #f
(car name-psname-pair)
(cdr name-psname-pair)))
- (ly:pango-font-physical-fonts font)))
+ (ly:pango-font-physical-fonts font)))
+
(else
(ly:font-sub-fonts font))))
(define (glyph-string
postscript-font-name
- size
+ size cid?
x-y-named-glyphs)
+
(format #f "gsave 1 output-scale div 1 output-scale div scale
- /~a findfont ~a scalefont setfont\n~a grestore" postscript-font-name size
- (apply
- string-append
- (map (lambda (item)
- (let
- ((x (car item))
- (y (cadr item))
- (g (caddr item)))
-
- (if (and (= 0.0 x)
- (= 0.0 y))
- (format #f " /~a glyphshow\n" g)
- (format #f " ~a ~a rmoveto ~a~a glyphshow\n"
- x y
- (if (string? g) "/" "")
- g))))
- x-y-named-glyphs))))
+ /~a ~a ~a scalefont setfont\n~a grestore"
+ postscript-font-name
+ (if cid?
+ " /CIDFont findresource "
+ " findfont")
+
+ size
+ (apply
+ string-append
+ (map (lambda (item)
+ (let
+ ((x (car item))
+ (y (cadr item))
+ (g (caddr item)))
+
+ (if (and (= 0.0 x)
+ (= 0.0 y))
+ (format #f " /~a glyphshow\n" g)
+ (format #f " ~a ~a rmoveto ~a~a glyphshow\n"
+ x y
+ (if (string? g) "/" "")
+ g))))
+ x-y-named-glyphs))))
(define (grob-cause offset grob)
(let* ((cause (ly:grob-property grob 'cause))