RE: Background information about using unicode characters

2002-11-27 Thread Tore Engvig


[EMAIL PROTECTED] wrote:

 Hi,

 I'm using fop 0.20.4 with jdk 1.4 and would like to get some background
 information about how fop embedds unicode character from a true
 type font which
 is not one of the 14 PDF Standard Fonts. I used Arial Unicode Ms.ttf to
 embed some asien characters into an pdf document. Based on the
 information from
 the fop homepage I assume that only the needed character, its
 encoding and the
 glyph is embedded into the pdf file to enable the Acrobat Reader to render
 the character correctly.  Is that correct, or are more
 information embedded
 like the whole codepage in which the charater is in? Or which
 information are
 exactly embedded into the pdf file?

For TrueType fonts, only the glyphs used are embedded. When you embed a
truetype font, a new font containing only the glyphs used are created from
the original font and embedded in the pdf document. The embedded font
contains only the minimum needed to be embedded in a pdf document (i.e no
codepage information). The PDF document will then contain indexes to the
glyphs in the font instead of characters using an encoding.

This has the drawback that searching or cut'n' paste fra the PDF document
won't work (e.g. see bug #5335). To fix this, a ToUnicode mapping should be
created such that the characters in the PDF document are unicode (UTF-16
encoded) and a mapping between unicode and glyph index is embedded with the
font. The reason why this wasn't implemented to begin with was that it
wasn't documented very well in the PDF spec. Experimenting with different
settings was hard (development on a slow computer implied a very long and
frustrating round-trip)  and error messages from Acrobat reader wasn't very
cooperative :)
Since then Adobe has published a tutorial and howto for creating ToUnicode
maps:
http://partners.adobe.com/asn/developer/pdfs/tn/5411.ToUnicode.pdf
So it should be easier to create now.

This behavior can be avoided if the -ansi option is included when generating
metrics with TTFReader. If you do, the whole font will be embedded in the
pdf document and characters will be ansi encoded (so, you loose the
possibility to use non-ansi characters) - or more correctly: WinAnsi encoded
as specified in the PDF spec.

For PostScript fonts the behavior is different. If you embed a postscript
font, the whole font is always embedded.

 Can I rely on the assumption that the
 pdf file with the embedded font will be displayed correctly
 independingly on
 the
 operating system and the available fonts on which ever computer
 the pdf file
 is trying to be viewed?

Yes. To achieve this, the fontname is scrambled. A prefix is inserted to
make sure that the fontname won't match the fontname of an installed font.
Acrobat reader used to prefer installed fonts rather than embedded fonts
which could cause problems if the user had installed different versions of
the embedded fonts (e.g. fonts which don't have some characters used in the
pdf document, or simply looks different). Acrobat Reader 5.0 has the option
to select whether system installed fonts or document embedded fonts should
be used, so this prefix thing can be removed. However, it's not a huge gain
to remove it. The only case where you gain something is if you merge a lot
of pdf documents that embed the same font. Then Acrobat (fullversion only)
can merge the fonts so you don't embed the same font twice in the same
document.

 Is it possible to create a PDF file with FOP which just describes a
 character by its unicode representation and the corresponding
 glyph to display the
 character is loaded from one of the available fonts from the
 computer where the
 pdf file is viewed? That would be an interesting an valueable feature
 instead of embedding the font file.

You don't have to embed the font. I'm not sure how well this is supported,
but I think that if you use any other encoding than ansi, you're screwed
(because of the lack of ToUnicode maps).

You most probably want to embed the fonts anyway. Real life example
(happened this year): I was generating reports for a huge organization. All
the computers in that organization were supposed to be equal - maintenance
was centralized and all computers were automatically upgraded (and users
were not permitted to install anything). Much effort was spent to have all
computers be equal. No matter the effort, there was 2 different versions of
the Arial font installed on different computers. The newest Arial version
had more glyphs, and most important: The glyphs was bigger! That totally
ruined the reports causing page-breaks where there shouldn't be any,
overflow, etc.

Moral is: always embed the fonts :)


Tore


 Thanks a lot for any information to clarify understanding!

 Markus



 --
 +++ GMX - Mail, Messaging  more  http://www.gmx.net +++
 NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED

RE: [Vote] New committers: Peter West, Joerg Pietschmann?

2002-04-12 Thread Tore Engvig



 -Original Message-
 From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 11, 2002 12:16
 To: [EMAIL PROTECTED]
 Subject: [Vote] New committers: Peter West, Joerg Pietschmann?
 
 
 
 I propose that we offer Peter West and Joerg Pietschmann to become
 committers.

+1 for both.


Tore


 
 Peter has of course shown lots of commitment of the last year+.
 Joerg is helping a lot with user questions FAQ etc.
 
 If they accept then I am sure it will help with the valuable work 
 they are 
 contributing to FOP.
 
 Needless to say I am +1 for both.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Embbeding external user fonts ( like Arial )

2002-02-18 Thread Tore Engvig


[SNIP]

 while processing the site there was an error. a font has a wrong value for
 CMap/Encoding.

 anybody knows why this error appears in acrobat reader ?

This is most probably because of a bug i Acrobat reader 4.0. This bug is
fixed in Acrobat 4.05a (or 4.05c). If I remember correctly, a workaround for
the bug is added to recent (.20.1 or 0.20.2) versions of Fop.


Tore



 Nick Winger

 (Software-Developer)
 ==
 VANGUARD Software GmbH
 Julius Tandler Platz 8
 1090 Vienna, AUSTRIA

 Phone: +43-1-3195263-20
 Fax:   +43-1-3195263-90
 http://www.vanguard.at
 ==



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Euro sign

2002-01-18 Thread Tore Engvig

 Why do I see a bullet instead of a euro sign (EUR), when I simply
 compile the fonts.fo file found in the Fop-0.20-2 distribution
 (./docs/examples/fo)?

 I am on Windows NT 2000 Professional, all my standard fonts have thus a
 euro sign (me thinks).

If you use embedded fonts, this should not be a problem (unicode value is
looked up in cmap), if you use the standard fonts (Helvetica, Times, etc)
this might be a problem.

If I remember correctly, a patch was submitted that added the euro sign to
the standard fonts. It exists in the cvs version (in the fop-0.20.2-maintain
branch).

Tore


 PDF available.

 Patrick Andries



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: PostScript in pdf

2002-01-14 Thread Tore Engvig

 Hi
 Is it possible to insert
 postscript commands to pdf created from Fop?

Not really, but I think I might have a workaround.

In the cvs version (the fop0.20.2 maintain version), it's possible to insert
eps images. The eps image is passed as is to postscript printers (thus eps
only works when printing to postscript printers and won't show when viewing
with Acrobat).

I guess you could create some postscript code with the proper DSC comments
(%%BoundingBox) and no drawing instructions.
If you add that image first thing in your documents headers, the image could
contain the instructions to change tray.


Tore


 I use Fop to create document which is printed from 2 trays.
 Each of page should contains information about tray from which
 will be printed.
 With Best Regards

 Dariusz Grabowski

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: [PATCH] update test dir to REC syntax (maintenance branch)

2001-12-10 Thread Tore Engvig



Christian Geisert wrote:

 Doh, forgot the attachment...

Ok, it's added to the maintain branch now.

Tore

 
 this patch updates the 'test' dir to REC syntax.
 (just changed master-name to master-reference on page-sequences)
 
 I had some problems with strange line endings but I hope it is ok now.
 
 Christian
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/layout LineArea.java

2001-12-09 Thread tore

tore01/12/09 09:17:10

  Modified:lib  Tag: fop-0_20_2-maintain batik.jar
   .Tag: fop-0_20_2-maintain CHANGES
   src/codegen Tag: fop-0_20_2-maintain Courier-Bold.xml
Courier-BoldOblique.xml Courier-Oblique.xml
Courier.xml Helvetica-Bold.xml
Helvetica-BoldOblique.xml Helvetica-Oblique.xml
Helvetica.xml Times-Bold.xml Times-BoldItalic.xml
Times-Italic.xml Times-Roman.xml
   src/org/apache/fop/layout Tag: fop-0_20_2-maintain
LineArea.java
  Log:
  Submitted by: Rainer Garus [EMAIL PROTECTED]
  
  Added correct metrics for euro sign in standard fonts
  Fix problem with computing remaining with in LineArea where start-indent  0
  
  Upgraded batik.jar to batik1.1
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.5.2.2   +6759 -8935xml-fop/lib/batik.jar
  
Binary file
  
  
  No   revision
  
  
  No   revision
  
  
  1.10.2.4  +6 -0  xml-fop/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/xml-fop/CHANGES,v
  retrieving revision 1.10.2.3
  retrieving revision 1.10.2.4
  diff -u -r1.10.2.3 -r1.10.2.4
  --- CHANGES   2001/12/06 21:28:18 1.10.2.3
  +++ CHANGES   2001/12/09 17:17:09 1.10.2.4
  @@ -1,6 +1,12 @@
   ==
   Done since 0.20.2 release
   *** General
  +- Added correct metrics for euro sign i standard fonts
  +  (bug 2105 and bug 4654)
  +  Submitted by: Rainer Garus [EMAIL PROTECTED]
  +- Fix problem with computing remaining with i LineArea where start-indent  0
  +  (bug 4839)
  +  Submitted by: Rainer Garus [EMAIL PROTECTED]
   - Support for CMYK and embedded ICC profiles in jpeg images (Tore Engvig)
   - Support for jpeg images in PS Renderer (Tore Engvig)
   - Add support for EPS images in PostScript renderer and limited EPS support in 
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.3.4.1   +1 -0  xml-fop/src/codegen/Courier-Bold.xml
  
  Index: Courier-Bold.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/Courier-Bold.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- Courier-Bold.xml  2000/11/02 12:48:07 1.3
  +++ Courier-Bold.xml  2001/12/09 17:17:09 1.3.4.1
  @@ -28,6 +28,7 @@
 char name=Edieresis width=600/
 char name=Egrave width=600/
 char name=Eth width=600/
  +  char name=Euro width=600/
 char name=F width=600/
 char name=G width=600/
 char name=Gcaron width=600/
  
  
  
  1.3.4.1   +1 -0  xml-fop/src/codegen/Courier-BoldOblique.xml
  
  Index: Courier-BoldOblique.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/Courier-BoldOblique.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- Courier-BoldOblique.xml   2000/11/02 12:48:07 1.3
  +++ Courier-BoldOblique.xml   2001/12/09 17:17:09 1.3.4.1
  @@ -28,6 +28,7 @@
 char name=Edieresis width=600/
 char name=Egrave width=600/
 char name=Eth width=600/
  +  char name=Euro width=600/
 char name=F width=600/
 char name=G width=600/
 char name=Gcaron width=600/
  
  
  
  1.3.4.1   +1 -0  xml-fop/src/codegen/Courier-Oblique.xml
  
  Index: Courier-Oblique.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/Courier-Oblique.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- Courier-Oblique.xml   2000/11/02 12:48:08 1.3
  +++ Courier-Oblique.xml   2001/12/09 17:17:09 1.3.4.1
  @@ -28,6 +28,7 @@
 char name=Edieresis width=600/
 char name=Egrave width=600/
 char name=Eth width=600/
  +  char name=Euro width=600/
 char name=F width=600/
 char name=G width=600/
 char name=Gcaron width=600/
  
  
  
  1.3.4.1   +1 -0  xml-fop/src/codegen/Courier.xml
  
  Index: Courier.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/Courier.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- Courier.xml   2000/11/02 12:48:08 1.3
  +++ Courier.xml   2001/12/09 17:17:09 1.3.4.1
  @@ -28,6 +28,7 @@
 char name=Edieresis width=600/
 char name=Egrave width=600/
 char name=Eth width=600/
  +  char name=Euro width=600/
 char name=F width=600/
 char name=G width=600/
 char name=Gcaron

cvs commit: xml-fop CHANGES

2001-12-09 Thread tore

tore01/12/09 09:18:04

  Modified:.Tag: fop-0_20_2-maintain CHANGES
  Log:
  Fixed typos
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.5  +2 -2  xml-fop/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/xml-fop/CHANGES,v
  retrieving revision 1.10.2.4
  retrieving revision 1.10.2.5
  diff -u -r1.10.2.4 -r1.10.2.5
  --- CHANGES   2001/12/09 17:17:09 1.10.2.4
  +++ CHANGES   2001/12/09 17:18:04 1.10.2.5
  @@ -1,10 +1,10 @@
   ==
   Done since 0.20.2 release
   *** General
  -- Added correct metrics for euro sign i standard fonts
  +- Added correct metrics for euro sign in standard fonts
 (bug 2105 and bug 4654)
 Submitted by: Rainer Garus [EMAIL PROTECTED]
  -- Fix problem with computing remaining with i LineArea where start-indent  0
  +- Fixed problem with computing remaining with in LineArea where start-indent  0
 (bug 4839)
 Submitted by: Rainer Garus [EMAIL PROTECTED]
   - Support for CMYK and embedded ICC profiles in jpeg images (Tore Engvig)
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/layout LineArea.java

2001-12-06 Thread tore

tore01/12/06 13:28:22

  Modified:.Tag: fop-0_20_2-maintain CHANGES
   docs/examples/advanced Tag: fop-0_20_2-maintain cid-fonts.fo
giro.fo
   docs/examples/fo Tag: fop-0_20_2-maintain border.fo
bordershorthand.fo character.fo corresprop.fo
extensive.fo fonts.fo hyphen.fo images.fo
inhprop.fo instream.fo leader.fo link.fo list.fo
newlinktest.fo normal.fo normalex.fo pdfoutline.fo
readme.fo simple.fo table.fo tableunits.fo
textdeko.fo
   docs/examples/footnotes Tag: fop-0_20_2-maintain columns.fo
simple.fo
   docs/examples/keeps_and_breaks Tag: fop-0_20_2-maintain
columnlevel1.fo pagelevel1.fo pagelevel2.fo
pagelevel3.fo pagelevel4.fo
   docs/examples/markers Tag: fop-0_20_2-maintain glossary.xsl
hide.fo
   docs/examples/pagination Tag: fop-0_20_2-maintain
allregions.fo basic1.fo basic2.fo
franklin_2pageseqs.fo franklin_alt.fo
franklin_rep.fo franklin_rep_max_repeats.fo
franklin_rep_max_repeats_expl.fo
franklin_rep_max_repeats_nl.fo
   docs/examples/region_body Tag: fop-0_20_2-maintain
simplecol.fo simplecol2.fo simplecol3.fo
simplecol4.fo
   docs/examples/svg Tag: fop-0_20_2-maintain embedding.fo
external.fo
   docs/examples/tables Tag: fop-0_20_2-maintain background.fo
borders.fo break.fo headfoot.fo keep.fo omit.fo
space.fo widowsorphans.fo
   src/codegen Tag: fop-0_20_2-maintain foproperties.xml
   src/org/apache/fop/fo/expr Tag: fop-0_20_2-maintain
PropertyParser.java
   src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain
Block.java
   src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain
ConditionalPageMasterReference.java
PageMasterReference.java PageSequence.java
   src/org/apache/fop/layout Tag: fop-0_20_2-maintain
LineArea.java
  Log:
  Submitted by: Christian Geisert [[EMAIL PROTECTED]]
  
  Changed master-name to master-reference on fo:page-sequence,
  fo:single-page-master-reference, fo:repeatable-page-master-reference and
  fo:conditional-page-master-reference to comply with the latest XSL recommendation.
  Also changed the unimplemented property space-treatment to white-space-treatment and
  updated examples to use the new syntax.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.3  +6 -0  xml-fop/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/xml-fop/CHANGES,v
  retrieving revision 1.10.2.2
  retrieving revision 1.10.2.3
  diff -u -r1.10.2.2 -r1.10.2.3
  --- CHANGES   2001/12/04 06:49:32 1.10.2.2
  +++ CHANGES   2001/12/06 21:28:18 1.10.2.3
  @@ -27,6 +27,12 @@
   remaining for content. (Karen Lease)
   
   *** Properties
  +- Changed master-name to master-reference on fo:page-sequence, 
  +  fo:single-page-master-reference, fo:repeatable-page-master-reference and 
  +  fo:conditional-page-master-reference to comply with the latest XSL recommendation.
  +  Also changed the unimplemented property space-treatment to white-space-treatment 
and 
  +  updated examples to use the new syntax.
  +  Submitted by: Christian Geisert [[EMAIL PROTECTED]]
   - Add support for inline-progression-dimension and table-layout. (Karen)
   - Add support for letter-spacing.
 Submitted by: Raymond Penners [EMAIL PROTECTED]
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.2.2.1   +1 -1  xml-fop/docs/examples/advanced/cid-fonts.fo
  
  Index: cid-fonts.fo
  ===
  RCS file: /home/cvs/xml-fop/docs/examples/advanced/cid-fonts.fo,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- cid-fonts.fo  2001/05/18 09:55:46 1.2
  +++ cid-fonts.fo  2001/12/06 21:28:18 1.2.2.1
  @@ -70,7 +70,7 @@
/fox:outline
   
   
  - fo:page-sequence master-name=A4
  + fo:page-sequence master-reference=A4
   
 fo:flow flow-name=xsl-region-body
  fo:wrapper  font-family=Times font-size=12pt text-align=justify
  
  
  
  1.1.2.1   +5 -5  xml-fop/docs/examples/advanced/giro.fo
  
  Index: giro.fo
  ===
  RCS file: /home/cvs/xml-fop/docs/examples/advanced

RE: [PATCH] update FOP (maintenance branch) to REC syntax

2001-12-06 Thread Tore Engvig


Thanks!
I added the patch to cvs.


Tore


 Hi,

 I finally managed to update FOP to REC syntax..

 According to the documented changes at:

 http://www.w3.org/TR/2001/REC-xsl-20011015/sliceF.html#changes
 http://www.w3.org/TR/2001/PR-xsl-20010828/sliceF.html#changes

 the biggest thing was the renaming of the master-name property to
 master-reference on fo:page-sequence, fo:single-page-master-reference,
 fo:repeatable-page-master-reference and
 fo:conditional-page-master-reference.

 I've also updated all files in docs/examples, run the tests - and it looks
 good :-)

 Next I will have a look a the test directory


 Christian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/render/ps PSRenderer.java PSStream.java

2001-12-02 Thread tore

tore01/12/02 14:17:30

  Modified:src/codegen Tag: fop-0_20_2-maintain foproperties.xml
   src/org/apache/fop/datatypes Tag: fop-0_20_2-maintain
ColorSpace.java
   src/org/apache/fop/fo Tag: fop-0_20_2-maintain FOText.java
   src/org/apache/fop/fonts Tag: fop-0_20_2-maintain
TTFFile.java
   src/org/apache/fop/image Tag: fop-0_20_2-maintain
AbstractFopImage.java FopImage.java
FopImageFactory.java JpegImage.java
   src/org/apache/fop/image/analyser Tag: fop-0_20_2-maintain
ImageReaderFactory.java
   src/org/apache/fop/layout Tag: fop-0_20_2-maintain
FontState.java
   src/org/apache/fop/pdf Tag: fop-0_20_2-maintain
PDFDocument.java PDFT1Stream.java PDFTTFStream.java
PDFXObject.java
   src/org/apache/fop/render/pdf Tag: fop-0_20_2-maintain
PDFRenderer.java
   src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain
PSRenderer.java PSStream.java
  Added:   src/org/apache/fop/image Tag: fop-0_20_2-maintain
EPSImage.java
   src/org/apache/fop/image/analyser Tag: fop-0_20_2-maintain
EPSReader.java
   src/org/apache/fop/pdf Tag: fop-0_20_2-maintain
PDFICCStream.java
  Log:
  Support for CMYK and embedded ICC profiles in jpeg images
  Support for jpeg images in PS Renderer
  Support for EPS images in PostScript renderer and limited EPS support in
  PDF Renderer
  Bugfix for TTFReader (submitted by Cristi Ruja, [EMAIL PROTECTED])
  Support for letterspacing (submitted by Raymond Penners [EMAIL PROTECTED])
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.25.2.1  +200 -200  xml-fop/src/codegen/foproperties.xml
  
  Index: foproperties.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/foproperties.xml,v
  retrieving revision 1.25
  retrieving revision 1.25.2.1
  diff -u -r1.25 -r1.25.2.1
  --- foproperties.xml  2001/10/14 20:27:56 1.25
  +++ foproperties.xml  2001/12/02 22:17:28 1.25.2.1
  @@ -1,212 +1,212 @@
   ?xml version=1.0 standalone=yes ?
   property-list family=FO
generic-property-list
  - property type=generic
  - namegeneric-color/name
  - class-nameGenericColor/class-name
  - datatypeColorType/datatype
  - extfile href=colorkw.xml/
  +property type=generic
  +namegeneric-color/name
  +class-nameGenericColor/class-name
  +datatypeColorType/datatype
  +extfile href=colorkw.xml/
   !--
  - datatype-conversion from-type=String varname=strval
  -  new ColorType(strval)/datatype-conversion
  +datatype-conversion from-type=String varname=strval
  + new ColorType(strval)/datatype-conversion
   --
  - /property
  - property type=generic
  - namegeneric-boolean/name
  - class-nameGenericBoolean/class-name
  - datatypeEnum/datatype
  - enumeration
  - value const=TRUEtrue/value
  - value const=FALSEfalse/value
  - /enumeration
  - /property
  - property type=generic
  - namegeneric-keep/name
  - class-nameGenericKeep/class-name
  - datatypeKeep/datatype !-- CompoundDatatype --
  - compound
  - subproperty set-by-shorthand=true
  - namewithin-page/name
  - datatypeNumber/datatype
  - defaultauto/default
  - enumeration
  - value const=AUTOauto/value
  - value const=ALWAYSalways/value
  - /enumeration
  - /subproperty
  - subproperty set-by-shorthand=true
  - namewithin-line/name
  - datatypeNumber/datatype
  - defaultauto/default
  - enumeration
  - value const=AUTOauto/value
  - value const=ALWAYSalways/value
  - /enumeration
  - /subproperty
  - subproperty set-by-shorthand=true
  - namewithin-column/name
  - datatypeNumber/datatype
  - defaultauto/default
  - enumeration
  - value const=AUTOauto/value
  - value const=ALWAYSalways/value
  - /enumeration

cvs commit: xml-fop/hyph pl.xml

2001-12-02 Thread tore

tore01/12/02 14:19:09

  Added:   hyph Tag: fop-0_20_2-maintain pl.xml
  Log:
  Submitted by: Marcin Kuthan [[EMAIL PROTECTED]]
  
  Polish hyphenation based on TeX hyphenation patterns
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +4174 -0   xml-fop/hyph/Attic/pl.xml
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: xml-fop CHANGES

2001-12-02 Thread tore

tore01/12/02 14:20:02

  Modified:.Tag: fop-0_20_2-maintain CHANGES
  Log:
  Updated to reflect changes.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.1  +18 -2 xml-fop/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/xml-fop/CHANGES,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- CHANGES   2001/10/14 20:52:59 1.10
  +++ CHANGES   2001/12/02 22:20:02 1.10.2.1
  @@ -1,5 +1,15 @@
   ==
   Done since 0.20.2 release
  +*** General
  +- Support for CMYK and embedded ICC profiles in jpeg images (Tore Engvig)
  +- Support for jpeg images in PS Renderer (Tore Engvig)
  +- Add support for EPS images in PostScript renderer and limited EPS support in 
  +  PDF Renderer (Tore Engvig)
  +- fixed bug in TTFReader (unsigned lsb changed to signed) 
  +  Submitted by: Cristi Ruja, [EMAIL PROTECTED]
  +- Added Polish Hyphenation based on TeX hypenation
  +  Submitted by: Marcin Kuthan [[EMAIL PROTECTED]]
  +  
   *** Tables
   - Implement the proportional-column-width() function in table-column and
   make it possible to specify table width (or inline-progression-dimension)
  @@ -7,14 +17,20 @@
   - Fix a bug causing strange layout when a cell containing a nested table
   was laid out again because another cell in the same row was split (David
   Dixon's example). (Karen Lease)
  +
   *** Datatypes
   - Rearrange the Length class hierarchy as part of the table-column proportional
   width work. (Karen Lease)
  +
   *** Areas
   - Fix BlockArea to account for padding and border when calculating space
   remaining for content. (Karen Lease)
  +
   *** Properties
   - Add support for inline-progression-dimension and table-layout. (Karen)
  +- Add support for letter-spacing.
  +  Submitted by: Raymond Penners [EMAIL PROTECTED]
  +
   ==
   Done since 0.20 release
   
  @@ -100,7 +116,7 @@
   Submitted by:  Jeremias Maerki [EMAIL PROTECTED]
   - (Options.java) fixed error where configfile was not being set (KLiddle)
   - (Options.java) Added patch for loading config via Thread ContextClassLoader
  -Submitted by:Davanum Srinivas
  +Submitted by:   Davanum Srinivas
   - (StreamRenderer.java) This just moves the marker supporting code from before
   Mark's patch into StreamRenderer. Not tested. (SCoffman)
   
  @@ -577,7 +593,7 @@
   - fixed: leader didn't fill rest of line in table of contents [Fotis Jannidis]
   - fixed: throws a more useful error if non-row inside table body [Keiron Liddle]
   - fixed: duplicate ID bug for tables that flow over a page [Keiron Liddle]
  -- fixed: empty flow bug  [Kai Strackbein]
  +- fixed: empty flow bug [Kai Strackbein]
   - fixed: broken support of jdk 1.1 [Peter Housel]
   
   Done since 0.15 release
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: FOP conformance

2001-12-02 Thread Tore Engvig


Christian Geisert wrote:
[SNIP]

 I think too we should do a maintenance release (from 'fop-0_20_2-maintain'
 branch).

 I volunteer to do the necessary patches, do some testing etc.

I just checked in some patches that's been floating around into the
fop-0_20_2-maintain branch:

* Raymond Penners' letter-spacing patch (with some changes to use the Tc
operator in the PDF
  Renderer and ashow in the PSRenderer)
* Marcin Kuthan's Polish Hyphenation patterns
* Cristi Ruja sent a patch late august about a bug in TTFReader
* My own jpeg and eps patches


The simple-page-master stuff that originated the whole maintenance release
and Karen's table suggestions are still left to be done (Christian?)


Tore



  Regards,
  Keiron.

 Christian

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Support for ICC profiles and CMYK jpeg

2001-11-20 Thread Tore Engvig



 -Original Message-
 From: Thomas [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 18, 1997 20:47
 To: [EMAIL PROTECTED]
 Subject: Re: Support for ICC profiles and CMYK jpeg


[SNIP]

 hallo,

 i have added your support to fop, and it works for cmyk-pictures from
 photoshop. when i convert with jai-classes a rgb to cmyk it looks
 very good in photoshop, but very bad in fop. perhaps you know
 what i have to change in the code. i think it must be on the jpeg-files,
 perhaps i have to generated a numbering for the colors, but i don't know
 where.

I guess the bad image you see is inverted. This is the relevant code in
org.apache.fop.pdf.PDFXObject (around line 193):

  /* PhotoShop generates CMYK values that's inverse,
 this will invert the values - too bad if it's not a PhotoShop
image...*/
  if (fopimage.getColorSpace().getColorSpace() == ColorSpace.DEVICE_CMYK) {
p = p + /Decode [ 1.0 0.0 1.0 0.0 1.0 0.0 1.1 0.0 ]\n;
  }

The decode matrix will invert the jpeg. If you comment it out, it won't
invert the picture, but then cmyk jpegs you save from photoshop will be
inverted.

I guess there is some obvious information in the jpeg file that indicates if
the file is inverted or not. If anyone know where/how to find that
information I would gladly add code to handle it.


Tore



 thanks.

 thomas kübler


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Support for ICC profiles and CMYK jpeg

2001-11-16 Thread Tore Engvig


I've just added support for ICC profiles and CMYK jpeg's.
Source code, a prebuilt jop.jar and a test pdf can be found at
http://vaggen.net/~tengvig/fop/

Caveat: PhotoShop generates inverted cmyk jpegs. I've added a decode matrix
in PDFXObject to deal with it. Thus PhotoShop generated cmyk jpeg's will
look fine, but I guess cmyk jpegs generated from other applications will
become inverted. Does anyone have a clue how to check if a jpeg is inverted?

I've not added it to cvs yet, there are routing problems between me and the
cvs server (loop at iad1-lga1-oc192-2.iad1.above.net).


Tore


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/pdf PDFDocument.java

2001-11-16 Thread tore

tore01/11/16 11:40:32

  Modified:src/org/apache/fop/pdf PDFDocument.java
  Log:
  Fixed bug in makePDFICCStream
  
  Revision  ChangesPath
  1.36  +2 -2  xml-fop/src/org/apache/fop/pdf/PDFDocument.java
  
  Index: PDFDocument.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- PDFDocument.java  2001/11/16 19:36:40 1.35
  +++ PDFDocument.java  2001/11/16 19:40:32 1.36
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFDocument.java,v 1.35 2001/11/16 19:36:40 tore Exp $
  + * $Id: PDFDocument.java,v 1.36 2001/11/16 19:40:32 tore Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -766,7 +766,7 @@
   */
   public PDFICCStream makePDFICCStream() {
   PDFICCStream iccStream = new PDFICCStream(++this.objectcount);
  -this.objects.addElement(iccStream);
  +this.objects.add(iccStream);
   return iccStream;
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: inculde image

2001-11-15 Thread Tore Engvig
Title: RE: inculde image





  -Original Message-From: Clute, Andrew 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 14, 2001 
  20:09To: '[EMAIL PROTECTED] 'Subject: RE: inculde 
  image
  What is making your image dynamic? 
  When you mean dynamic, do you mean the URI to the image could 
  change based on the state of the app? If so, there is no way to do it in the 
  stock FOP. I was able to add dynamic images that were barcodes based upon the 
  page number, but I had to modify FOP to do it.
  I guess he's generating the image in the same servlet that 
  generates to pdf document and thus have no uri for the 
  image.
  What is your images of? Maybe you can use SVG?
  I guess SVG is the way to go. I'm not sure here, but vaguely 
  remeber something about thepossibility to embed a base64 encoded 
  gif/jpeg/whatever image into the SVG and that batik handles it.That 
  could be a solution.
  Tore
  
  -Original Message- From: 
  Maneshi Tuli To: [EMAIL PROTECTED] 
  Sent: 11/14/2001 2:01 PM Subject: 
  inculde image 
  I have to inculde dynamic image into fop , i,e I am 
  generating that image through servlet . 
  how can i do that into FOP 
  plz give me any suggestion thanks 
  -- 
  This e-mail may contain confidential and/or privileged 
  information. If you are not the intended recipient (or 
  have received this e-mail in error) please notify the 
  sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in 
  this e-mail is strictly forbidden. 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 



RE: inculde image

2001-11-15 Thread Tore Engvig
Title: RE: inculde image





  -Original Message-From: Hoang Nam 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, November 15, 2001 
  10:33To: [EMAIL PROTECTED]Subject: Re: inculde 
  image
  If the image is changed, will it be changed 
  in the Pdf document ? Is theimageembbeded in the Pdf Docuemtn 
  oronly a link tothe image ?
  
  The 
  image is embedded in the pdf document and I guess it behaves like other svg 
  images. I think you can use something like:
  
  fo:block
  fo:instream-foreign-object
  svg:svg xmlns:svg=http://www.w3.org/2000/svgwidth="100px" 
  height="100px"
  svg:titleEmbedded png 
  image/svg:title
  image width="100" height="100" x="0" y="100" 
  xlink:href="data:image/png;base74,Place base64 endoded png image 
  here"/
  
  /svg:svg
  /fo:instream-foreign-object
  /fo:block
  
  Tore
  
  Thanks !
  
- Original Message - 
From: 
Tore 
Engvig 
To: [EMAIL PROTECTED] 
Sent: Thursday, November 15, 2001 10:08 
AM
Subject: RE: inculde image



  -Original Message-From: Clute, Andrew 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 14, 2001 
  20:09To: '[EMAIL PROTECTED] 
  'Subject: RE: inculde image
  What is making your image dynamic? 
  When you mean dynamic, do you mean the URI to the image 
  could change based on the state of the app? If so, there is no way to do 
  it in the stock FOP. I was able to add dynamic images that were barcodes 
  based upon the page number, but I had to modify FOP to do it.
  I guess he's generating the image in the same servlet that 
  generates to pdf document and thus have no uri for the 
  image.
  What is your images of? Maybe you can use SVG?
  I guess SVG is the way to go. I'm not sure here, but vaguely 
  remeber something about thepossibility to embed a base64 encoded 
  gif/jpeg/whatever image into the SVG and that batik handles it.That 
  could be a solution.
  Tore
  
  -Original Message- From: 
  Maneshi Tuli To: [EMAIL PROTECTED] 
  Sent: 11/14/2001 2:01 PM Subject: 
  inculde image 
  I have to inculde dynamic image into fop , i,e I am 
  generating that image through servlet . 
  how can i do that into FOP 
  plz give me any suggestion thanks 
  -- 
  This e-mail may contain confidential and/or privileged 
  information. If you are not the intended recipient 
  (or have received this e-mail in error) please 
  notify the sender immediately and destroy this e-mail. Any 
  unauthorized copying, disclosure or distribution of the 
  material in this e-mail is strictly 
  forbidden. 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 
  


RE: Alternative to SVG

2001-10-30 Thread Tore Engvig


If I were you, I think I would investigate conversion to svg further.
pstoedit (www.pstoedit.net) has a shareware plugin for convertion .eps to
svg, but I don't know how good it is. There might exist other packages that
do the same (let me know if you find any!). Also the newest Adobe
Illustrator (8.0 or 9.0) can save as svg, but there might be restrictions on
what .eps format it supports (like you said, just using the preview
picture).

I don't think it's possible to embed pdf directly into another pdf document.
It *might* be possible to support eps directly with fop by using pdf
xobjects (not quite sure here, but I think I remember somthing about that
from the pdf spec), but then the pdf document would have to be printed on a
postscript printer to show the figures.


Tore



 -Original Message-
 From: Bill Lawrence [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 30, 2001 15:52
 To: '[EMAIL PROTECTED]'
 Subject: RE: Alternative to SVG


 There are several reasons for not converting the .eps graphics to a
 bitmapped format:

 1) These illustrations (and we have literally thousands of them) are
 technical illustrations that require very clear printed output.  Most
 conversion software that I'm familiar with simply grabs the tiff preview
 embedded in the .eps file and converts that to .gif or .jpg.  This is
 sufficient for web use, but not for printing.

 2) Given that we have thousands of these drawings, I fear that they would
 cause the size of the .pdf files to grow to be very large.  We intend to
 ship .pdf files on CD to our customers.  We're talking about a
 set of books
 that comprises around 10,000 pages.

 Regards,

 Bill

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 30, 2001 9:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Alternative to SVG



 Why not convert eps to gif/jpg and then embed gifs/jpgs into the document?





 Bill Lawrence [EMAIL PROTECTED] on 10/30/2001 09:35:50 AM

 Please respond to [EMAIL PROTECTED]

 To:   '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 cc:

 Subject:  Alternative to SVG

 We're evaluating FOP as an alternative to our current XML publishing
 softtware, and have discovered that the biggest obstacle is our large set
 of
 legacy .eps graphics.  Apparently, FOP only supposrts SVG for vector
 graphics.

 We can batch convert our .eps files into .pdf, which leads me to the
 following question:  Is there a way to embed a .pdf file within the fo
 file,
 and have FOP process this correctly in the final resultant .pdf file?

 Thanks in advance,

 Bill Lawrence

 __ANSYS, Inc. - Dominating Engineering Simulation___
 Bill Lawrence
 Senior Tools Specialist
 275 Technology Drive
 Canonsburg, PA 15317
 Ph: 724.514.2973
 _




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]









 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Continued on Page ...

2001-09-20 Thread Tore Engvig



On Thu, 20 Sep 2001 [EMAIL PROTECTED] wrote:


 Does any one know how I can generate a Continued on Page 2 message on the
 bottom of Page 1 and so on throughout a document.  I have looked at
 markers, but can't see how I can use them for this.

I don't know if it's a solution to that problem. What about a slightly
semantic change: Continued on next page :)


Tore



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Embedding fonts

2001-08-29 Thread Tore Engvig



On Wed, 29 Aug 2001, Drew Hodge wrote:

 I have successfully created new XML font metrics files using the PFMReader utility 
in FOP 0.20.1.  I run FOP specifying the new fonts in my userconfig file as follows

 !-- Syntax-Roman --
 font metrics-file=..\jar\Fop-0.20.1\fonts\syntax_roman.xml kerning=yes 
embed-file=C:\WINNT\Fonts\Sxr_.pfm
   font-triplet name=Syntax-Roman style=normal weight=normal/
 /font

 The resulting PDF correctly displays the new fonts on my computer, but the PDF 
displays garbled fonts on a colleague's computer.  I assume this is because I have 
the fonts installed and my colleague doesn't.

 Is there some other way to embed the new fonts into the PDF so that it is properly 
displayed regardless of whether or not the font is installed locally?

I think it's pure luck that it displays correctly on your display, you've
embedded the .pfm file (Sxr_.pfm), but you should embed the
corresponding .pfb file.


Tore



 Thanks,

 Drew Hodge


 Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at 
http://www.eudoramail.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: pdf security

2001-08-20 Thread Tore Engvig



On Sun, 19 Aug 2001, Ralph Bruno wrote:

 Thanks for these suggestions,. I think I've narrowed down the problem to
 font-embedding.

[SNIP]

 Has anyone else successfully converted a FOP pdf to rtf containing embedded
 fonts? Could the problem be in the metrics creation? Or is it possible to
 use the fonts without embedding them?

It's possible to use fonts without embedding them, but unfortunately it
wouldn't help you.

When using multibyte fonts, the glyphs in the document are indexes to the
glyph index in the fontfile. It's possible to use unicode instead of
glyphindexes, but that would require a ToUnicode cmap in the
pdf fontdescriptor. This has been on my todo list for quite some time now,
guess I have to do it... It's not just creating rtf files that won't work,
cut'n'paste from acrobat reader to e.g. word won't work either. More
important: searching your pdf document won't work until ToUnicode cmaps
are implemented.


Tore


 
 Thanks

 Ralph Bruno

  -Original Message-
  Sent: 28 July 2001 01:06
  To: [EMAIL PROTECTED]
  Subject: Re: pdf security
 
  Adobe technical support does exactly what all other
  big-company support
  folks do as a first line of defense - blame someone else. In
  fact, FOP
  contains precisely zero source code to put an Encrypt key in the PDF
  document trailer dictionary, and hence it is not possible for
  documents
  produced by FOP, out of the box, to have security.
 
  If you produce a document with FOP, and look at the document
  security, not
  only will it tell you that you can print and copy text to
  your heart's
  content, but also that there is no security method.
 
  When you say Acrobat 5, I'm guessing you mean Acrobat
  Exchange. Well, that
  is the only part of this whole equation that can set
  security, and so Adobe
  support lied to you. OK, let's be charitable - they didn't
  know any better.
  Given my experience with customer/technical support for big
  companies that
  is a very plausible explanation.
 
  I'm a bit irritable because I'm just coming off a 12-hour day
  wrestling with
  idiosyncracies of a J2EE server which shall go unnamed, and
  has involved a
  certain support system for 6 weeks to no avail, so I'm
  venting a bit at
  Adobe's expense. They actually deserve the flak to some
  degree, anyway.
  Seriously, though, did you inspect the FOP-produced doc using
  _Reader_? As
  soon as FOP produced it?
 
  Regards,
  Arved Sandstrom
 
  Fairly Senior Software Type
  e-plicity (http://www.e-plicity.com)
  Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia
 
 
 
  At 04:42 PM 7/27/01 +0100, Ralph Bruno wrote:
  I'm using FOP 0.19 and Acrobat 5, and whenever I try to export my
  FOP-generated pdf to rtf, all I get are seemingly blank
  pages, but it is in
  fact white text on a white background (In case you're
  wondering, my original
  pdf is black, red and grey text on white).
  
  I contacted Adobe technical support and they've informed me
  that it's a
  result of the security settings in my pdf - it's been set
  for non-copying of
  text. Obviously the only place it could have been set is in
  the FOP code.
  How do I change it to allow copying?

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Fonts and reporting classes

2001-08-20 Thread Tore Engvig



On Fri, 17 Aug 2001, Spectron Caribe, Inc. wrote:

 Ok, thanks for the info. One more thing and I'll leave you guys alone. :)

 I think that java.awt.Font has almost all the information needed to create a
 /FontDescriptor. Would it be posible to create an XML file using a
 java.awt.Font class? For example.

 createXMLFont(java.awt.Font f).

 I think it would be useful. If the font found in the Java environment
 (Arial, Times, ...) is found in the system it will use it, if not it will
 use one of the standard fonts.

It has almost all you need, but not all you need. E.g. it's not possible
to determine what kind of font it is (postscript, truetype, etc)

Also, it would be of limited use.

* Using awt fonts would require a peer (as far as I know).
* You can only use one of the predefined encodings (winansi, macroman).
  You can't use other unicode characters as that would require knowledge
  of the glyph indexes in the font.
* You can't be sure that the fonts available to java is available as a
  system font. In unix environments you can almost be sure that a java
  font is not available as a system font.


Tore


 Faw

 - Original Message -
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 2:31 AM
 Subject: Re: Fonts and reporting classes


 On Thu, 16 Aug 2001 15:28:58 -0400 Spectron Caribe, Inc. wrote:
  1. I know that in PDF files you can add a /FontDescriptor for a TrueType
  font without actually embedding the font. What this does is if the font is
  found in the system it uses it, if not it uses another font. Is there any
  way I could do that with FOP?

 Try removing the embed-file attribute from the font-metrics in the
 userconfig.xml.

 Jeremias Märki

 mailto:[EMAIL PROTECTED]

 OUTLINE AG
 Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
 Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
 Internet http://www.outline.ch


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Ideas about PDFGraphics2D font handling for True Type to Type1

2001-08-20 Thread Tore Engvig


I'm not sure that you always can assume that java fonts are the same as
your system fonts, and I don't think you should map Arial to Helvetica. If
I remember correctly, Helvetica is a nice font, but Arial looks more
like... ugly. Also Arial exists in dozens of different versions, that goes
for other fonts to.

I guess that the simplest solution to your problem is to create
fontmetrics for your java fonts (those found in jre/lib) and add those to
fop with the same name as their java name. You don't have to embed them
in your document (just don't use embed file in your userconfig.xml).

As for sansserif and sans-serif, I don't think it's controversial to add a
mapping for both sansserif and sans-serif in FontSetup


Tore




On Sun, 19 Aug 2001, Randall Parker wrote:


 Here's the problem in a nutshell: Java's Font class knows about the True Type fonts 
that it loaded from jre\lib
 \fonts and it also seems to know about TrueType fonts that are in the operating 
system's directory of fonts (on
 my NT4 box they are in winnt\fonts). But those font names are not going match the 
Type 1 font names that
 FOP's FontInfo.java and FontSetup.java know about. It appears that FontSetup.java 
does provide a mechanism
 for mapping TT fonts to Type 1 PDF core fonts. What I'm arguing here is that more 
calls to
 FontInfo.addFontProperties need to be added to FontSetup in order to support mapping 
of more TT fonts to
 Type 1 fonts.

 Elsewhere I've been told that the TrueType fonts Courier New and Times New Roman are 
supposed to have the
 same font metrics as the Type 1 fonts Courier and Times Roman. This same person also 
claimed that Arial
 has the same font metrics as Helvetica. If this is really true (anyone know a good 
way to find out?) then it
 makes sense to me for FontInfo to map those TrueType fonts to their corresponding 
Type 1 metric
 equivalalents.

 So True Type fonts available in Java should be mapped to Type 1 fonts in PDF as 
follows:
Arial  -- Helvetica
   Times New Roman  --  Times-Roman
   Courier New--  Courier
  and when they have bold and italic they should be mapped appropriately as well.

 I came across this relevant quote in an article by Thomas Phinney about TrueType and 
PostScript Type 1.


 Article excerpts:

 According to Dov Isaacs,then Adobe 's Manager
 of Quality Assurance,Printing Systems Division,
 regardless of whether you are on a Mac or a PC run-
 ning Windows ...or above,you can mix TrueType
 and Type .with the caveat that you should never
 have both TrueType and Type .fonts with the same
 exact names on the same system.Indeed,having any
 two fonts with identical menu names or PostScript
 font names can confuse the operating system or your
 applications,with unpredictable results.

 ...

 When dealing with fonts on the computer 's side,
 one needs to be careful about deliberately substitut-
 ing Arial for Helvetica and Times New Roman for
 Times,or vice versa.Although the basic spacing of
 the substituted fonts is identical,their kerning pairs
 are not.is can cause text to reflow if one switches
 between two different-but-almost-the-same fonts on
 the computer doing the typesetting,if the program
 supports kerning pairs (graphics and DTP programs,
 and some better word processors).In situations in
 which exact line breaks are not critical,or applica-
 tions in question do not use kerning,problems are
 unlikely.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: embedding fonts using xml-font-files and userconf.xml

2001-08-13 Thread Tore Engvig



On Mon, 13 Aug 2001, Matthias Born wrote:

 hi!

 i've got problems embedding fonts.

[snip]

 i configured the userconfig in the conf-directory in the following way:

   fonts
   font metrics-file=zurich.xml kerning=yes embed-file=zurich.ttf
   font-triplet name=Zurich style=normal weight=bold/
   /font
   /fonts

[snip]
   WARNING: unknown font Zurich,normal,normal so defaulted font to any

 any ideas what went wrong?

Yes, you only added Zurich bold to userconfig.xml. If you want to use the
normal weight, you have to add that one too (weight=normal).


Tore


 regards matze


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: AW: embedding fonts using xml-font-files and userconf.xml

2001-08-13 Thread Tore Engvig



Hehe, it would've been to easy if it was only a typo :)
It really don't have any other suggestions except using absolute
urls/paths in userconfig.xml, like:

font metrics-file=file:///C:/fop/zurich.xml
  kerning=yes
  embed-file=C:\WINNT\Fonts\zurich.ttf
   font-triplet name=Zurich style=normal weight=normal/
/font


Tore



On Mon, 13 Aug 2001, Matthias Born wrote:

 ups!

 thanks and sorry!
 it was a mistake in the mail.

fonts
font metrics-file=zurich.xml kerning=yes
 embed-file=zurich.ttf
font-triplet name=Zurich style=normal 
weight=bold/
/font
/fonts

Yes, you only added Zurich bold to userconfig.xml. If you want to use
 the
normal weight, you have to add that one too (weight=normal).

 i tried differend styles and weights, also i tried normal, normal, again
 after your mail.
 unfortunately it was not the solution.

 the weight=bold was one of my last try outs, therefore it's written in the
 mail.

 any over ideas?

 regards matze



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Fix (not Patch) to changes on 26 July that broke Embedded Fontlayout

2001-08-03 Thread Tore Engvig



You're quite right, the characters was mapped twice.
I removed the boolean doMap argument to getWordWidth because it's not used
anymore. Then we don't need the getMappedCharWidth/getCharWidth
distinction.

Thanks

Tore


On Wed, 1 Aug 2001, Struan Judd wrote:

 I've tracked down the reason for the problem I reported below.

 Unfortunately, I've done this in the pre-codeformat sources and I don't have
 access to a patch generator (well maybe but it's a minor fix).

 In org.apache.fop.layout.LineArea towards the end of the function:
 private int getWordWidth(String word, boolean doMap)
 the line (992 in old code) was changed to be:
 width += getCharWidth(currentChar);

 This caused some characters to be mapped twice.

 The fix I'm suggesting is to split the function:
 private int getCharWidth(char c)
 which begins
 int width = currentFontState.width(currentFontState.mapChar(c));
 if (width = 0) {
 ...

 into two functions as follows:

 private int getCharWidth(char c) {
 return getMappedCharWidth(currentFontState.mapChar(c));
 }

 private int getMappedCharWidth(char c) {
 int width = currentFontState.width(c);
 if (width = 0) {
 ...

 and then changed the above mentioned line in getWordWidth() to be:
 width += getMappedCharWidth(currentChar);


 I hope this can be checked and committed soon.

 TTFN
 
 Struan Judd * And so it begins ...ICQ: 4498196
 http://neongraal.sf.org.nz
 mailto:[EMAIL PROTECTED]   Voicemail and Fax: +1 (201) 305-1011 
x1006


  -Original Message-
  From: Struan Judd [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 27 July 2001 12:53
  To: [EMAIL PROTECTED]
  Subject: The current CVS version seems to be seriously broken
 
 
  It builds fine but the finally laid out PDF has overlapping areas and
  non-lined up leading edges of table columns.
 
  I am using an embedded font but that's all I can think of that different
  from defaults.
 
  If I checkout as at 25th of July it works fine.
 
  So what's been checked in recently that might affect that.
 
  TTFN
  
  Struan Judd * And so it begins ...  ICQ: 4498196
  http://neongraal.sf.org.nz
  mailto:[EMAIL PROTECTED] Voicemail and Fax:
  +1 (201) 305-1011 x1006
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Codeformatting finished

2001-08-01 Thread Tore Engvig



On Wed, 1 Aug 2001 [EMAIL PROTECTED] wrote:


 Hi.

 Good, but some typo and other files suffer from same un-escaped
 problem. Attached patch will fix typos and other files.

Thanks, I commited your patch. I'll do a thorough check for unicode
escapes tomorrow and will also take a look at Struan's fix.

Seems like jIndent didn't do a very good job with unicode escapes...
To jIndent's defence I must admit that I used version 2.1 which used to be
free, this might have been fixed in newer commercial versions.

Regarding jIndent breaking the 78 char linelength limit, that's to bad.
jIndent usually does a very good job with this. I guess submitting patches
with fixes for that would be ok.


Tore


 ===
 SASAKI Suguru
   mailto : [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Codeformatting finished

2001-07-31 Thread Tore Engvig



On Mon, 30 Jul 2001, Arved Sandstrom wrote:

 I see in ViewCVS that everything looks OK, and I managed to 'cvs update' one
 file as a test, but I can't 'cvs checkout' at the moment. Anyone else having
 this problem?

Nope, I checked out just now.

[snip]

 If I can figure out exactly what it is you did, and restore my 'cvs
 checkout', I can take care of 3 of these. They were affected by marker
 support, basically. Shouldn't conflict with Mark's changes, in a logical
 sense,  but 'patch' might not think so.

[snip]

 OK, I'm not sure I understand 100%. The current CVS does _not_ reflect Mark's
 patch at all, and you have a patch which applies a portion of Mark's patch,
 to the _formatted_ codebase. Is that correct? And it is then a question of
 applying the rest of the patch to Block, AreaTree, Page, and TestConverter,
 right? Just trying to get my head straight. :-)

You're right. It was getting a little late and reformatting took much
longer time then estimated - guess i boggered up my brain :)

The current CVS does not reflect Mark's patch. The original attachment
contained a portion of Mark's patch to the formatted codebase.


Tore


 Regards,
 Arved

 P.S. Thanks for the yeoman effort.

 --
 Fairly Senior Software Type
 e-plicity (http://www.e-plicity.com)
 Halifax, Nova Scotia
 Wireless * B2B * J2EE * XML

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Codeformatting finished

2001-07-30 Thread Tore Engvig


I just finished codeformatting and also changed all .java files to use the
short license. Unfortunately the size of the diff was so huge that ezml
freaked out and the diff was not posted to fop-cvs...

The repository was tagged with PRE_CODEFORMATTING just before formatting
the code, so if it for some obscure reason introduced bugs or you want to
look at the code before formatting, it's possible.

It's also a bit unfortunate that Mark's patch isn't yet commited. Anyone
volunteer for this? It's just too big for me.

Here's what I did with it:
I applied the patch to the code before formatting it.
It seems like it has been some changes in the repository after you created
the patch. The following files was rejected:

src/org/apache/fop/fo/flow/Block.java
src/org/apache/fop/layout/AreaTree.java
src/org/apache/fop/layout/Page.java
src/org/apache/fop/tools/TestConverter.java

The rest of the files made it. So, I applied codeformatting and license
changing to those files and created a new patch which is attached to this
mail. That patch consists of the following files:

src/org/apache/fop/apps/AWTStarter.java
src/org/apache/fop/apps/CommandLineStarter.java
src/org/apache/fop/apps/Driver.java
src/org/apache/fop/apps/PrintStarter.java
src/org/apache/fop/datatypes/IDReferences.java
src/org/apache/fop/fo/FONode.java
src/org/apache/fop/fo/FOText.java
src/org/apache/fop/fo/FOTreeBuilder.java
src/org/apache/fop/fo/FObjMixed.java
src/org/apache/fop/fo/pagination/PageSequence.java
src/org/apache/fop/pdf/PDFDocument.java
src/org/apache/fop/pdf/PDFPage.java
src/org/apache/fop/pdf/PDFPages.java
src/org/apache/fop/pdf/PDFRoot.java
src/org/apache/fop/render/PrintRenderer.java
src/org/apache/fop/render/Renderer.java
src/org/apache/fop/render/awt/AWTRenderer.java
src/org/apache/fop/render/mif/MIFRenderer.java
src/org/apache/fop/render/pcl/PCLRenderer.java
src/org/apache/fop/render/pdf/PDFRenderer.java
src/org/apache/fop/render/ps/PSRenderer.java
src/org/apache/fop/render/txt/TXTRenderer.java
src/org/apache/fop/render/xml/XMLRenderer.java


Tore


 newpatch.patch.gz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


cvs commit: xml-fop/src/org/apache/fop/layout/inline InlineSpace.java

2001-07-24 Thread tore

tore01/07/24 15:04:41

  Modified:src/org/apache/fop/layout LineArea.java
   src/org/apache/fop/layout/inline InlineSpace.java
  Log:
  Added support for various spaces, inluding non-breaking space
(fixes bug no 2297)
  Added support for line breaking in the middle of words for CJK languages
  Fixes for bug 2243 based on a patch from [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.46  +293 -74   xml-fop/src/org/apache/fop/layout/LineArea.java
  
  Index: LineArea.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- LineArea.java 2001/07/17 20:27:13 1.45
  +++ LineArea.java 2001/07/24 22:04:41 1.46
  @@ -1,4 +1,4 @@
  -/* $Id: LineArea.java,v 1.45 2001/07/17 20:27:13 tore Exp $
  +/* $Id: LineArea.java,v 1.46 2001/07/24 22:04:41 tore Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -23,10 +23,12 @@
   import org.apache.fop.fo.properties.VerticalAlign;
   import org.apache.fop.layout.hyphenation.Hyphenation;
   import org.apache.fop.layout.hyphenation.Hyphenator;
  +import org.apache.fop.configuration.Configuration;
   
   //java
   import java.util.Vector;
   import java.util.Enumeration;
  +import java.util.StringTokenizer;
   import java.awt.Rectangle;
   
   public class LineArea extends Area {
  @@ -66,7 +68,7 @@
   protected static final int NOTHING = 0;
   protected static final int WHITESPACE = 1;
   protected static final int TEXT = 2;
  -
  +
   /* the character type of the previous character */
   protected int prev = NOTHING;
   
  @@ -116,10 +118,38 @@
   
   if (prevLineArea != null) {
   Enumeration e = prevLineArea.pendingAreas.elements();
  -while (e.hasMoreElements()) {
  -pendingAreas.addElement(e.nextElement());
  +Box b = null;
  +// There might be InlineSpaces at the beginning
  +// that should not be there - eat them
  +boolean eatMoreSpace = true;
  +int eatenWidth = 0;
  +
  +while (eatMoreSpace) {
  +if (e.hasMoreElements()) {
  +b = (Box)e.nextElement();
  +if (b instanceof InlineSpace) {
  +InlineSpace is = (InlineSpace)b;
  +if (is.isEatable())
  +eatenWidth += is.getSize();
  +else
  +eatMoreSpace = false;
  +} else {
  +eatMoreSpace = false;
  +}
  +} else {
  +eatMoreSpace = false;
  +b = null;
  +}
  +}
  +
  +while (b != null) {
  +pendingAreas.addElement(b);
  +if (e.hasMoreElements())
  +b = (Box)e.nextElement();
  +else
  +b = null;
   }
  -pendingWidth = prevLineArea.getPendingWidth();
  +pendingWidth = prevLineArea.getPendingWidth() - eatenWidth;
   }
   }
   
  @@ -165,9 +195,8 @@
   int wordStart = start;
   int wordLength = 0;
   int wordWidth = 0;
  -// With CID fonts, space isn't neccecary currentFontState.width(32)
  -int whitespaceWidth =
  -currentFontState.width(currentFontState.mapChar(' '));
  +// With CID fonts, space isn't neccesary currentFontState.width(32)
  +int whitespaceWidth = getCharWidth(' ');
   
   char[] data = new char[odata.length];
   char[] dataCopy = new char[odata.length];
  @@ -181,15 +210,19 @@
   int charWidth;
   /* get the character */
   char c = data[i];
  -if (!((c == ' ') || (c == '\n') || (c == '\r') ||
  -  (c == '\t'))) {
  -//c = data[i] = currentFontState.mapChar(c);
  -   charWidth = currentFontState.width(currentFontState.mapChar(c));
  +if (!(isSpace(c) || (c == '\n') || (c == '\r') ||
  +  (c == '\t') || (c == '\u2028'))) {
  +   charWidth = getCharWidth(c);
  isText = true;
  -   if (charWidth = 0)
  +   // Add support for zero-width spaces
  +   if (charWidth = 0  c != '\u200B'  c != '\uFEFF')
 charWidth = whitespaceWidth;
   } else {
  -   charWidth = whitespaceWidth;
  +if ((c == '\n') || (c == '\r') || (c == '\t'))
  +charWidth

Re: [Patch] bug 2243 - extra space at the beginning of next lineafter line feed

2001-07-24 Thread Tore Engvig



Hi Karen,

I checked in my changes before I read your mail.
The code I just checked in has a lot of changes regarding whitespace.
I just looked at the bug and the the attached fo. I ran it through the new
code and it renders different - the missing line is included now.

I don't know if the bug appears as fixed because of the recent changes -
but it might because the LineArea constructor now discards some pending
InlineSpaces.

I'll take a look at it.


Tore


On Tue, 24 Jul 2001, Karen Lease wrote:

 Hi Tore,

 While you're looking at whitespace in LineArea I thought you might
 be interested in a bug I noticed yesterday.

 Looking at a table bug report
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2740, I stumbled
 across a different problem.

 It turns out that the fo file has lots of trailing whitespace in most of
 its blocks (fairly common in many formatted .fo files). In fact, it has
 a structure that looks like this:

 table-cell -- block |-- whitespace
 |-- block -- text
 |-- whitespace

 The first whitespace gets eliminated in the Block class during the widow
 handling. Then the nested block gets laid out and fits completely in the
 remaining space. Then the outer block tries to layout its last child,
 which is only whitespace. But before discovering that it won't actually
 create a LineArea (at least given the current whitespace-related
 property values), it returns an incomplete layout status because it
 can't fit a LineArea in the remaining space. The result is that my outer
 Block returns incomplete, and so does the table cell, but what is
 actually composed is complete. So the next area composed is empty,
 except for the padding and borders.

 I haven't looked much into handling all these linefeed, whitespace
 properties (although it certainly would be on the menu for the New
 Layout...) and thought maybe you had.
 There is a method in FOText called willCreateArea() which is used by
 the widow/orphan code in Block. Then in LineArea there is more code to
 see what to do with spaces, which is more complicated. I'm not
 necessarily asking you to try to fix the bug I mentioned, but thought
 you might have something to say about it.

 Regards,
 Karen Lease


 Tore Engvig wrote:
 
  On Mon, 23 Jul 2001, Rainer Garus wrote:
 
   Is it possible to insert and commit the patch sended on 2001-06-28 to CVS?
 
  Had completely forgooten about your patch! Your reminder came just in time
  - I'm working on the LineArea class right now. I'm trying to add better
  support for spaces (there's about a dozen of different unicode spaces) and
  have problems with my non-breaking spaces causing an extra space at
  beginning of next line.
 
  I'll take a look at it.
 
  Tore
 
  
   Rainer Garus
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, email: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: [Patch] bug 2243 - extra space at the beginning of next lineafter line feed

2001-07-23 Thread Tore Engvig



On Mon, 23 Jul 2001, Rainer Garus wrote:

 Is it possible to insert and commit the patch sended on 2001-06-28 to CVS?

Had completely forgooten about your patch! Your reminder came just in time
- I'm working on the LineArea class right now. I'm trying to add better
support for spaces (there's about a dozen of different unicode spaces) and
have problems with my non-breaking spaces causing an extra space at
beginning of next line.

I'll take a look at it.


Tore


 Rainer Garus

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Code Style, was Re: PDF serialization

2001-07-19 Thread Tore Engvig



On Thu, 19 Jul 2001, Mark Lillywhite wrote:

 Sure. Monday the 23rd evening (GMT) is codeformatting day unless somebody
 protests.
 
 Would it be possible to wait for a day or two before setting a firm
 date? I hope to have my pipelining stuff completed today and I would
 like to at least get an opinion on their suitability for inclusion
 before this goes ahead. While the changes aren't very big they will be
 very difficult to apply after the code is reformatted.

I guess it'll take more than a few days to look at it, better postone it a
week. So monday the 30th is codeformatting day!


Tore



 I'm just asking for a couple of day's grace, and the time of a committer
 to take a look at them and let me know if they are suitable or not.

 Regards
 Mark


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Code Style, was Re: PDF serialization

2001-07-18 Thread Tore Engvig



On Tue, 17 Jul 2001, Arved Sandstrom wrote:

 Hi, Tore

 Well, how about _you_ set the day, since you're the volunteer? :-)

Sure. Monday the 23rd evening (GMT) is codeformatting day unless somebody
protests.

Everyone who have some uncomitted code should commit it by then as the
diffs in your local copy after the codeformat will mismatch and cvs will
scream conflict.

I will tag the repository before beautifying the code (eg PRE_CODEFORMAT)
and also take a look at the long-form/short-form license.


Tore


 I tend to agree with your comments about cvswrappers, and you're right, why
 not try the logical first approach, which is that all committers make a
 point of running the code beautifier of their choice before making commits?
 We have not in a long time, if ever, put our foot down and said that this is
 the way it will be - it's been pretty lackadaisical so far. So, once you
 have reformatted everything, and recommitted, all committers would be on
 notice to adhere to code conventions.

 It would be useful if you can work in license long-form - short-form
 translation also.

 A tag is a good idea, I agree. Who knows what might happen?

 Thanks in advance for doing this.

 Regards,
 Arved

 Fairly Senior Software Type
 e-plicity (http://www.e-plicity.com)
 Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/fonts TTFFile.java

2001-07-17 Thread tore

tore01/07/17 13:57:49

  Modified:src/org/apache/fop/fonts TTFFile.java
  Log:
  Submitted by: SASAKI Suguru ([EMAIL PROTECTED])
  Some glyphs are missed when more then one glyph maps to the same data,
  this patch fixes it.
  
  Revision  ChangesPath
  1.5   +10 -5 xml-fop/src/org/apache/fop/fonts/TTFFile.java
  
  Index: TTFFile.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/TTFFile.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TTFFile.java  2001/04/16 16:07:30 1.4
  +++ TTFFile.java  2001/07/17 20:57:47 1.5
  @@ -1,4 +1,4 @@
  -/* -- $Id: TTFFile.java,v 1.4 2001/04/16 16:07:30 tore Exp $ --
  +/* -- $Id: TTFFile.java,v 1.5 2001/07/17 20:57:47 tore Exp $ --
*
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
  @@ -200,14 +200,15 @@
   lastChar = (short) j;
   
   if (mtxPtr  mtx_tab.length) {
  +int glyphIdx;
   if (cmap_rangeOffsets[i] != 0) {
   int glyphOffset = glyphIdArrayOffset +
 ((cmap_rangeOffsets[i] / 2) +
  (j - cmap_startCounts[i]) + (i) -
  cmap_segCountX2 / 2) * 2;
   in.seek_set(glyphOffset);
  -int glyphIdx = (in.readTTFUShort() +
  -cmap_deltas[i])  0x;
  +glyphIdx = (in.readTTFUShort() +
  +cmap_deltas[i])  0x;
   
   unicodeMapping.addElement(
 new UnicodeMapping(glyphIdx, j));
  @@ -254,7 +255,7 @@
   }
   else {
   
  -int glyphIdx = (j + cmap_deltas[i])  0x;
  +glyphIdx = (j + cmap_deltas[i])  0x;
   
   if (glyphIdx  mtx_tab.length)
   mtx_tab[glyphIdx] .unicodeIndex.addElement(
  @@ -308,7 +309,11 @@
   mtx_tab[(j+cmap_deltas[i])  0x].name);
 */
   }
  -mtxPtr++;
  +if (glyphIdx  mtx_tab.length) {
  +if (mtx_tab[glyphIdx].unicodeIndex.size()  2) {
  +mtxPtr++;
  +}
  +}
   }
   }
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [PATCH] Not all glyph is loaded when two or more char aremapped to one glyph

2001-07-17 Thread Tore Engvig


Thanks for the patch!
I just added it to cvs.

Tore


On Thu, 12 Jul 2001, SASAKI Suguru wrote:


 Hi, fop-team.

 Current org.apache.fop.fonts.TTFFile dosen't load all glyph data
 when two or more character is mapped to one glyph.
 (In fact, Bitstream Cybetbit font has mapped many characters to
 missingGlyph (glyphIndex = 0)).
 Some character dosen't appear in outputs because of this.

 This pacth will fix this problem.

 ===
 SASAKI Suguru
   mailto : [EMAIL PROTECTED]



 --- src/org/apache/fop/fonts/TTFFile.java.origTue Apr 17 01:07:30 2001
 +++ src/org/apache/fop/fonts/TTFFile.java Thu Jul 12 01:37:20 2001
 @@ -200,13 +200,14 @@
  lastChar = (short) j;

  if (mtxPtr  mtx_tab.length) {
 +int glyphIdx;
  if (cmap_rangeOffsets[i] != 0) {
  int glyphOffset = glyphIdArrayOffset +
((cmap_rangeOffsets[i] / 2) +
 (j - cmap_startCounts[i]) + (i) -
 cmap_segCountX2 / 2) * 2;
  in.seek_set(glyphOffset);
 -int glyphIdx = (in.readTTFUShort() +
 +glyphIdx = (in.readTTFUShort() +
  cmap_deltas[i])  0x;

  unicodeMapping.addElement(
 @@ -254,7 +255,7 @@
  }
  else {

 -int glyphIdx = (j + cmap_deltas[i])  0x;
 +glyphIdx = (j + cmap_deltas[i])  0x;

  if (glyphIdx  mtx_tab.length)
  mtx_tab[glyphIdx] .unicodeIndex.addElement(
 @@ -308,7 +309,11 @@
  mtx_tab[(j+cmap_deltas[i])  0x].name);
*/
  }
 -mtxPtr++;
 +if (glyphIdx  mtx_tab.length){
 +if(mtx_tab[glyphIdx] .unicodeIndex.size()  2){
 +mtxPtr++;
 +}
 +}
  }
  }
  }


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: leader bug and here is a patch

2001-07-17 Thread Tore Engvig


Sorry for not looking at your patch until now, but I've been on vacation
(a couple of weeks with the cellular turned off and no email access can
actually be quite satisfying!).

The mapping from char to glyph is moved to the PDFRenderer, so there
should be no need to map the chars again (only for calculating widths).
However, the leaders with space patterns was still rendered wrong. That's
because actual spaces was used, I changed it to use InlineSpace. Most
fonts doesn't contain an actual space glyph, but instead maps it to the
missing glyph which usually is just a square.


Tore


On Wed, 4 Jul 2001, Hin-Tak Leung wrote:

 Apply this patch to:
 xml-fop/src/org/apache/fop/layout/LineArea.java

 A bug was introduced between version 1.42 and 1.43 of LineArea
 which uses a lot of mapChar to cope with bug 1618 (CVS log has
 a typo error instead to 1681), and forgot to change the
 leader calculation.

 This bug should have caused FOP to crash with any XSL:FO input
 that has a leader with dots or space with non-pdf-standard
 fonts. I wonder why nobody spotted it in release 0.19? My
 last CVS build was May 16 and it worked fine - the fatal bug
 was introduced on 12 June and went into release 0.19 and
 went unreported for nearly a month...

 Somebody please patch this into the CVS tree?

 =
 *** LineArea.java-bad   Tue Jun 12 12:37:42 2001
 --- LineArea.java   Wed Jul  4 00:44:44 2001
 ***
 *** 751,769 
   * creates a leader as String out of the given char and the leader
 length
   * and wraps it in an InlineArea which is returned
   */
 ! private InlineArea buildSimpleLeader(int charNumber, int leaderLength) {
 !   int width = this.currentFontState.width(charNumber);
  if (width == 0) {
 -   char c = (char) charNumber;
  MessageHandler.errorln(char  + c +  has width
 0. Using width 100 instead.);
  width = 100;
  }
int factor = (int) Math.floor (leaderLength /
   width);
char [] leaderChars = new char [factor];
 - char fillChar = (char) charNumber;
for (int i = 0; i  factor; i ++) {
 ! leaderChars[i] = fillChar;
}
WordArea leaderPatternArea =
  new WordArea(currentFontState, this.red, this.green,
 --- 751,767 
   * creates a leader as String out of the given char and the leader
 length
   * and wraps it in an InlineArea which is returned
   */
 ! private InlineArea buildSimpleLeader(char c, int leaderLength) {
 !   int width =
 this.currentFontState.width(currentFontState.mapChar(c));
  if (width == 0) {
  MessageHandler.errorln(char  + c +  has width
 0. Using width 100 instead.);
  width = 100;
  }
int factor = (int) Math.floor (leaderLength /
   width);
char [] leaderChars = new char [factor];
for (int i = 0; i  factor; i ++) {
 ! leaderChars[i] = c;
}
WordArea leaderPatternArea =
  new WordArea(currentFontState, this.red, this.green,
 ==


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]