SCM font_file_name () const;
void register_font_file (String, String);
Stencil text_stencil (String) const;
- Stencil pango_item_string_stencil (PangoItem*, String) const;
+ Stencil pango_item_string_stencil (PangoItem*, String, Real) const;
virtual SCM sub_fonts () const;
virtual void derived_mark () const;
#include "text-metrics.hh"
#include "warn.hh"
#include "stencil.hh"
+#include "lookup.hh"
Modified_font_metric::Modified_font_metric (Font_metric *fm,
Real magnification,
Box b = stc.extent_box ();
b.scale (magnification_);
- return Stencil (b, stc.expr());
+ Stencil scaled(b, stc.expr());
+ return scaled;
}
return Font_metric::text_stencil (text);
#include <pango/pangoft2.h>
+#include "lookup.hh"
#include "dimensions.hh"
#include "pango-font.hh"
}
Stencil
-Pango_font::pango_item_string_stencil (PangoItem *item, String str) const
+Pango_font::pango_item_string_stencil (PangoItem *item, String str, Real dx) const
{
const int GLYPH_NAME_LEN = 256;
char glyph_name[GLYPH_NAME_LEN];
PangoGlyphGeometry ggeo = pgi->geometry;
FT_Get_Glyph_Name (ftface, pg, glyph_name, GLYPH_NAME_LEN);
- *tail = scm_cons (scm_list_3 (scm_from_double (ggeo.x_offset * scale_),
+ *tail = scm_cons (scm_list_3 (scm_from_double (ggeo.x_offset * scale_ + dx),
scm_from_double (ggeo.y_offset * scale_),
scm_makfrom0str (glyph_name)),
SCM_EOL);
+ dx = 0.0;
tail = SCM_CDRLOC (*tail);
}
ly_quote_scm (glyph_exprs));
Stencil item_stencil (b, expr);
+
return item_stencil;
}
str.to_str0 (),
0, str.length (), attribute_list_,
NULL);
-
GList *ptr = items;
Stencil dest;
{
PangoItem *item = (PangoItem*) ptr->data;
- Stencil item_stencil = pango_item_string_stencil (item, str);
+ Stencil item_stencil = pango_item_string_stencil (item, str, x);
- item_stencil.translate_axis (x, X_AXIS);
- x += item_stencil.extent (X_AXIS)[RIGHT];
+ x = item_stencil.extent (X_AXIS)[RIGHT];
dest.add_stencil (item_stencil);
postscript-font-name
size
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
- (cons
- (format #f " /~a findfont ~a output-scale div scalefont setfont " postscript-font-name size)
- (map (lambda (item)
- (format #f " ~a ~a rmoveto /~a glyphshow "
- (car item)
- (cadr item)
- (caddr item)))
- x-y-named-glyphs))))
+ (map (lambda (item)
+ (format #f " ~a ~a rmoveto /~a glyphshow "
+ (car item)
+ (cadr item)
+ (caddr item)))
+ x-y-named-glyphs))
+ ))
(define (grob-cause grob)
"")