]> git.donarmstrong.com Git - lilypond.git/commitdiff
new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 11 Dec 2004 13:27:28 +0000 (13:27 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 11 Dec 2004 13:27:28 +0000 (13:27 +0000)
lily/break-algorithm.cc
lily/event.cc
lily/open-type-font.cc

index 50064dad46755de966d06a101dab404bcc2b608a..120a55969e94ef181d112ba33f22cd1e937826ce 100644 (file)
@@ -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<int>
 Break_algorithm::find_break_indices () const
 {
@@ -35,7 +33,6 @@ Break_algorithm::find_break_indices () const
   return retval;
 }
 
-
 Link_array<Grob>
 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<Grob> const &curline,
                                           Interval line) const
index de42836dcf4a8e598b53c0ff075a96a5d4abdfc7..e79f39eafcf9d511068d246eda3362a92bd76c30 100644 (file)
@@ -7,7 +7,6 @@
 */
 
 #include "event.hh"
-
 #include "warn.hh"
 
 Moment
index c08e8977597dfb24ead3b470fcf3d230b450298f..f053f441b42e9afd7cbd8916d3c384b744e63190 100644 (file)
@@ -6,6 +6,7 @@
   (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 */
+
 #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;
+}