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. */
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;
}
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
}
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 (),
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
}
#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