]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pangofc-afm-decoder.cc
(move_away_from_staffline): new function.
[lilypond.git] / lily / pangofc-afm-decoder.cc
index 92545bde619870264c1c4a8f3d0de2ecd3ff5d8b..5d0fca87a96f2f02e7eef06dd6612940ea16c724 100644 (file)
@@ -23,7 +23,7 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 
-#include "config.h"
+#include "config.hh"
 #if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
 
 /* Need to access to PangoFcFont.full_pattern.  */
@@ -56,9 +56,12 @@ static void pango_fc_afm_decoder_init (PangoFcAfmDecoder *fontmap);
 static void pango_fc_afm_decoder_class_init (PangoFcAfmDecoderClass *clss);
 static void pango_fc_afm_decoder_finalize (GObject *object);
 
-static FcCharSet *pango_fc_afm_get_charset (PangoFcFont *fcfont);
-static PangoGlyph pango_fc_afm_get_glyph (PangoFcFont *fcfont, guint32 wc);
-static void pango_fc_afm_decoder_set_file_name (PangoFcAfmDecoder *self, char const *file_name);
+static FcCharSet *pango_fc_afm_get_charset (PangoFcDecoder *decoder,
+                                           PangoFcFont *fcfont);
+static PangoGlyph pango_fc_afm_get_glyph (PangoFcDecoder *decoder,
+                                         PangoFcFont *fcfont, guint32 wc);
+static void pango_fc_afm_decoder_set_file_name (PangoFcAfmDecoder *self,
+                                               char const *file_name);
 
 static PangoFcDecoderClass *parent_class;
 
@@ -136,8 +139,9 @@ pango_fc_afm_decoder_finalize (GObject *object)
 }
 
 static FcCharSet *
-pango_fc_afm_get_charset (PangoFcFont *fcfont)
+pango_fc_afm_get_charset (PangoFcDecoder *decoder, PangoFcFont *fcfont)
 {
+  (void) decoder;
   //dprintf ("get charset: %s\n", fcfont->font_pattern);
   dprintf ("get charset: \n");
 #if 0  
@@ -161,8 +165,10 @@ pango_fc_afm_get_charset (PangoFcFont *fcfont)
 }
 
 static PangoGlyph
-pango_fc_afm_get_glyph (PangoFcFont *fcfont, guint32 wc)
+pango_fc_afm_get_glyph (PangoFcDecoder *decoder, PangoFcFont *fcfont,
+                       guint32 wc)
 {
+  (void) decoder;
 #if 0
   XftFont *xft_font;
   xft_font = XftFontOpenPattern (GDK_DISPLAY (),
@@ -170,13 +176,16 @@ pango_fc_afm_get_glyph (PangoFcFont *fcfont, guint32 wc)
   PangoGlyph g = XftCharIndex (0, xft_font, wc);
   dprintf ("get glyph! 0x%x --> 0x%x\n", wc, (unsigned)g);
 #else
+  (void) fcfont;
   /* TODO:
        - PUA mapping?
        
      Shortcut PUA mapping/AFM reading: The Feta charsets are encoded
-     without any gaps, starting at 0x21.  *grin*  */
-  (void) fcfont;
-  return wc - 0x21;
+     without any gaps, starting at 0x21.  *grin*
+
+     FIXME: +1 what has changed? -- jcn
+  */
+  return wc - 0x21 + 1;
 #endif  
 }
 
@@ -234,7 +243,7 @@ pango_fc_afm_add_decoder (char const *family_name)
 #include <pango/pangox.h>
 #include <pango/pangoxft.h>
 
-#include "pangofc-afm-decoder.h"
+#include "pangofc-afm-decoder.hh"
 
 #define CANVAS_WIDTH 600
 #define CANVAS_HEIGHT 300