source file of the GNU LilyPond music typesetter
- (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
+ (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include <map>
#include "dimensions.hh"
#include "modified-font-metric.hh"
-const Real point_constant = 1 PT;
-
FT_Byte *
load_table (char const *tag_str, FT_Face face, FT_ULong *length)
{
- FT_ULong tag = FT_MAKE_TAG(tag_str[0], tag_str[1], tag_str[2], tag_str[3]);
+ FT_ULong tag = FT_MAKE_TAG (tag_str[0], tag_str[1], tag_str[2], tag_str[3]);
int error_code = FT_Load_Sfnt_Table (face, tag, 0, NULL, length);
if (!error_code)
error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, length );
if (error_code)
- {
- error (_f ("Could not load %s font table", tag_str));
- }
+ error (_f ("Could not load %s font table", tag_str));
return buffer;
}
return tab;
}
-
Index_to_charcode_map
make_index_to_charcode_map (FT_Face face)
{
Box b (Interval (-hb, m.width - hb),
Interval (-vb, m.height - vb));
- b.scale (design_size () * Real (point_constant) / face_->units_per_EM);
+ b.scale (design_size () / Real (face_->units_per_EM));
return b;
}
/*
Hmm. Design size is arbitrary for
- non-designe-size fonts. I vote for 1 -
+ non-design-size fonts. I vote for 1 -
which will trip errors more
quickly. --hwn.
*/
scm_from_int (1));
- return scm_to_double (entry);
+ return scm_to_double (entry) * Real (point_constant);
}
{
return lily_global_table_;
}
+
+String
+Open_type_font::font_name () const
+{
+ return FT_Get_Postscript_Name (face_);
+}
+