From: Han-Wen Nienhuys Date: Sat, 11 Dec 2004 13:27:28 +0000 (+0000) Subject: new file. X-Git-Tag: release/2.5.14~455 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a9e7fcacf0713d51b7a241a1e0459640578d5494;p=lilypond.git new file. --- diff --git a/lily/break-algorithm.cc b/lily/break-algorithm.cc index 50064dad46..120a55969e 100644 --- a/lily/break-algorithm.cc +++ b/lily/break-algorithm.cc @@ -7,7 +7,6 @@ */ #include "break-algorithm.hh" - #include "paper-column.hh" #include "output-def.hh" #include "system.hh" @@ -17,7 +16,6 @@ #include "simple-spacer.hh" #include "group-interface.hh" - Array Break_algorithm::find_break_indices () const { @@ -35,7 +33,6 @@ Break_algorithm::find_break_indices () const return retval; } - Link_array Break_algorithm::find_breaks () const { @@ -53,7 +50,6 @@ Break_algorithm::find_breaks () const return retval; } - Simple_spacer_wrapper* Break_algorithm::generate_spacing_problem (Link_array const &curline, Interval line) const diff --git a/lily/event.cc b/lily/event.cc index de42836dcf..e79f39eafc 100644 --- a/lily/event.cc +++ b/lily/event.cc @@ -7,7 +7,6 @@ */ #include "event.hh" - #include "warn.hh" Moment diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index c08e897759..f053f441b4 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -6,6 +6,7 @@ (c) 2004 Han-Wen Nienhuys */ + #include "warn.hh" #include "open-type-font.hh" @@ -15,6 +16,9 @@ Open_type_font::make_otf (String str) Open_type_font * otf = new Open_type_font; int error_code = FT_New_Face( freetype2_library, str.to_str0(), 0, &(otf->face_)); + + // int code = FT_Set_Charmap (otf->face_, ); + if (error_code == FT_Err_Unknown_File_Format) { @@ -32,3 +36,33 @@ Open_type_font::~Open_type_font() { FT_Done_Face (face_); } + + +Box +Open_type_font::get_indexed_char (int signed_idx) +{ + FT_UInt idx = signed_idx; + int code = + FT_Load_Glyph (face_, + idx, + FT_LOAD_NO_SCALE); + + FT_Glyph_Metrics m = face->glyph->metrics; + Box b (Interval (0, m->width) - m->horiBearingX, + Interval (0, m->height) - m->horiBearingY); + + return b; +} + +int +Open_type_font::name_to_index (String nm) +{ + +} + + +Real +Open_type_font::get_design_size () const +{ + return 20.0; +}