#include "open-type-font.hh"
#include "dimensions.hh"
+
+const Real point_constant = 1 PT;
+
FT_Byte *
load_table (char const *tag_str, FT_Face face, FT_ULong *length)
{
load_scheme_table (char const *tag_str, FT_Face face)
{
FT_ULong length = 0;
- FT_Byte* buffer =load_table (tag_str, face, &length);
+ FT_Byte* buffer = load_table (tag_str, face, &length);
SCM tab = SCM_EOL;
if (buffer)
return otf->self_scm ();
}
-Open_type_font::Open_type_font(FT_Face)
+Open_type_font::Open_type_font(FT_Face face)
{
+ face_ = face;
lily_character_table_ = SCM_EOL;
lily_global_table_ = SCM_EOL;
SCM char_alist = entry;
- SCM att_scm =scm_cdr (scm_assq (char_alist, ly_symbol2scm ("attachment")));
+ SCM att_scm =scm_cdr (scm_assq (ly_symbol2scm ("attachment"), char_alist));
return ly_scm2offset (att_scm);
}
Box b (Interval (-hb, m.width - hb),
Interval (-vb, m.height - vb));
- Real point_constant = 1 PT;
b.scale (design_size() * Real (point_constant) / face_->units_per_EM);
Real
Open_type_font::design_size () const
{
- return scm_to_double (scm_hashq_ref (lily_global_table_, ly_symbol2scm ("staffsize"), SCM_BOOL_F));
+ return point_constant * scm_to_double (scm_hashq_ref (lily_global_table_, ly_symbol2scm ("staffsize"), SCM_BOOL_F));
}