From: Charles B. <cbo...@hi...> - 2003-03-02 03:42:22
|
I had intended the to go to the list instead of Tony personally. -- Charles Bozeman <cbo...@hi...> |
From: Tony G. <Ton...@Su...> - 2003-03-03 17:05:28
|
Charles Bozeman wrote at 1 Mar 2003 21:42:47 -0600: > I had intended the to go to the list instead of Tony personally. SourceForge policy is against Reply-To: munging. I prefer Reply-To: munging for mailing lists (but don't want to start discussing it further here), but it's best if this list behaves like the other SourceForge lists. ... > Sorry took so long to reply. I filed a bug with an attached patch to add > the include path to pich up libxml2. I still haven't been able to get What version of libxslt are you using? For libxslt-1.0.17, 'xslt-config --cflags' includes '-I/usr/local/include/libxml2', which is why builing xmlroff works for me. > xmlroff to work yet; my suspicion is it has something to do with > freetype or fontconfig. It appears that fontconfig and PDFlib aren't agreeing on what constitutes a font. > The command I was trying to run is: > ./xmlroff xmlroff.fo That should work. > I also tried changed the font-family to other values but I still get the > same error. Did you try reducing xmlroff.fo so there's only one fo:block and experimenting with the font-family, font-weight, and font-style properties. While you're using an FO file with multiple font-family, etc., it's hard to tell which one is causing a problem. > I am just going to have to run gdb to try and find the problem. Break on PDF_findfont() to see what font names are being passed to PDFlib. > Let me know if you have any ideas. What does the 'fc-list' command show? 'fc-list' lists all the fonts that the fontconfig library knows about, although I don't find its output tells you all that much. 'xmlroff -d2 xmlroff.fo' or 'xmlroff -d8 xmlroff.fo' will give you a lot of information, but will still only show the font-family names used in the xmlroff.fo file. Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |
From: Charles B. <cbo...@hi...> - 2003-03-04 02:28:12
|
On Mon, 2003-03-03 at 11:05, Tony Graham wrote: > What version of libxslt are you using? For libxslt-1.0.17, > 'xslt-config --cflags' includes '-I/usr/local/include/libxml2', which > is why builing xmlroff works for me. > I'm using the latest CVS version. 'xslt-config --cflags' works fine. My problem is that the include path (/usr/include/libxml2 for me) is not passed to the compiler. For example, the area/Makefile.am has this include statement: INCLUDES = \ -DG_LOG_DOMAIN=\"libfo\" \ $(GOBJECT_CFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/fo \ -I$(top_srcdir)/property \ -I$(top_srcdir)/datatype After the automake/configure process the resulting area/Makefile has the compile lines: COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) The LIBXML_CFLAGS and LIBXSLT_CFLAGS variables in the Makefile are correct but they don't get to the compile commands. Here is a partial output from compiling xmlroff-0.2.1: make[2]: Entering directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1/area'source='fo-area.c' object='fo-area.lo' libtool=yes \ depfile='.deps/fo-area.Plo' tmpdepfile='.deps/fo-area.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"libfo\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -I../fo -I../property -I../datatype -g -O2 -I/usr/local/include/pangopdf/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -I/usr/include/freetype2 -Wall -c -o fo-area.lo `test -f 'fo-area.c' || echo './'`fo-area.c rm -f .libs/fo-area.lo gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"libfo\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -I../fo -I../property -I../datatype -g -O2 -I/usr/local/include/pangopdf/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -I/usr/include/freetype2 -Wall -c fo-area.c -MT fo-area.lo -MD -MP -MF .deps/fo-area.TPlo -fPIC -DPIC -o fo-area.o cc1: warning: changing search order for system directory "/usr/local/include" cc1: warning: as it has already been specified as a non-system directory In file included from fo-area.h:21, from fo-area.c:13: ../fo/fo-fo.h:19:25: libxml/tree.h: No such file or directory In file included from fo-area.h:21, from fo-area.c:13: ../fo/fo-fo.h:80: parse error before "xmlNodePtr" ../fo/fo-fo.h:81: parse error before "fo_fo_get_element" ../fo/fo-fo.h:81: warning: type defaults to `int' in declaration of `fo_fo_get_element' ../fo/fo-fo.h:81: warning: data definition has no type or storage class In file included from fo-area.c:35: ../fo/fo-fo-private.h:25: parse error before "xmlNodePtr" ../fo/fo-fo-private.h:25: warning: no semicolon at end of struct or union ../fo/fo-fo-private.h:32: parse error before '}' token fo-area.c: In function `fo_area_update_after_clone_default': fo-area.c:1183: dereferencing pointer to incomplete type fo-area.c:1184: dereferencing pointer to incomplete type fo-area.c:1186: dereferencing pointer to incomplete type make[2]: *** [fo-area.lo] Error 1 make[2]: Leaving directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1/area' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1' make: *** [all] Error 2 As you can see from the error, the libxml2 include path does not get to the compiler. If I add $(LIBXML_CFLAGS) to the INCLUDE makefile variable then the compile works. From your email I see I should be using LIBXSLT_CFLAGS but the result is the same. Maybe I'm missing something but I don't see it. Charlie B. |
From: Tony G. <Ton...@Su...> - 2003-03-04 22:23:12
|
Charles Bozeman wrote at 3 Mar 2003 20:28:43 -0600: > As you can see from the error, the libxml2 include path does not get to the > compiler. If I add $(LIBXML_CFLAGS) to the INCLUDE makefile variable then > the compile works. From your email I see I should be using LIBXSLT_CFLAGS > but the result is the same. > Maybe I'm missing something but I don't see it. I think it's gcc saving me from myself. I will add the missing $(LIBXSLT_CFLAGS) entries. I plan to eventually not have every module dependent on libxml2. Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |
From: Charles B. <cbo...@hi...> - 2003-03-04 03:28:30
|
On Mon, 2003-03-03 at 11:05, Tony Graham wrote: > > It appears that fontconfig and PDFlib aren't agreeing on what > constitutes a font. > > > The command I was trying to run is: > > ./xmlroff xmlroff.fo > > That should work. > > > I also tried changed the font-family to other values but I still get the > > same error. > > Did you try reducing xmlroff.fo so there's only one fo:block and > experimenting with the font-family, font-weight, and font-style > properties. While you're using an FO file with multiple font-family, > etc., it's hard to tell which one is causing a problem. > > > I am just going to have to run gdb to try and find the problem. > > Break on PDF_findfont() to see what font names are being passed to > PDFlib. > > > Let me know if you have any ideas. > > What does the 'fc-list' command show? 'fc-list' lists all the fonts > that the fontconfig library knows about, although I don't find its > output tells you all that much. > > 'xmlroff -d2 xmlroff.fo' or 'xmlroff -d8 xmlroff.fo' will give you a > lot of information, but will still only show the font-family names > used in the xmlroff.fo file. > Thanks for the hints. I found my problem is that some of my font files (type1 pfa files) use '\r' instead of '\n' to end lines which caused PDFlib to read (via fgets) too much data and process the font data wrong. I've finally gotten the test file to work so maybe now I can be somewhat productive. I just wish I had more time to spend on this project, because I believe it is really important for xml processing to progress. -- Charles Bozeman <cbo...@hi...> |
From: Tony G. <Ton...@Su...> - 2003-03-04 22:18:20
|
Charles Bozeman wrote at 3 Mar 2003 21:29:00 -0600: ... > Thanks for the hints. I found my problem is that some of my font files > (type1 pfa files) use '\r' instead of '\n' to end lines which caused > PDFlib to read (via fgets) too much data and process the font data That sounds like a PDFlib bug, but it could be argued that it's a problem with your file on a Unix system. > wrong. I've finally gotten the test file to work so maybe now I can be > somewhat productive. I just wish I had more time to spend on this > project, because I believe it is really important for xml processing to > progress. Thank you. I, too, would like to see XML processing -- in this context, XSL formatting -- progress. In fairness, xmlroff is not the only option, but right now it is the open-source option most in need of help. xmlroff does have more going for it than its need for help. AFAIK, it's the only open-source formatter written in C, and I believe that it is the formatter that places the highest priority on i18n. (Although I still haven't managed to get Thai or Arabic through PDFlib even though Pango can rasterize them nicely with its FT2 backend). Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |