<include name="META-INF/**"/>
<include name="**/*.xml"/>
<include name="**/*.fo"/>
+ <include name="**/BidiTestData*.ser"/>
+ <include name="**/*.afp"/>
</fileset>
<fileset dir="${build.dir}/test-gensrc">
<include name="**/*.xml"/>
<test name="org.apache.fop.text.linebreak.LineBreakStatusTest" todir="${junit.reports.dir}"/>
</junit>
</target>
- <target name="junit-reduced" depends="junit-userconfig, junit-basic, junit-transcoder, junit-text-linebreak, junit-fotree, junit-complexscripts"/>
+ <target name="junit-render-pdf" depends="junit-compile">
+ <echo message="Running tests for the render pdf package"/>
+ <junit-run title="render-pdf" testsuite="org.apache.fop.render.pdf.RenderPDFTestSuite"
+ outfile="TEST-render-pdf"/>
+ </target>
+ <target name="junit-reduced" depends="junit-userconfig, junit-basic, junit-transcoder,
- junit-text-linebreak, junit-fotree, junit-render-pdf"/>
++ junit-text-linebreak, junit-fotree, junit-render-pdf, junit-complexscripts"/>
<target name="junit-full" depends="junit-reduced, junit-layout, junit-area-tree-xml-format, junit-intermediate-format"/>
<target name="junit" depends="junit-full" description="Runs all of FOP's JUnit tests" if="junit.present">
<fail><condition><or><isset property="fop.junit.error"/><isset property="fop.junit.failure"/><not><isset property="hyphenation.present"/></not></or></condition>
return realFontDescriptor.isEmbeddable();
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean performsSubstitution() {
+ load(true);
+ if ( realFontDescriptor instanceof Substitutable ) {
+ return ((Substitutable)realFontDescriptor).performsSubstitution();
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CharSequence performSubstitution ( CharSequence cs, String script, String language ) {
+ load(true);
+ if ( realFontDescriptor instanceof Substitutable ) {
+ return ((Substitutable)realFontDescriptor).performSubstitution(cs, script, language);
+ } else {
+ return cs;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CharSequence reorderCombiningMarks
+ ( CharSequence cs, int[][] gpa, String script, String language ) {
+ load(true);
+ if ( realFontDescriptor instanceof Substitutable ) {
+ return ((Substitutable)realFontDescriptor).
+ reorderCombiningMarks(cs, gpa, script, language);
+ } else {
+ return cs;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean performsPositioning() {
+ load(true);
+ if ( realFontDescriptor instanceof Positionable ) {
+ return ((Positionable)realFontDescriptor).performsPositioning();
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int[][]
+ performPositioning ( CharSequence cs, String script, String language, int fontSize ) {
+ load(true);
+ if ( realFontDescriptor instanceof Positionable ) {
+ return ((Positionable)realFontDescriptor)
+ .performPositioning(cs, script, language, fontSize);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int[][]
+ performPositioning ( CharSequence cs, String script, String language ) {
+ load(true);
+ if ( realFontDescriptor instanceof Positionable ) {
+ return ((Positionable)realFontDescriptor)
+ .performPositioning(cs, script, language);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isSubsetEmbedded() {
+ load(true);
+ return realFont.isMultiByte();
+ }
+
}
package org.apache.fop.fonts;
-//Java
+import java.nio.CharBuffer;
+import java.nio.IntBuffer;
- import java.text.DecimalFormat;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.fop.util.CharUtilities;
/**
* Generic MultiByte (CID) font
*/
-public class MultiByteFont extends CIDFont {
+public class MultiByteFont extends CIDFont implements Substitutable, Positionable {
+
+ /** logging instance */
+ private static final Log log // CSOK: ConstantNameCheck
+ = LogFactory.getLog(MultiByteFont.class);
- private static int uniqueCounter = -1;
-
private String ttcName = null;
private String encoding = "Identity-H";
private int defaultWidth = 0;
private CIDFontType cidType = CIDFontType.CIDTYPE2;
- private String namePrefix = null; // Quasi unique prefix
-
private CIDSubset subset = new CIDSubset();
- /** A map from Unicode indices to glyph indices */
+ /**
+ * A map from Unicode indices to glyph indices. No assumption
+ * about ordering is made below. If lookup is changed to a binary
+ * search (from the current linear search), then addPrivateUseMapping()
+ * needs to be changed to perform ordered inserts.
+ */
private BFEntry[] bfentries = null;
+ /* advanced typographic support */
+ private GlyphDefinitionTable gdef;
+ private GlyphSubstitutionTable gsub;
+ private GlyphPositioningTable gpos;
+
+ /* dynamic private use (character) mappings */
+ private int numMapped;
+ private int numUnmapped;
+ private int nextPrivateUse = 0xE000;
+ private int firstPrivate;
+ private int lastPrivate;
+ private int firstUnmapped;
+ private int lastUnmapped;
+
/**
* Default constructor
*/