[cairo-commit] xpdf-cairo/xpdf CairoFontEngine.cc, 1.1,
1.2 CairoFontEngine.h, 1.1, 1.2 CairoOutputDev.cc, 1.2,
1.3 CairoOutputDev.h, 1.1, 1.2 CairoOutputDevX.cc, 1.1,
1.2 Makefile.in, 1.2, 1.3
Alexander Larsson
commit at pdx.freedesktop.org
Wed Jan 26 05:57:07 PST 2005
Committed by: alexl
Update of /cvs/cairo/xpdf-cairo/xpdf
In directory gabe:/tmp/cvs-serv7170/xpdf
Modified Files:
CairoFontEngine.cc CairoFontEngine.h CairoOutputDev.cc
CairoOutputDev.h CairoOutputDevX.cc Makefile.in
Log Message:
2005-01-26 Alexander Larsson <alexl at redhat.com>
* xpdf/CairoFontEngine.cc:
* xpdf/CairoFontEngine.h:
* xpdf/CairoOutputDev.cc:
* xpdf/CairoOutputDev.h:
* xpdf/CairoOutputDevX.cc:
Update to latest version of cairo
* xpdf/Makefile.in:
Rename binary to xpdf-cairo
Index: CairoFontEngine.cc
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoFontEngine.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoFontEngine.cc 10 Jan 2005 08:50:14 -0000 1.1
+++ CairoFontEngine.cc 26 Jan 2005 13:57:05 -0000 1.2
@@ -231,9 +231,6 @@
unlink (fileName->getCString());
}
- if (face)
- cairo_font = cairo_ft_font_create_for_ft_face (face);
-
return;
err2:
/* hmm? */
@@ -241,6 +238,10 @@
}
CairoFont::~CairoFont() {
+ /* TODO: Free the face!
+ * How do we know when we can do this?
+ * It might be referenced by a cairo cache
+ */
}
GBool
@@ -250,8 +251,8 @@
}
cairo_font_t *
-CairoFont::getFont(void) {
- return cairo_font;
+CairoFont::getFont(cairo_matrix_t *font_scale) {
+ return cairo_ft_font_create_for_ft_face (face, FT_LOAD_DEFAULT, font_scale);
}
unsigned long
Index: CairoFontEngine.h
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoFontEngine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoFontEngine.h 10 Jan 2005 08:50:14 -0000 1.1
+++ CairoFontEngine.h 26 Jan 2005 13:57:05 -0000 1.2
@@ -14,7 +14,7 @@
#endif
#include "gtypes.h"
-#include <cairo.h>
+#include <cairo-ft.h>
#include "GfxFont.h"
@@ -24,7 +24,7 @@
~CairoFont();
GBool matches(Ref &other);
- cairo_font_t *getFont(void);
+ cairo_font_t *getFont(cairo_matrix_t *font_scale);
unsigned long getGlyph(CharCode code,
Unicode *u, int uLen);
double getSubstitutionCorrection(GfxFont *gfxFont);
Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoOutputDev.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CairoOutputDev.cc 10 Jan 2005 09:34:59 -0000 1.2
+++ CairoOutputDev.cc 26 Jan 2005 13:57:05 -0000 1.3
@@ -207,10 +207,6 @@
currentFont = fontEngine->getFont (state->getFont(), xref);
- font = currentFont->getFont();
- if (font)
- cairo_set_font (cairo, font);
-
double m11, m12, m21, m22;
state->getFontTransMat(&m11, &m12, &m21, &m22);
@@ -226,8 +222,10 @@
m11, m21,
-m12*w, -m22*w,
0, 0);
-
- cairo_transform_font (cairo, matrix);
+
+ font = currentFont->getFont(matrix);
+ if (font)
+ cairo_set_font (cairo, font);
cairo_matrix_destroy (matrix);
}
Index: CairoOutputDev.h
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoOutputDev.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoOutputDev.h 10 Jan 2005 08:50:14 -0000 1.1
+++ CairoOutputDev.h 26 Jan 2005 13:57:05 -0000 1.2
@@ -17,7 +17,7 @@
#endif
#include "gtypes.h"
-#include "cairo.h"
+#include <cairo/cairo-ft.h>
#include "config.h"
#include "OutputDev.h"
#include "GfxState.h"
Index: CairoOutputDevX.cc
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoOutputDevX.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoOutputDevX.cc 10 Jan 2005 08:50:14 -0000 1.1
+++ CairoOutputDevX.cc 26 Jan 2005 13:57:05 -0000 1.2
@@ -16,6 +16,7 @@
#include <string.h>
#include <math.h>
#include <cairo.h>
+#include <cairo/cairo-xlib.h>
#include "gfile.h"
#include "GlobalParams.h"
Index: Makefile.in
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.in 10 Jan 2005 08:50:14 -0000 1.2
+++ Makefile.in 26 Jan 2005 13:57:05 -0000 1.3
@@ -107,7 +107,7 @@
#------------------------------------------------------------------------
-all: xpdf$(EXE) pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) \
+all: xpdf-cairo$(EXE) pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) \
pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE)
all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \
@@ -128,8 +128,8 @@
XPDF_LIBS = -L$(GOOLIBDIR) -lGoo $(SPLASHLIBS) $(T1LIBS) $(FTLIBS) $(CAIROLIBS) \
$(XLIBS) $(OTHERLIBS) -lm
-xpdf$(EXE): $(XPDF_OBJS) $(GOOLIBDIR)/$(LIBPREFIX)Goo.a
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xpdf$(EXE) $(XPDF_OBJS) $(XPDF_LIBS)
+xpdf-cairo$(EXE): $(XPDF_OBJS) $(GOOLIBDIR)/$(LIBPREFIX)Goo.a
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xpdf-cairo$(EXE) $(XPDF_OBJS) $(XPDF_LIBS)
#------------------------------------------------------------------------
More information about the cairo-commit
mailing list