* scm/framework-tex.scm (otf-font-load-command): load subfonts.
(tex-font-command-raw): new function.
* lily/include/virtual-font-metric.hh (Module): remove file
* lily/virtual-font-metric.cc (Module): remove file.
* lily/open-type-font.cc (LY_DEFINE): ly:otf-font-glyph-info
(get_indexed_char): read bbox from lily table if present.
+2004-12-17 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/output-tex.scm (named-glyph): new function. This fixes TeX output.
+
+ * scm/framework-tex.scm (otf-font-load-command): load subfonts.
+ (tex-font-command-raw): new function.
+
+ * lily/include/virtual-font-metric.hh (Module): remove file
+
+ * lily/virtual-font-metric.cc (Module): remove file.
+
+
+ * lily/open-type-font.cc (LY_DEFINE): ly:otf-font-glyph-info
+ (get_indexed_char): read bbox from lily table if present.
+
+2004-12-16 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * mf/GNUmakefile ($(outdir)/aybabtu.subfonts): rule for
+ aybabtu.subfonts
+
+ * mf/feta-beugel.mf (y): don't number consecutively, instead, use
+ global glyphname. Enables more than 64 glyphs in the OTF.
+
2004-12-16 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/font.scm (add-music-fonts): Load aybabtu iso all separate
def parse_logfile (fn):
(autolines, deps) = read_log_file (fn)
charmetrics = []
- global_info = {}
+
+ global_info = {
+ 'filename' : os.path.splitext (os.path.basename (fn))[0]
+ }
group = ''
for l in autolines:
f = 1.0
s = """(%s .
((bbox . (%f %f %f %f))
+ (subfont . "%s")
+ (subfont-index . %d)
(attachment . (%f . %f))))
""" %(charmetric['name'],
- -charmetric['breapth'] * f,
- -charmetric['depth'] * f,
- charmetric['width'] * f,
- charmetric['height'] * f,
- charmetric['wx'],
- charmetric['wy'])
+ -charmetric['breapth'] * f,
+ -charmetric['depth'] * f,
+ charmetric['width'] * f,
+ charmetric['height'] * f,
+ global_info['filename'],
+ charmetric['code'],
+ charmetric['wx'],
+ charmetric['wy'])
return s
#include "font-metric.hh"
typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
-//typedef std::map<String, FT_ULong> Glyph_name_to_charcode_map;
+typedef std::map<String, FT_ULong> Glyph_name_to_index_map;
class Open_type_font : public Font_metric
{
SCM lily_character_table_;
SCM lily_global_table_;
Index_to_charcode_map index_to_charcode_map_;
- //Glyph_name_to_charcode_map glyph_name_to_charcode_map_;
+ Glyph_name_to_index_map glyph_name_to_index_map_;
Open_type_font (FT_Face);
public:
+ SCM get_subfonts () const;
+ SCM get_global_table () const;
+ SCM get_char_table () const;
+
static SCM make_otf (String);
virtual ~Open_type_font();
virtual Offset attachment_point (String) const;
static void set_spacing_hints (Grob *);
DECLARE_SCHEME_CALLBACK (print, (SCM));
- DECLARE_SCHEME_CALLBACK (off_callback, (SCM element, SCM axis));
+ DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
- DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
+ DECLARE_SCHEME_CALLBACK (width_callback, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (height, (SCM, SCM));
private:
#include "lily-guile.hh"
#include "lily-proto.hh"
-/*
-
- TODO: quantise, we don't want to collide with staff lines.
- (or should we be above staff?)
-
- todo: handle breaking elegantly.
-*/
class Tuplet_bracket
{
public:
+ DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
+ DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
DECLARE_SCHEME_CALLBACK (print, (SCM ));
+
static bool has_interface (Grob*);
-
static void add_column (Grob*me,Item*);
static void add_beam (Grob*me,Grob*);
static Grob *parallel_beam (Grob *me, Link_array<Grob> const&cols, bool *equally_long);
static void calc_position_and_height (Grob*,Real*,Real *dy);
-
- DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
-
- DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
static Stencil make_bracket (Grob *me, Axis protusion_axis,
Offset dz, Drul_array<Real> height,
Interval gap, Drul_array<Real> widen,
+++ /dev/null
-
-/*
-virtual-font-metric.hh -- declare Virtual_font_metric
-
-source file of the GNU LilyPond music typesetter
-
-(c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef VIRTUAL_FONT_METRIC_HH
-#define VIRTUAL_FONT_METRIC_HH
-
-#include "font-metric.hh"
-
-class Virtual_font_metric : public Font_metric
-{
- SCM font_list_;
-
-public:
- SCM get_font_list () const;
- Virtual_font_metric (SCM namelist);
- virtual Real design_size () const;
- virtual int count () const;
- virtual Box get_indexed_char (int ascii) const;
- virtual Box get_ascii_char (int ascii) const;
- virtual Stencil get_indexed_char_stencil (int ascii) const;
- virtual Stencil get_ascii_char_stencil (int ascii) const;
- virtual Offset get_indexed_wxwy (int) const;
- virtual int name_to_index (String)const;
- virtual Stencil find_by_name (String) const;
- virtual String coding_scheme () const;
-
-protected:
- virtual void derived_mark () const;
-};
-
-
-#endif /* VIRTUAL_FONT_METRIC_HH */
-
#include "warn.hh"
#include "open-type-font.hh"
#include "dimensions.hh"
-
+#include "modified-font-metric.hh"
const Real point_constant = 1 PT;
}
-Index_to_charcode_map
+Index_to_charcode_map
make_index_to_charcode_map (FT_Face face)
{
Index_to_charcode_map m;
return m;
}
-#if 0
-Glyph_name_to_charcode_map
-make_glyph_name_to_charcode_map (FT_Face face)
-{
- Glyph_name_to_charcode_map m;
- FT_ULong charcode;
- FT_UInt gindex;
- char buffer[1024];
-
- for (charcode = FT_Get_First_Char (face, &gindex); gindex != 0;
- charcode = FT_Get_Next_Char (face, charcode, &gindex))
- {
- if (FT_Get_Glyph_Name (face, gindex, buffer, sizeof (buffer) - 1))
- {
- programming_error ("no glyph name");
- continue;
- }
- m[String (buffer)] = charcode;
- }
- return m;
-}
-#endif
-
Open_type_font::~Open_type_font()
{
FT_Done_Face (face_);
return otf->self_scm ();
}
-
Open_type_font::Open_type_font (FT_Face face)
{
face_ = face;
lily_global_table_ = alist_to_hashq (load_scheme_table ("LILY", face_));
lily_subfonts_ = load_scheme_table ("LILF", face_);
index_to_charcode_map_ = make_index_to_charcode_map (face_);
-
- //glyph_name_to_charcode_map_ = make_glyph_name_to_charcode_map (face_);
}
void
return o;
SCM char_alist = entry;
-
-
SCM att_scm = scm_cdr (scm_assq (ly_symbol2scm ("attachment"), char_alist));
return point_constant * ly_scm2offset (att_scm);
}
+
Box
Open_type_font::get_indexed_char (int signed_idx) const
{
+ if (SCM_HASHTABLE_P (lily_character_table_))
+ {
+ const int len =256;
+ char name[len];
+ int code = FT_Get_Glyph_Name (face_, signed_idx, name, len);
+ if (code)
+ {
+ warning ("FT_Get_Glyph_Name() returned error");
+ }
+
+ SCM sym = ly_symbol2scm (name);
+ SCM alist = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
+
+ if (alist != SCM_BOOL_F)
+ {
+ SCM bbox = scm_cdr (scm_assq (ly_symbol2scm ("bbox"), alist));
+
+ Box b;
+ b[X_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[Y_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[X_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[Y_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+
+ b.scale (point_constant);
+ return b;
+ }
+ }
+
FT_UInt idx = signed_idx;
FT_Load_Glyph (face_,
idx,
#if 0
unsigned
-Open_type_font::glyph_name_to_charcode (String glyph_name) const
+Open_type_font::glyph_name_to_index (String glyph_name) const
{
return ((Open_type_font*) this)->glyph_name_to_charcode_map_[glyph_name];
}
return fm->sub_fonts ();
}
+LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0,
+ (SCM font, SCM glyph),
+ "Given the font metric @var{font} of an OpenType font, return the "
+ "information about named glyph @var{glyph} (a string)")
+{
+ Modified_font_metric * fm
+ = dynamic_cast<Modified_font_metric*> (unsmob_metrics (font));
+ Open_type_font * otf = dynamic_cast<Open_type_font*> (fm->original_font ());
+ SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OTF font-metric");
+ SCM_ASSERT_TYPE (scm_is_string (glyph), glyph, SCM_ARG1,
+ __FUNCTION__, "string");
+
+ SCM sym = scm_string_to_symbol (glyph);
+ return scm_hashq_ref (otf->get_char_table (), sym, SCM_EOL);
+}
+
+SCM
+Open_type_font::get_char_table () const
+{
+ return lily_character_table_;
+}
+
+SCM
+Open_type_font::get_subfonts () const
+{
+ return lily_subfonts_;
+}
+
+SCM
+Open_type_font::get_global_table () const
+{
+ return lily_global_table_;
+}
#include "ly-module.hh"
#include "output-def.hh"
#include "modified-font-metric.hh"
-#include "virtual-font-metric.hh"
Real
output_scale (Output_def *od)
return find_scaled_font (mod->parent_, f, m, font_encoding, input_encoding);
Real lookup_mag = m;
- if (!dynamic_cast<Virtual_font_metric*> (f))
- lookup_mag /= output_scale (mod);
SCM font_table = mod->lookup_variable (ly_symbol2scm ("scaled-fonts"));
if (scm_hash_table_p (font_table) != SCM_BOOL_T)
else
sizes = SCM_EOL;
- /* Hmm. We're chaining font - metrics. Should consider whether to
- merge virtual-font and scaled_font. */
- SCM val = SCM_EOL;
- if (Virtual_font_metric * vf = dynamic_cast<Virtual_font_metric*> (f))
- {
- /* For fontify_atom (), the magnification and name must be known
- at the same time. That's impossible for
-
- Scaled (Virtual_font (Font1,Font2))
-
- so we replace by
-
- Virtual_font (Scaled (Font1), Scaled (Font2)) */
- SCM lst = SCM_EOL;
- SCM *t = &lst;
- for (SCM s = vf->get_font_list (); scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *scaled
- = find_scaled_font (mod, unsmob_metrics (scm_car (s)), m,
- font_encoding, input_encoding);
- *t = scm_cons (scaled->self_scm (), SCM_EOL);
- t = SCM_CDRLOC (*t);
- }
-
- vf = new Virtual_font_metric (lst);
- val = vf->self_scm ();
- }
- else
- val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag,
+ SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag,
font_encoding,
input_encoding);
{
Font_metric *fm = all_fonts_global->find_otf (MUSIC_FONT);
if (!fm)
- error (_f ("cannot find `%s'", MUSIC_FONT ".otf")
- + "\n"
- + _ ("Music font has not been installed properly.")
- + _ ("Aborting"));
-
+ {
+ error (_f ("cannot find `%s'", MUSIC_FONT ".otf")
+ + "\n"
+ + _ ("Music font has not been installed properly.\n")
+ + _f ("Search path `%s'\n", global_path.to_string ().to_str0())
+ + _ ("Aborting"));
+ }
+
if (!scm_is_string (ly_kpathsea_find_file (scm_makfrom0str ("ecrm10.pfa")))
&& (!scm_is_string (ly_kpathsea_find_file (scm_makfrom0str ("lmr10.pfb")))))
error (_f ("cannot find `%s'", "ecrm10.pfa")
return flag;
}
-MAKE_SCHEME_CALLBACK (Stem,dim_callback,2);
+MAKE_SCHEME_CALLBACK (Stem,width_callback,2);
SCM
-Stem::dim_callback (SCM e, SCM ax)
+Stem::width_callback (SCM e, SCM ax)
{
Axis a = (Axis) scm_to_int (ax);
assert (a == X_AXIS);
/*
move the stem to right of the notehead if it is up.
*/
-MAKE_SCHEME_CALLBACK (Stem, off_callback, 2);
+MAKE_SCHEME_CALLBACK (Stem, offset_callback, 2);
SCM
-Stem::off_callback (SCM element_smob, SCM)
+Stem::offset_callback (SCM element_smob, SCM)
{
Grob *me = unsmob_grob (element_smob);
Real r = 0.0;
*/
+
+/*
+ FIXME. Need to use markup.
+ */
struct Sustain_pedal
{
public:
for (int i = 0; i < text.length (); i++)
{
- String idx ("pedal-");
+ String idx ("pedal.");
if (text.cut_string (i, 3) == "Ped")
{
idx += "Ped";
#include "warn.hh"
#include "grob.hh"
#include "font-interface.hh"
-#include "virtual-font-metric.hh"
#include "output-def.hh"
#include "modified-font-metric.hh"
#include "ly-module.hh"
*/
-#include "tuplet-bracket.hh"
+/*
+
+ TODO: quantise, we don't want to collide with staff lines.
+ (or should we be above staff?)
+
+ todo: handle breaking elegantly.
+*/
#include <math.h>
+#include "tuplet-bracket.hh"
#include "line-interface.hh"
#include "beam.hh"
#include "warn.hh"
use first -> last note for slope, and then correct for disturbing
notes in between. */
void
-Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
+Tuplet_bracket::calc_position_and_height (Grob*me, Real *offset, Real * dy)
{
Link_array<Grob> columns =
Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
-
SCM cols = me->get_property ("note-columns");
Grob * commony = common_refpoint_of_list (cols, me, Y_AXIS);
Grob * commonx = common_refpoint_of_list (cols, me, X_AXIS);
else if (!scm_is_number (rp) && !scm_is_number (lp))
{
lp = scm_make_real (offset);
- rp = scm_make_real (offset +dy);
+ rp = scm_make_real (offset + dy);
}
me->set_property ("left-position", lp);
-ADD_INTERFACE (Tuplet_bracket,"tuplet-bracket-interface",
- "A bracket with a number in the middle, used for tuplets.",
- "note-columns bracket-flare edge-height shorten-pair padding left-position right-position bracket-visibility number-visibility thickness direction");
+ADD_INTERFACE (Tuplet_bracket,
+ "tuplet-bracket-interface",
+ "A bracket with a number in the middle, used for tuplets.",
+
+ "note-columns bracket-flare edge-height shorten-pair "
+ "padding left-position right-position bracket-visibility "
+ "number-visibility thickness direction");
+++ /dev/null
-/*
- virtual-font-metric.cc -- implement Virtual_font_metric
-
-source file of the GNU LilyPond music typesetter
-
-(c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "virtual-font-metric.hh"
-
-#include "all-font-metrics.hh"
-#include "stencil.hh"
-#include "output-def.hh"
-#include "warn.hh"
-
-/*
- passing DEF is ughish. Should move into layoutdef?
- */
-Virtual_font_metric::Virtual_font_metric (SCM font_list)
-{
- font_list_ = SCM_EOL;
- SCM *tail = &font_list_;
-
- SCM mag = SCM_EOL;
- SCM name_list = SCM_EOL;
- SCM *name_tail = &name_list;
-
- for (SCM s = font_list; scm_is_pair (s); s = scm_cdr (s))
- {
- if (Font_metric *fm = unsmob_metrics (scm_car (s)))
- {
- *tail = scm_cons (scm_car (s),SCM_EOL);
- tail = SCM_CDRLOC (*tail);
-
- if (!scm_is_number (mag))
- /* Ugh. */
- mag = scm_cdr (fm->description_);
-
- *name_tail = scm_cons (scm_car (fm->description_), SCM_EOL);
- name_tail = SCM_CDRLOC (*name_tail);
- }
- }
-
- description_ = scm_cons (name_list, mag);
-}
-
-Real
-Virtual_font_metric::design_size () const
-{
- return unsmob_metrics (scm_car (font_list_))-> design_size ();
-}
-
-void
-Virtual_font_metric::derived_mark ()const
-{
- scm_gc_mark (font_list_);
-}
-
-int
-Virtual_font_metric::count () const
-{
- int k = 0;
- for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s))
- k += unsmob_metrics (scm_car (s))->count ();
- return k;
-}
-
-Stencil
-Virtual_font_metric::find_by_name (String glyph) const
-{
- Stencil m;
- for (SCM s = font_list_; m.is_empty () && scm_is_pair (s); s = scm_cdr (s))
- m = unsmob_metrics (scm_car (s))->find_by_name (glyph);
-
- return m;
-}
-
-Box
-Virtual_font_metric::get_ascii_char (int) const
-{
- programming_error ("Virtual font metric cannot be indexed by ASCII.");
- return Box ();
-}
-
-Stencil
-Virtual_font_metric::get_ascii_char_stencil (int ) const
-{
- programming_error ("Virtual font metric cannot be indexed by ASCII.");
- return Stencil ();
-}
-
-Offset
-Virtual_font_metric::get_indexed_wxwy (int code) const
-{
- int total = 0;
- for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *fm = unsmob_metrics (scm_car (s));
- if (code < total + fm->count ())
- return fm->get_indexed_wxwy (code - total);
- total += fm->count ();
- }
- return Offset (0,0);
-}
-
-Box
-Virtual_font_metric::get_indexed_char (int code) const
-{
- int total = 0;
- for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *fm = unsmob_metrics (scm_car (s));
- if (code < total + fm->count ())
- return fm->get_indexed_char (code - total);
- total += fm->count ();
- }
- return Box ();
-}
-
-int
-Virtual_font_metric::name_to_index (String glyph) const
-{
- Stencil m;
- int total = 0;
- for (SCM s = font_list_; m.is_empty () && scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *m = unsmob_metrics (scm_car (s));
- int k = m->name_to_index (glyph);
- if (k >= 0)
- return total + k;
-
- total += m->count ();
- }
- return -1;
-}
-
-Stencil
-Virtual_font_metric::get_indexed_char_stencil (int code) const
-{
- Stencil m ;
- int total = 0;
-
- for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *fm = unsmob_metrics (scm_car (s));
- if (code < total + fm->count ())
- {
- /* Ugh. */
- m = fm->get_indexed_char_stencil (code - total);
- break;
- }
- total += fm->count ();
- }
- return m;
-}
-
-
-SCM
-Virtual_font_metric::get_font_list () const
-{
- return font_list_;
-}
-
-LY_DEFINE (ly_make_virtual_font, "ly:make-virtual-font", 0, 0, 1,
- (SCM args),
- "Make a virtual font metric from @var{args}, "
- "a list of font objects.")
-{
- Virtual_font_metric *fm = new Virtual_font_metric (args);
- return scm_gc_unprotect_object (fm->self_scm ());
-}
-
-String
-Virtual_font_metric::coding_scheme () const
-{
- Font_metric *fm = unsmob_metrics (scm_car (font_list_));
- return fm->coding_scheme ();
-}
$(outdir)/%.otf-table: $(outdir)/%.lisp
cat $< $(subst parmesan,feta,$<) > $@
+$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts
+$(outdir)/aybabtu.subfonts:
+ echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@
$(PE_SCRIPTS):
$(PYTHON) $(buildscript-dir)/gen-bigcheese-scripts.py --dir=$(outdir)
-save code;
+save code, braces_per_font;
code := 64;
+braces_per_font := 64;
-
-def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
+def draw_brace (expr height_sharp, width_sharp, slt_sharp, brace_number) =
save pendir, height, width, thin, thick, slt;
save penangle;
slt# := slt_sharp;
%% +1 is needed because fet_beginchar increments after dumping the strings.
-fet_beginchar ("brace number " & (decimal (code + 1)),
- "brace" & decimal code)
+fet_beginchar ("brace number " & (decimal (brace_number)),
+ "brace" & decimal(brace_number))
set_char_box (0, width#, height#/2, height#/2);
+
for i := 0 step 1 until font_count:
%% We can't store more than 64 (65?) height dimensions in a TFM
%% file, so we make small files.
+ save number;
+
+ number := braces_per_font * i;
for j := 0 step 1 until 63:
% message "l: "&decimal l;
% note: define_pixels (x) multiplies x by hppp,
% must never get bigger than infinity
y := y + increment;
-
if y > infinity/hppp:
message "Resolution and/or magnification is too high";
error please report: <bug-lilypond@gnu.org>;
increment := x / 10;
linethickness := min (0.5pt#, y/150);
if i = font_count:
- draw_brace (y, x, linethickness);
+ draw_brace (y, x, linethickness, number);
fi
+ number := number + 1;
endfor;
endfor
;; The 'extreme case' minima
(beamed-extreme-minimum-free-lengths . (2.0 1.25))
- (X-offset-callbacks . (,Stem::off_callback))
- (X-extent-callback . ,Stem::dim_callback)
+ (X-offset-callbacks . (,Stem::offset_callback))
+ (X-extent-callback . ,Stem::width_callback)
(Y-extent-callback . ,Stem::height)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(meta . ((interfaces . (stem-interface font-interface item-interface ))))
'pre ""
'post))
+
+(define-public (tex-font-command-raw name magnification)
+ (string-append
+ "magfont"
+ (string-encode-integer
+ (hash name 1000000))
+ "m"
+ (string-encode-integer
+ (inexact->exact (round (* 1000 magnification))))))
+
+(define-public (tex-font-command font)
+ (tex-font-command-raw
+ (ly:font-file-name font) (ly:font-magnification font)))
+
+
(define (otf-font-load-command paper font)
(let*
- ((sub-fonts (ly:font-sub-fonts font))
- (base-name (tex-font-command font)))
+ ((sub-fonts (ly:font-sub-fonts font)))
(string-append
(apply string-append
(map
(lambda (sub-name)
(string-append
- "\\font\\" (string-append base-name (digits->letters sub-name)) "="
- sub-name
+ "\\font\\" (tex-font-command-raw sub-name (ly:font-magnification font))
+ "=" sub-name
" scaled "
(ly:number->string (inexact->exact
(round (* 1000
(ly:font-magnification font)
(ly:paper-outputscale paper)))))
"%\n"))
- sub-fonts)))
-
- "\\def\\" (tex-font-command font) "{"
- (apply string-append
- (map (lambda (name)
- "\\def\\" (string-append base-name (digits->letters name))
- )
- ))))
+ sub-fonts)))))
-(define-public (tex-font-command font)
- (string-append
- "magfont"
- (string-encode-integer
- (hashq (ly:font-file-name font) 1000000))
- "m"
- (string-encode-integer
- (inexact->exact (round (* 1000 (ly:font-magnification font)))))))
(define (simple-font-load-command paper font)
(let* ((coding-alist (ly:font-encoding-alist font))
(define (named-glyph font name)
- (string-append "\\" (tex-font-command font)
- "\\"
- (string-append
-; (digits->letters (ly:font-name font))
- (regexp-substitute/global
- #f "[-\\._]"
- (digits->letters name)
- 'pre ""
- 'post))))
+ (let*
+ ((info (ly:otf-font-glyph-info font name)))
+
+ (string-append "\\" (tex-font-command-raw
+ (assoc-get 'subfont info)
+ (ly:font-magnification font))
+ "\\char" (number->string (assoc-get 'subfont-index info)))))
(define (dashed-line thick on off dx dy)
(embedded-ps (list 'dashed-line thick on off dx dy)))
Staff_symbol::print
Staff_symbol_referencer::callback
Stem::before_line_breaking
- Stem::dim_callback
+ Stem::width_callback
Stem::height
- Stem::off_callback
+ Stem::offset_callback
Stem::print
Stem_tremolo::height
Stem_tremolo::print