source file of the GNU LilyPond music typesetter
- (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1999--2002 Jan Nieuwenhuizen <janneke@gnu.org>
some code shamelessly copied from GNU fontutils-0.6/tfm/tfm_input.c
#include "string-convert.hh"
#include "debug.hh"
#include "warn.hh"
+#include "dimensions.hh"
Box
Tex_font_char_metric::dimensions () const
}
Real d = -depth_;
- return Box (Interval (0, width_),Interval (d <? height_, d >? height_));
+
+ Real point_constant = 1 PT;
+
+ return Box (Interval (0, width_*point_constant ),
+ Interval ((d <? height_)*point_constant,
+ (d >? height_)*point_constant));
}
Tex_font_char_metric::Tex_font_char_metric ()
return &dummy_static_char_metric;
}
+
+/*
+ UGH: glyphs need not be consecutive in TFM.
+ */
+int
+Tex_font_metric::count () const
+{
+ for (int i = ascii_to_metric_idx_.size (); i--;)
+ {
+ if (ascii_to_metric_idx_[i] != -1)
+ return i + 1;
+ }
+ return 0;
+}
+
Box
Tex_font_metric::get_char (int a) const
{