Arabic text being 'transformed' into something that looks Arabic but is not exactly the same as what I put in

2011-05-05 Thread Bas van den Broek
Hi all,

I recently received a ticket from an Arabic client that text being transformed 
using FOP was not quite the same as the input was. So I made a testproject and 
this is the XSL I'm putting into FOP:

?xml version=1.0 encoding=UTF-8?fo:root 
xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master master-name=MyPage page-height=11.693in 
page-width=8.268in
  fo:region-body margin-bottom=0.5in margin-left=0.5in 
margin-right=0.5in margin-top=0.5in/
  fo:region-before display-align=before extent=0.5in 
region-name=xsl-region-before/
  fo:region-after display-align=after extent=0.5in 
region-name=xsl-region-after/
  fo:region-start extent=0.5in/
  fo:region-end extent=0.5in/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=MyPage
fo:flow flow-name=xsl-region-body
  fo:block color=#00 font-family=tahoma font-size=10pt 
font-style=normal font-weight=normal
fo:block
  fo:table border-collapse=separate border-spacing=0pt 
padding=0pt table-layout=fixed text-align=left width=100%
fo:table-column column-width=50%/
fo:table-column column-width=50%/
fo:table-body
  fo:table-row
fo:table-cell display-align=before text-align=left
  fo:block white-space-collapse=false wrap-option=wrap
fo:block linefeed-treatment=preserve 
white-space-collapse=false wrap-option=wrapعربي/fo:block
  /fo:block
/fo:table-cell
fo:table-cell display-align=before text-align=left
  fo:block white-space-collapse=false wrap-option=wrap/
/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell display-align=before text-align=left
  fo:block white-space-collapse=false wrap-option=wrap
fo:block linefeed-treatment=preserve 
white-space-collapse=false wrap-option=wrapعربي/fo:block
  /fo:block
/fo:table-cell
fo:table-cell display-align=before text-align=left
  fo:block white-space-collapse=false wrap-option=wrap/
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table
/fo:block
fo:block id=terminator/
  /fo:block
/fo:flow
  /fo:page-sequence
/fo:root

(Apologies for the overly long XSL, this is being generated)

Notice the Arabic text in 2 of the cells (I don't know what the word means btw)
I'm using Tahoma which is capable of showing these characters, and this font 
has been put into the font options.

font kerning=yes embed-url=tahoma.ttf
  font-triplet name=tahoma style=normal weight=normal/
  font-triplet name=tahomaMT style=normal weight=normal/
  /font

I used other fonts this way and this does not seem to be the problem anyway.

Also, using rl-tb instead of lr-tb does not solve the issue, it only does what 
you would expect, reverse the text.

The result looks like this:

يبرع
يبرع

Which certainly looks Arabic but is not quite the same as what I put in.

If I use another library (XFC) to transform the XSL to Word, it does show the 
Arabic text correctly.


Would be appreciated if anyone could help me out here.

Kind regards,

Bas van den Broek

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Arabic text being 'transformed' into something that looks Arabic but is not exactly the same as what I put in

2011-05-05 Thread Bas van den Broek
Thanks, I'll look around a bit to see if I can get this to work.
Will this be integrated into FOP at some point? Any timeline that you know of?

Kind regards,

Bas van den Broek



-Original Message-
From: Pascal Sancho [mailto:pascal.san...@takoma.fr] 
Sent: Thursday, May 05, 2011 11:30
To: fop-users@xmlgraphics.apache.org
Subject: Re: Arabic text being 'transformed' into something that looks Arabic 
but is not exactly the same as what I put in

Hi Bas,

FOP currently doesn't support non-latin scripts.
Fortunately, Glenn Adams is working on this topic and has made a great job.

You can download sources from various locations (you'll have to build
FOP yourself):
 - complex scripts FOP branch:
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ComplexScripts

 - Glenn's GIT:
git://github.com/skynavga/fop.git.


You can get further information here:
 - Glenn's Wiki:
https://skynav.trac.cvsdude.com/fop/wiki/ComplexScripts

 - Bugzilla FOP complex scripts entry:
https://issues.apache.org/bugzilla/show_bug.cgi?id=49687




Le 05/05/2011 11:03, Bas van den Broek a écrit :
 Hi all,
 
 I recently received a ticket from an Arabic client that text being 
 transformed using FOP was not quite the same as the input was. So I made a 
 testproject and this is the XSL I'm putting into FOP:
 
 ?xml version=1.0 encoding=UTF-8?fo:root 
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
   fo:layout-master-set
 fo:simple-page-master master-name=MyPage page-height=11.693in 
 page-width=8.268in
   fo:region-body margin-bottom=0.5in margin-left=0.5in 
 margin-right=0.5in margin-top=0.5in/
   fo:region-before display-align=before extent=0.5in 
 region-name=xsl-region-before/
   fo:region-after display-align=after extent=0.5in 
 region-name=xsl-region-after/
   fo:region-start extent=0.5in/
   fo:region-end extent=0.5in/
 /fo:simple-page-master
   /fo:layout-master-set
   fo:page-sequence master-reference=MyPage
 fo:flow flow-name=xsl-region-body
   fo:block color=#00 font-family=tahoma font-size=10pt 
 font-style=normal font-weight=normal
 fo:block
   fo:table border-collapse=separate border-spacing=0pt 
 padding=0pt table-layout=fixed text-align=left width=100%
 fo:table-column column-width=50%/
 fo:table-column column-width=50%/
 fo:table-body
   fo:table-row
 fo:table-cell display-align=before text-align=left
   fo:block white-space-collapse=false wrap-option=wrap
 fo:block linefeed-treatment=preserve 
 white-space-collapse=false wrap-option=wrapعربي/fo:block
   /fo:block
 /fo:table-cell
 fo:table-cell display-align=before text-align=left
   fo:block white-space-collapse=false wrap-option=wrap/
 /fo:table-cell
   /fo:table-row
   fo:table-row
 fo:table-cell display-align=before text-align=left
   fo:block white-space-collapse=false wrap-option=wrap
 fo:block linefeed-treatment=preserve 
 white-space-collapse=false wrap-option=wrapعربي/fo:block
   /fo:block
 /fo:table-cell
 fo:table-cell display-align=before text-align=left
   fo:block white-space-collapse=false wrap-option=wrap/
 /fo:table-cell
   /fo:table-row
 /fo:table-body
   /fo:table
 /fo:block
 fo:block id=terminator/
   /fo:block
 /fo:flow
   /fo:page-sequence
 /fo:root
 
 (Apologies for the overly long XSL, this is being generated)
 
 Notice the Arabic text in 2 of the cells (I don't know what the word means 
 btw)
 I'm using Tahoma which is capable of showing these characters, and this font 
 has been put into the font options.
 
   font kerning=yes embed-url=tahoma.ttf
   font-triplet name=tahoma style=normal weight=normal/
   font-triplet name=tahomaMT style=normal weight=normal/
   /font
 
 I used other fonts this way and this does not seem to be the problem anyway.
 
 Also, using rl-tb instead of lr-tb does not solve the issue, it only does 
 what you would expect, reverse the text.
 
 The result looks like this:
 
 يبرع
 يبرع
 
 Which certainly looks Arabic but is not quite the same as what I put in.
 
 If I use another library (XFC) to transform the XSL to Word, it does show the 
 Arabic text correctly.
 
 
 Would be appreciated if anyone could help me out here.
 
 Kind regards,
 
 Bas van den Broek

-- 
Pascal

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


Double spaces are removed in PDF generation

2010-09-08 Thread Bas van den Broek
Hello all,

 

I've generated an FO file based on XHTML using AntennaHouse's XSLT. My
source XHTML has a line of text with a postal code, 2 spaces and then a
city name. This is a block from the generated FO file:

 

fo:block role=html:div

fo:inline role=html:span1000AA
Rotterdam/fo:inline

fo:block role=html:br/

 /fo:block

 

Now I use this FO file to generate a PDF file with FOP. However, in the
generated PDF the 2 spaces are  transformed into a single space. This is
while using the latest 1.0 release of FOP. I'd like to keep the 2 spaces
in the generated PDF document. Does anyone know how to solve this issue?

 

Kind regards,

 

Bas van den Broek - Research  Development

 



RE: want to catch missing font warnings

2010-06-29 Thread Bas van den Broek
Just replying to 2 people at once here since I don't want to clutter the
mailing list.



Sounds good, is this version scheduled for release though? Or is the
trunk stable enough to use in production?

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: dinsdag 29 juni 2010 9:41
To: fop-users@xmlgraphics.apache.org
Subject: Re: want to catch missing font warnings

FOP Trunk contains an event framework that lets you do that with an
event listener. Please see:
http://xmlgraphics.apache.org/fop/trunk/events.html





Thanks, I may do that as a temporary solution. The font is
user-specified by the way, so I don't know why it would be missing, but
I do want the user to know with a real exception.

-Original Message-
From: Eric Douglas [mailto:edoug...@blockhouse.com] 
Sent: maandag 28 juni 2010 20:42
To: fop-users@xmlgraphics.apache.org
Subject: RE: want to catch missing font warnings

It's passing out a message using org.apache.commons.logging.Log.warn().
If you can't get that method to throw out an error, you can just
download the fop source, change the font method, and recompile.
The message is in org.apache.fop.fonts.FontInfo.notifyFontReplacement().
Have you gotten it to find the font?  Why then wouldn't the font be
found?

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



want to catch missing font warnings

2010-06-28 Thread Bas van den Broek
Hi all,

I am using FOP 0.95 and my fo file contains an unknown font to the
library. This is the warning I get:

WARNING: Font 'fakefont,normal,400' not found. Substituting with
'any,normal,400'.

I would like to be able to catch this warning 'cause in my case I don't
want to continue if a font cannot be found. Is there a way to do this? I
could not find this in the documentation.

Kind regards,

Bas van den Broek

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org