#include "gvplugin_device.h"
#include "gvio.h"
+#include "gvplugin_pango.h"
+
#ifdef HAVE_PANGOCAIRO
#include <pango/pangocairo.h>
#define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0]))
-/* FIXME - FONT_DPI also defined in gvtextlayout_pango.c - need shared header */
-#define FONT_DPI 96.
-
static double dashed[] = {6.};
static int dashed_len = ARRAY_SIZE(dashed);
#include <string.h>
#include "gvplugin_textlayout.h"
+#include "gvplugin_pango.h"
+
#ifdef HAVE_PANGOCAIRO
#include <pango/pangocairo.h>
#ifdef HAVE_PANGO_FC_FONT_LOCK_FACE
return buf;
}
-#define FONT_DPI 96.
-
#define ENABLE_PANGO_MARKUP
#ifdef ENABLE_PANGO_MARKUP
#define FULL_MARKUP "<span weight=\"bold\" style=\"italic\" underline=\"single\"></span>"
if (!context) {
fontmap = pango_cairo_font_map_get_default();
- pango_cairo_font_map_set_resolution(PANGO_CAIRO_FONT_MAP(fontmap),96.);
+ pango_cairo_font_map_set_resolution(PANGO_CAIRO_FONT_MAP(fontmap),FONT_DPI);
context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP(fontmap));
- pango_cairo_context_set_resolution(context,96.);
+ pango_cairo_context_set_resolution(context,FONT_DPI);
options=cairo_font_options_create();
cairo_font_options_set_antialias(options,CAIRO_ANTIALIAS_GRAY);
cairo_font_options_set_hint_style(options,CAIRO_HINT_STYLE_FULL);
fnt = fontname;
desc = pango_font_description_from_string(fnt);
- /* all text layout is done at a scale of 96ppi */
+ /* all text layout is done at a scale of FONT_DPI (nominaly 96.) */
pango_font_description_set_size (desc, (gint)(fontsize * PANGO_SCALE));
if (fontpath && (font = pango_font_map_load_font(fontmap, context, desc))) { /* -v support */