Bug 35948 - pre-patch for FOrayFont adaptation to Fop
Summary: pre-patch for FOrayFont adaptation to Fop
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: All All
: P5 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 02:38 UTC by Vincent Hennebert
Modified: 2012-04-30 00:17 UTC (History)
0 users



Attachments
patch against source files (165.42 KB, patch)
2005-07-31 02:45 UTC, Vincent Hennebert
Details | Diff
New files (338.57 KB, application/java-archive)
2005-07-31 02:46 UTC, Vincent Hennebert
Details
Updated patch (233.22 KB, patch)
2005-12-12 22:37 UTC, Vincent Hennebert
Details | Diff
New files (492.13 KB, application/java-archive)
2005-12-12 22:41 UTC, Vincent Hennebert
Details
Updated patch for the current trunks of Fop and FOrayFont (225.34 KB, patch)
2006-09-26 13:56 UTC, Vincent Hennebert
Details | Diff
Additional files: new source files, FOrayFont binaries, font-config file (624.21 KB, application/x-jar)
2006-09-26 13:58 UTC, Vincent Hennebert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hennebert 2005-07-31 02:38:25 UTC
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.
Comment 1 Vincent Hennebert 2005-07-31 02:45:03 UTC
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.
Comment 2 Vincent Hennebert 2005-07-31 02:46:32 UTC
Created attachment 15831 [details]
New files

Newly created files: 2 java classes + the needed libraries from aXSL and FOray
Comment 3 Vincent Hennebert 2005-12-12 22:37:54 UTC
Created attachment 17207 [details]
Updated patch
Comment 4 Vincent Hennebert 2005-12-12 22:41:53 UTC
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
Comment 5 Vincent Hennebert 2005-12-12 22:43:05 UTC
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
Comment 6 Vincent Hennebert 2006-09-26 13:56:17 UTC
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...
Comment 7 Vincent Hennebert 2006-09-26 13:58:46 UTC
Created attachment 18918 [details]
Additional files: new source files, FOrayFont binaries, font-config file
Comment 8 Bertrand Delacretaz 2006-09-26 15:02:58 UTC
I have created a new "foray-font" branch to work on this
Comment 9 Bertrand Delacretaz 2006-09-26 15:19:57 UTC
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
Comment 10 Vincent Hennebert 2006-09-26 15:56:59 UTC
(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...
Comment 11 Bertrand Delacretaz 2006-09-27 15:29:49 UTC
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
Comment 12 Glenn Adams 2012-04-03 20:58:26 UTC
vincent, should this bug remain open? is the proposed patch still needed?
Comment 13 Vincent Hennebert 2012-04-04 09:22:30 UTC
The idea of merging FOrayFont to FOP has been abandoned.
Comment 14 Glenn Adams 2012-04-30 00:14:54 UTC
batch transition resolved+wontfix to closed+wontfix
Comment 15 Glenn Adams 2012-04-30 00:17:22 UTC
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