View | Details | Raw Unified | Return to bug 32789
Collapse All | Expand All

(-)fop.bat (+1 lines)
Lines 67-72 Link Here
67
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.4.jar
67
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.4.jar
68
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_imageio.jar
68
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_imageio.jar
69
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
69
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
70
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\icu4j-4_2_1.jar
70
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%
71
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%
71
72
72
set JAVAOPTS=-Denv.windir=%WINDIR%
73
set JAVAOPTS=-Denv.windir=%WINDIR%
(-)lib/license.html (+51 lines)
Line 0 Link Here
1
<html>
2
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></meta>
5
<title>ICU License - ICU 1.8.1 and later</title>
6
</head>
7
8
<body BGCOLOR="#ffffff">
9
<h2>ICU License - ICU 1.8.1 and later</h2>
10
11
<p>COPYRIGHT AND PERMISSION NOTICE</p>
12
13
<p>
14
Copyright (c) 1995-2009 International Business Machines Corporation and others
15
</p>
16
<p>
17
All rights reserved.
18
</p>
19
<p>
20
Permission is hereby granted, free of charge, to any person obtaining a copy
21
of this software and associated documentation files (the "Software"),
22
to deal in the Software without restriction, including without limitation
23
the rights to use, copy, modify, merge, publish, distribute, and/or sell
24
copies of the Software, and to permit persons
25
to whom the Software is furnished to do so, provided that the above
26
copyright notice(s) and this permission notice appear in all copies
27
of the Software and that both the above copyright notice(s) and this
28
permission notice appear in supporting documentation.
29
</p>
30
<p>
31
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
32
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
33
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL
34
THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM,
35
OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
36
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
37
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
38
USE OR PERFORMANCE OF THIS SOFTWARE.
39
</p>
40
<p>
41
Except as contained in this notice, the name of a copyright holder shall not be
42
used in advertising or otherwise to promote the sale, use or other dealings in
43
this Software without prior written authorization of the copyright holder.
44
</p>
45
46
<hr>
47
<p><small>
48
All trademarks and registered trademarks mentioned herein are the property of their respective owners.
49
</small></p>
50
</body>
51
</html>
(-)src/java/org/apache/fop/render/pcl/PCLPainter.java (-1 / +15 lines)
Lines 32-37 Link Here
32
import java.util.Map;
32
import java.util.Map;
33
import java.util.Stack;
33
import java.util.Stack;
34
34
35
import com.ibm.icu.text.ArabicShaping;
36
import com.ibm.icu.text.ArabicShapingException;
37
import com.ibm.icu.text.Bidi;
35
import org.w3c.dom.Document;
38
import org.w3c.dom.Document;
36
39
37
import org.apache.commons.logging.Log;
40
import org.apache.commons.logging.Log;
Lines 475-481 Link Here
475
                Java2DPainter painter = new Java2DPainter(g2d,
478
                Java2DPainter painter = new Java2DPainter(g2d,
476
                        getContext(), parent.getFontInfo(), state);
479
                        getContext(), parent.getFontInfo(), state);
477
                try {
480
                try {
478
                    painter.drawText(x, y, letterSpacing, wordSpacing, dx, text);
481
                    String textTemp = text;
482
                    ArabicShaping arabicShaping = new ArabicShaping(ArabicShaping.LETTERS_SHAPE | ArabicShaping.LAMALEF_AUTO);
483
                     try {
484
                          textTemp = arabicShaping.shape(textTemp);
485
                     } catch (ArabicShapingException ex) {
486
                               throw new IFException("Arabic Shaping Exception", ex);
487
                     }
488
                     Bidi bidi = new Bidi();
489
                     bidi.setPara(textTemp, (byte)Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT,  null);
490
                     textTemp = bidi.writeReordered(Bidi.KEEP_BASE_COMBINING);
491
492
                    painter.drawText(x, y, letterSpacing, wordSpacing, dx, textTemp);
479
                } catch (IFException e) {
493
                } catch (IFException e) {
480
                    //This should never happen with the Java2DPainter
494
                    //This should never happen with the Java2DPainter
481
                    throw new RuntimeException("Unexpected error while painting text", e);
495
                    throw new RuntimeException("Unexpected error while painting text", e);
(-)src/java/org/apache/fop/render/pdf/PDFPainter.java (+13 lines)
Lines 27-32 Link Here
27
import java.awt.geom.AffineTransform;
27
import java.awt.geom.AffineTransform;
28
import java.io.IOException;
28
import java.io.IOException;
29
29
30
import com.ibm.icu.text.ArabicShaping;
31
import com.ibm.icu.text.ArabicShapingException;
32
import com.ibm.icu.text.Bidi;
30
import org.w3c.dom.Document;
33
import org.w3c.dom.Document;
31
34
32
import org.apache.fop.fonts.Font;
35
import org.apache.fop.fonts.Font;
Lines 295-300 Link Here
295
    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx,
298
    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx,
296
            String text)
299
            String text)
297
            throws IFException {
300
            throws IFException {
301
       ArabicShaping arabicShaping = new ArabicShaping(ArabicShaping.LETTERS_SHAPE | ArabicShaping.LAMALEF_AUTO);
302
       try {
303
            text = arabicShaping.shape(text);
304
        } catch (ArabicShapingException ex) {
305
                throw new IFException("Arabic Shaping Exception", ex);
306
        }
307
        Bidi bidi = new Bidi();
308
        bidi.setPara(text, (byte)Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT,  null);
309
        text = bidi.writeReordered(Bidi.KEEP_BASE_COMBINING);
310
298
        if (accessEnabled) {
311
        if (accessEnabled) {
299
            String ptr = getContext().getStructurePointer();
312
            String ptr = getContext().getStructurePointer();
300
            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr);
313
            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr);

Return to bug 32789