This is an early patch with the changes I've already made to adapt FOrayFont to Fop. Changes are mainly located in layoutmgr and pdf packages. This patch should not be applied: it is provided just in case committers want to see in the 3 next weeks what it looks like.
Created attachment 15830 [details] patch against source files Please don't care about changes in the classes of the layoutmgr.inline subpackage: I have overwritten them with older versions on which I worked before they were moved to the inline subpackage. Next time I'll try to apply my changes to the trunk version instead of overwriting them.
Created attachment 15831 [details] New files Newly created files: 2 java classes + the needed libraries from aXSL and FOray
Created attachment 17207 [details] Updated patch
Created attachment 17208 [details] New files New files required for FOrayFont; for convenience I've put them all in one jar archive to be extracted at the root of Fop. Contains: * some new source files * the needed jars of aXSL and FOray * a sample font-config file * the afm metrics files for the base14 fonts
FOrayFont gets the metrics of the base14 fonts directly from the afm files. Therefore it is required that a font config file be provided, either through the command-line or programmatically: o command-line: just use the -c switch to specify a fop config file in which a link the font-config file is given. See the sample fop.xconf o within a program: use the setFontCfgURL method of FOUserAgent A default font-config file is provided in the conf/ directory. To use it there are a few parameters to adjust to the user's settings: o fop.xconf: set the font-config-file element to the right value o fonts.xconf: the font-root should be the path to the user's own fonts; the base14-root parameter is the path to the afm files for the base14 fonts, that I've put in conf/base14fonts
Created attachment 18917 [details] Updated patch for the current trunks of Fop and FOrayFont This is an early patch updating the old one to the trunks of both Fop and FOray. This patch is completely broken! It is mainly provided so that Bertrand can start his work on the OpenType support, basing it on FOrayFont instead of the soon-to-be-removed current font library. Only the PDFRenderer is running (note that I didn't say working :-\ ). All of the other renderers, along with the SVG transcoders currently have compilation errors. So the ant build script cannot be used to create the binary, the compilation directory of Eclipse should rather be used instead. Currently there is a bug where digits are displayed instead of normal text with all fonts but truetype ones. I'm sure this is not a big bug but I haven't found it yet. I'll look at it ASAP. There are a few necessary steps to run the application: * A font-configuration file must be provided; currently its path is hardcoded in org.apache.fop.fo.FOEventHandler.java, line 163 (FOrayFontServer.setup(URL to the config file)) * A sample font-config file is provided with this patch; there are 3 paths to change to adapt it to another system: * the path to the dtd which is to be found in the aXSL codebase; * the xml:base attribute of the root element for access to custom fonts; * the base14-root key which should point to the directory of the FOray installation containing the metrics for the base14 fonts. Note that the ending slashes are important! The font families which may be used are the generic families (serif, sans-serif, monospace), or the names of the fonts configured in the aXSL font-config file. For example, in the provided sample file, there is a font-family entry for the Bitstream Charter font. Only the upright normal-weight variant has been configured, which may be accessed in an fo file like the following: <fo:block font-family="BitstreamCharter" font-style="normal" font-weight="normal"> Some text displayed with the Bitstream Charter Roman font... </fo:block> So the value of the "font-family" attribute in the fo file should match the value of the "name" attribute of the font-family element in the config file. The jar file contains additional files: two new source files, the jars for aXSL and FOrayFont (which contain a not yet reported bug fix, so don't use other binaries!), and a sample font-config file. Well, I think those informations should be enough to get started...
Created attachment 18918 [details] Additional files: new source files, FOrayFont binaries, font-config file
I have created a new "foray-font" branch to work on this
Some of the files in the patch have svn conflict markers in them, here's the list: $ find src -name *.java | xargs grep -l '<<<<<' src/java/org/apache/fop/render/java2d/Java2DGraphicsState.java src/java/org/apache/fop/render/java2d/Java2DRenderer.java src/java/org/apache/fop/render/ps/PSRenderer.java src/java/org/apache/fop/render/ps/PSTextPainter.java
(In reply to comment #9) > Some of the files in the patch have svn conflict markers in them, here's the list: > > $ find src -name *.java | xargs grep -l '<<<<<' > src/java/org/apache/fop/render/java2d/Java2DGraphicsState.java > src/java/org/apache/fop/render/java2d/Java2DRenderer.java > src/java/org/apache/fop/render/ps/PSRenderer.java > src/java/org/apache/fop/render/ps/PSTextPainter.java Yes, this is to remind me that I still have merging conflicts to resolve. Currently those marks just cause even more compilation errors...
I have committed the patch with minor changes to the hardcoded pathnames, to allow symbolic links to be used for them. See http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/foray-font/README-foray-font.txt for how to run this
vincent, should this bug remain open? is the proposed patch still needed?
The idea of merging FOrayFont to FOP has been abandoned.
batch transition resolved+wontfix to closed+wontfix
batch transition resolved+wontfix to closed+wontfix; if you believe this remains a bug and can demonstrate it with appropriate input FO file and output PDF file (as applicable), then you may reopen