You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ju...@apache.org on 2008/07/22 19:20:56 UTC
svn commit: r678810 [5/6] - in /incubator/pdfbox/trunk/fontbox: ./
Resources/ lib/ licenses/ licenses/checkstyle/ licenses/fontbox/
licenses/junit/ src/ src/org/ src/org/fontbox/ src/org/fontbox/afm/
src/org/fontbox/cmap/ src/org/fontbox/encoding/ src/...
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/RAFDataStream.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/RAFDataStream.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/RAFDataStream.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/RAFDataStream.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,182 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.ttf;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.RandomAccessFile;
+
+/**
+ * An implementation of the TTFDataStream that goes against a RAF.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.2 $
+ */
+public class RAFDataStream extends TTFDataStream
+{
+ private RandomAccessFile raf = null;
+ private File ttfFile = null;
+
+ /**
+ * Constructor.
+ *
+ * @param name The raf file.
+ * @param mode The mode to open the RAF.
+ *
+ * @throws FileNotFoundException If there is a problem creating the RAF.
+ *
+ * @see RandomAccessFile#RandomAccessFile( String, String )
+ */
+ public RAFDataStream(String name, String mode) throws FileNotFoundException
+ {
+ this( new File( name ), mode );
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param file The raf file.
+ * @param mode The mode to open the RAF.
+ *
+ * @throws FileNotFoundException If there is a problem creating the RAF.
+ *
+ * @see RandomAccessFile#RandomAccessFile( File, String )
+ */
+ public RAFDataStream(File file, String mode) throws FileNotFoundException
+ {
+ raf = new RandomAccessFile( file, mode );
+ ttfFile = file;
+ }
+
+ /**
+ * Read an signed short.
+ *
+ * @return An signed short.
+ * @throws IOException If there is an error reading the data.
+ */
+ public short readSignedShort() throws IOException
+ {
+ return raf.readShort();
+ }
+
+ /**
+ * Get the current position in the stream.
+ * @return The current position in the stream.
+ * @throws IOException If an error occurs while reading the stream.
+ */
+ public long getCurrentPosition() throws IOException
+ {
+ return raf.getFilePointer();
+ }
+
+ /**
+ * Close the underlying resources.
+ *
+ * @throws IOException If there is an error closing the resources.
+ */
+ public void close() throws IOException
+ {
+ raf.close();
+ raf = null;
+ }
+
+ /**
+ * Read an unsigned byte.
+ * @return An unsigned byte.
+ * @throws IOException If there is an error reading the data.
+ */
+ public int read() throws IOException
+ {
+ return raf.read();
+ }
+
+ /**
+ * Read an unsigned short.
+ *
+ * @return An unsigned short.
+ * @throws IOException If there is an error reading the data.
+ */
+ public int readUnsignedShort() throws IOException
+ {
+ return raf.readUnsignedShort();
+ }
+
+ /**
+ * Read an unsigned byte.
+ * @return An unsigned byte.
+ * @throws IOException If there is an error reading the data.
+ */
+ public long readLong() throws IOException
+ {
+ return raf.readLong();
+ }
+
+ /**
+ * Seek into the datasource.
+ *
+ * @param pos The position to seek to.
+ * @throws IOException If there is an error seeking to that position.
+ */
+ public void seek(long pos) throws IOException
+ {
+ raf.seek( pos );
+ }
+
+ /**
+ * @see java.io.InputStream#read( byte[], int, int )
+ *
+ * @param b The buffer to write to.
+ * @param off The offset into the buffer.
+ * @param len The length into the buffer.
+ *
+ * @return The number of bytes read.
+ *
+ * @throws IOException If there is an error reading from the stream.
+ */
+ public int read(byte[] b,
+ int off,
+ int len)
+ throws IOException
+ {
+ return raf.read(b,off,len);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getOriginalData() throws IOException
+ {
+ return new FileInputStream( ttfFile );
+ }
+}
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFDataStream.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFDataStream.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFDataStream.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFDataStream.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,247 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.ttf;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+/**
+ * An interface into a data stream.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.1 $
+ */
+public abstract class TTFDataStream
+{
+
+ /**
+ * Read a 16.16 fixed value, where the first 16 bits are the decimal and the last
+ * 16 bits are the fraction.
+ * @return A 32 bit value.
+ * @throws IOException If there is an error reading the data.
+ */
+ public float read32Fixed() throws IOException
+ {
+ float retval = 0;
+ retval = readSignedShort();
+ retval += (readUnsignedShort()/65536);
+ return retval;
+ }
+
+ /**
+ * Read a fixed length ascii string.
+ * @param length The length of the string to read.
+ * @return A string of the desired length.
+ * @throws IOException If there is an error reading the data.
+ */
+ public String readString( int length ) throws IOException
+ {
+ return readString( length, "ISO-8859-1" );
+ }
+
+ /**
+ * Read a fixed length ascii string.
+ * @param length The length of the string to read in bytes.
+ * @param charset The expected character set of the string.
+ * @return A string of the desired length.
+ * @throws IOException If there is an error reading the data.
+ */
+ public String readString( int length, String charset ) throws IOException
+ {
+ byte[] buffer = read( length );
+ return new String(buffer, charset);
+ }
+
+ /**
+ * Read an unsigned byte.
+ * @return An unsigned byte.
+ * @throws IOException If there is an error reading the data.
+ */
+ public abstract int read() throws IOException;
+
+ /**
+ * Read an unsigned byte.
+ * @return An unsigned byte.
+ * @throws IOException If there is an error reading the data.
+ */
+ public abstract long readLong() throws IOException;
+
+
+ /**
+ * Read a signed byte.
+ * @return A signed byte.
+ * @throws IOException If there is an error reading the data.
+ */
+ public int readSignedByte() throws IOException
+ {
+ int signedByte = read();
+ return signedByte < 127 ? signedByte : signedByte-256;
+ }
+
+ /**
+ * Read an unsigned integer.
+ * @return An unsiged integer.
+ * @throws IOException If there is an error reading the data.
+ */
+ public long readUnsignedInt() throws IOException
+ {
+ long byte1 = read();
+ long byte2 = read();
+ long byte3 = read();
+ long byte4 = read();
+ if( byte4 < 0 )
+ {
+ throw new EOFException();
+ }
+ return (byte1 << 24) + (byte2 << 16) + (byte3 << 8) + (byte4 << 0);
+ }
+
+ /**
+ * Read an unsigned short.
+ *
+ * @return An unsigned short.
+ * @throws IOException If there is an error reading the data.
+ */
+ public abstract int readUnsignedShort() throws IOException;
+
+ /**
+ * Read an unsigned short array.
+ *
+ * @param length The length of the array to read.
+ * @return An unsigned short array.
+ * @throws IOException If there is an error reading the data.
+ */
+ public int[] readUnsignedShortArray( int length ) throws IOException
+ {
+ int[] array = new int[ length ];
+ for( int i=0; i<length; i++ )
+ {
+ array[i] = readUnsignedShort();
+ }
+ return array;
+ }
+
+ /**
+ * Read an signed short.
+ *
+ * @return An signed short.
+ * @throws IOException If there is an error reading the data.
+ */
+ public abstract short readSignedShort() throws IOException;
+
+ /**
+ * Read an eight byte international date.
+ *
+ * @return An signed short.
+ * @throws IOException If there is an error reading the data.
+ */
+ public Calendar readInternationalDate() throws IOException
+ {
+ long secondsSince1904 = readLong();
+ GregorianCalendar cal = new GregorianCalendar( 1904, 0, 1 );
+ long millisFor1904 = cal.getTimeInMillis();
+ millisFor1904 += (secondsSince1904*1000);
+ cal.setTimeInMillis( millisFor1904 );
+ return cal;
+ }
+
+ /**
+ * Close the underlying resources.
+ *
+ * @throws IOException If there is an error closing the resources.
+ */
+ public abstract void close() throws IOException;
+
+ /**
+ * Seek into the datasource.
+ *
+ * @param pos The position to seek to.
+ * @throws IOException If there is an error seeking to that position.
+ */
+ public abstract void seek(long pos) throws IOException;
+
+ /**
+ * Read a specific number of bytes from the stream.
+ * @param numberOfBytes The number of bytes to read.
+ * @return The byte buffer.
+ * @throws IOException If there is an error while reading.
+ */
+ public byte[] read( int numberOfBytes ) throws IOException
+ {
+ byte[] data = new byte[ numberOfBytes ];
+ int amountRead = 0;
+ int totalAmountRead = 0;
+ while( (amountRead = read( data, totalAmountRead, numberOfBytes-totalAmountRead ) ) != -1 &&
+ totalAmountRead < numberOfBytes )
+ {
+ totalAmountRead += amountRead;
+ //read at most numberOfBytes bytes from the stream.
+ }
+ return data;
+ }
+
+ /**
+ * @see java.io.InputStream#read( byte[], int, int )
+ *
+ * @param b The buffer to write to.
+ * @param off The offset into the buffer.
+ * @param len The length into the buffer.
+ *
+ * @return The number of bytes read.
+ *
+ * @throws IOException If there is an error reading from the stream.
+ */
+ public abstract int read(byte[] b,
+ int off,
+ int len)
+ throws IOException;
+
+ /**
+ * Get the current position in the stream.
+ * @return The current position in the stream.
+ * @throws IOException If an error occurs while reading the stream.
+ */
+ public abstract long getCurrentPosition() throws IOException;
+
+ /**
+ * This will get the original data file that was used for this
+ * stream.
+ *
+ * @return The data that was read from.
+ * @throws IOException If there is an issue reading the data.
+ */
+ public abstract InputStream getOriginalData() throws IOException;
+
+}
\ No newline at end of file
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFParser.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFParser.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFParser.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFParser.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.ttf;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * A true type font file parser.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.2 $
+ */
+public class TTFParser
+{
+ /**
+ * A simple command line program to test parsing of a TTF file. <br/>
+ * usage: java org.pdfbox.ttf.TTFParser <ttf-file>
+ *
+ * @param args The command line arguments.
+ *
+ * @throws IOException If there is an error while parsing the font file.
+ */
+ public static void main( String[] args ) throws IOException
+ {
+ if( args.length != 1 )
+ {
+ System.err.println( "usage: java org.pdfbox.ttf.TTFParser <ttf-file>" );
+ System.exit( -1 );
+ }
+ TTFParser parser = new TTFParser();
+ TrueTypeFont font = parser.parseTTF( args[0] );
+ System.out.println( "Font:" + font );
+ }
+
+ /**
+ * Parse a file and get a true type font.
+ * @param ttfFile The TTF file.
+ * @return A true type font.
+ * @throws IOException If there is an error parsing the true type font.
+ */
+ public TrueTypeFont parseTTF( String ttfFile ) throws IOException
+ {
+ RAFDataStream raf = new RAFDataStream( ttfFile, "r" );
+ return parseTTF( raf );
+ }
+
+ /**
+ * Parse a file and get a true type font.
+ * @param ttfFile The TTF file.
+ * @return A true type font.
+ * @throws IOException If there is an error parsing the true type font.
+ */
+ public TrueTypeFont parseTTF( File ttfFile ) throws IOException
+ {
+ RAFDataStream raf = new RAFDataStream( ttfFile, "r" );
+ return parseTTF( raf );
+ }
+
+ /**
+ * Parse a file and get a true type font.
+ * @param ttfData The TTF data to parse.
+ * @return A true type font.
+ * @throws IOException If there is an error parsing the true type font.
+ */
+ public TrueTypeFont parseTTF( InputStream ttfData ) throws IOException
+ {
+ return parseTTF( new MemoryTTFDataStream( ttfData ));
+ }
+
+ /**
+ * Parse a file and get a true type font.
+ * @param raf The TTF file.
+ * @return A true type font.
+ * @throws IOException If there is an error parsing the true type font.
+ */
+ public TrueTypeFont parseTTF( TTFDataStream raf ) throws IOException
+ {
+ TrueTypeFont font = new TrueTypeFont( raf );
+ font.setVersion( raf.read32Fixed() );
+ int numberOfTables = raf.readUnsignedShort();
+ int searchRange = raf.readUnsignedShort();
+ int entrySelector = raf.readUnsignedShort();
+ int rangeShift = raf.readUnsignedShort();
+ for( int i=0; i<numberOfTables; i++ )
+ {
+ TTFTable table = readTableDirectory( raf );
+ font.addTable( table );
+ }
+ List initialized = new ArrayList();
+ //need to initialize a couple tables in a certain order
+ HeaderTable head = font.getHeader();
+ raf.seek( head.getOffset() );
+ head.initData( font, raf );
+ initialized.add( head );
+
+
+ HorizontalHeaderTable hh = font.getHorizontalHeader();
+ raf.seek( hh.getOffset() );
+ hh.initData( font, raf );
+ initialized.add( hh );
+
+ MaximumProfileTable maxp = font.getMaximumProfile();
+ raf.seek( maxp.getOffset() );
+ maxp.initData( font, raf );
+ initialized.add( maxp );
+
+ PostScriptTable post = font.getPostScript();
+ raf.seek( post.getOffset() );
+ post.initData( font, raf );
+ initialized.add( post );
+
+ IndexToLocationTable loc = font.getIndexToLocation();
+ raf.seek( loc.getOffset() );
+ loc.initData( font, raf );
+ initialized.add( loc );
+
+ Iterator iter = font.getTables().iterator();
+ while( iter.hasNext() )
+ {
+ TTFTable table = (TTFTable)iter.next();
+ if( !initialized.contains( table ) )
+ {
+ raf.seek( table.getOffset() );
+ table.initData( font, raf );
+ }
+ }
+ return font;
+ }
+
+ private TTFTable readTableDirectory( TTFDataStream raf ) throws IOException
+ {
+ TTFTable retval = null;
+ String tag = raf.readString( 4 );
+ if( tag.equals( CMAPTable.TAG ) )
+ {
+ retval = new CMAPTable();
+ }
+ else if( tag.equals( GlyphTable.TAG ) )
+ {
+ retval = new GlyphTable();
+ }
+ else if( tag.equals( HeaderTable.TAG ) )
+ {
+ retval = new HeaderTable();
+ }
+ else if( tag.equals( HorizontalHeaderTable.TAG ) )
+ {
+ retval = new HorizontalHeaderTable();
+ }
+ else if( tag.equals( HorizontalMetricsTable.TAG ) )
+ {
+ retval = new HorizontalMetricsTable();
+ }
+ else if( tag.equals( IndexToLocationTable.TAG ) )
+ {
+ retval = new IndexToLocationTable();
+ }
+ else if( tag.equals( MaximumProfileTable.TAG ) )
+ {
+ retval = new MaximumProfileTable();
+ }
+ else if( tag.equals( NamingTable.TAG ) )
+ {
+ retval = new NamingTable();
+ }
+ else if( tag.equals( OS2WindowsMetricsTable.TAG ) )
+ {
+ retval = new OS2WindowsMetricsTable();
+ }
+ else if( tag.equals( PostScriptTable.TAG ) )
+ {
+ retval = new PostScriptTable();
+ }
+ else if( tag.equals( GlyphTable.TAG ) )
+ {
+ retval = new GlyphTable();
+ }
+ else if( tag.equals( GlyphTable.TAG ) )
+ {
+ retval = new GlyphTable();
+ }
+ else if( tag.equals( DigitalSignatureTable.TAG ) )
+ {
+ retval = new DigitalSignatureTable();
+ }
+ else
+ {
+ //unknown table type but read it anyway.
+ retval = new TTFTable();
+ }
+ retval.setTag( tag );
+ retval.setCheckSum( raf.readUnsignedInt() );
+ retval.setOffset( raf.readUnsignedInt() );
+ retval.setLength( raf.readUnsignedInt() );
+ return retval;
+ }
+}
\ No newline at end of file
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFTable.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFTable.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFTable.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TTFTable.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.ttf;
+
+import java.io.IOException;
+
+/**
+ * A table in a true type font.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.1 $
+ */
+public class TTFTable
+{
+ private String tag;
+ private long checkSum;
+ private long offset;
+ private long length;
+
+ /**
+ * @return Returns the checkSum.
+ */
+ public long getCheckSum()
+ {
+ return checkSum;
+ }
+ /**
+ * @param checkSumValue The checkSum to set.
+ */
+ public void setCheckSum(long checkSumValue)
+ {
+ this.checkSum = checkSumValue;
+ }
+ /**
+ * @return Returns the length.
+ */
+ public long getLength()
+ {
+ return length;
+ }
+ /**
+ * @param lengthValue The length to set.
+ */
+ public void setLength(long lengthValue)
+ {
+ this.length = lengthValue;
+ }
+ /**
+ * @return Returns the offset.
+ */
+ public long getOffset()
+ {
+ return offset;
+ }
+ /**
+ * @param offsetValue The offset to set.
+ */
+ public void setOffset(long offsetValue)
+ {
+ this.offset = offsetValue;
+ }
+ /**
+ * @return Returns the tag.
+ */
+ public String getTag()
+ {
+ return tag;
+ }
+ /**
+ * @param tagValue The tag to set.
+ */
+ public void setTag(String tagValue)
+ {
+ this.tag = tagValue;
+ }
+
+ /**
+ * This will read the required data from the stream.
+ *
+ * @param ttf The font that is being read.
+ * @param data The stream to read the data from.
+ * @throws IOException If there is an error reading the data.
+ */
+ public void initData( TrueTypeFont ttf, TTFDataStream data ) throws IOException
+ {
+ }
+}
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TrueTypeFont.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TrueTypeFont.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TrueTypeFont.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/TrueTypeFont.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,222 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.ttf;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * A class to hold true type font information.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.2 $
+ */
+public class TrueTypeFont
+{
+ private float version;
+
+ private Map tables = new HashMap();
+
+ private TTFDataStream data;
+
+ /**
+ * Constructor. Clients should use the TTFParser to create a new TrueTypeFont object.
+ *
+ * @param fontData The font data.
+ */
+ TrueTypeFont( TTFDataStream fontData )
+ {
+ data = fontData;
+ }
+
+ /**
+ * Close the underlying resources.
+ *
+ * @throws IOException If there is an error closing the resources.
+ */
+ public void close() throws IOException
+ {
+ data.close();
+ }
+
+ /**
+ * @return Returns the version.
+ */
+ public float getVersion()
+ {
+ return version;
+ }
+ /**
+ * @param versionValue The version to set.
+ */
+ public void setVersion(float versionValue)
+ {
+ version = versionValue;
+ }
+
+ /**
+ * Add a table definition.
+ *
+ * @param table The table to add.
+ */
+ public void addTable( TTFTable table )
+ {
+ tables.put( table.getTag(), table );
+ }
+
+ /**
+ * Get all of the tables.
+ *
+ * @return All of the tables.
+ */
+ public Collection getTables()
+ {
+ return tables.values();
+ }
+
+ /**
+ * This will get the naming table for the true type font.
+ *
+ * @return The naming table.
+ */
+ public NamingTable getNaming()
+ {
+ return (NamingTable)tables.get( NamingTable.TAG );
+ }
+
+ /**
+ * Get the postscript table for this TTF.
+ *
+ * @return The postscript table.
+ */
+ public PostScriptTable getPostScript()
+ {
+ return (PostScriptTable)tables.get( PostScriptTable.TAG );
+ }
+
+ /**
+ * Get the OS/2 table for this TTF.
+ *
+ * @return The OS/2 table.
+ */
+ public OS2WindowsMetricsTable getOS2Windows()
+ {
+ return (OS2WindowsMetricsTable)tables.get( OS2WindowsMetricsTable.TAG );
+ }
+
+ /**
+ * Get the maxp table for this TTF.
+ *
+ * @return The maxp table.
+ */
+ public MaximumProfileTable getMaximumProfile()
+ {
+ return (MaximumProfileTable)tables.get( MaximumProfileTable.TAG );
+ }
+
+ /**
+ * Get the head table for this TTF.
+ *
+ * @return The head table.
+ */
+ public HeaderTable getHeader()
+ {
+ return (HeaderTable)tables.get( HeaderTable.TAG );
+ }
+
+ /**
+ * Get the hhea table for this TTF.
+ *
+ * @return The hhea table.
+ */
+ public HorizontalHeaderTable getHorizontalHeader()
+ {
+ return (HorizontalHeaderTable)tables.get( HorizontalHeaderTable.TAG );
+ }
+
+ /**
+ * Get the hmtx table for this TTF.
+ *
+ * @return The hmtx table.
+ */
+ public HorizontalMetricsTable getHorizontalMetrics()
+ {
+ return (HorizontalMetricsTable)tables.get( HorizontalMetricsTable.TAG );
+ }
+
+ /**
+ * Get the loca table for this TTF.
+ *
+ * @return The loca table.
+ */
+ public IndexToLocationTable getIndexToLocation()
+ {
+ return (IndexToLocationTable)tables.get( IndexToLocationTable.TAG );
+ }
+
+ /**
+ * Get the glyf table for this TTF.
+ *
+ * @return The glyf table.
+ */
+ public GlyphTable getGlyph()
+ {
+ return (GlyphTable)tables.get( GlyphTable.TAG );
+ }
+
+ /**
+ * Get the cmap table for this TTF.
+ *
+ * @return The cmap table.
+ */
+ public CMAPTable getCMAP()
+ {
+ return (CMAPTable)tables.get( CMAPTable.TAG );
+ }
+
+ /**
+ * This permit to get the data of the True Type Font
+ * program representing the stream used to build this
+ * object (normally from the TTFParser object).
+ *
+ * @return COSStream True type font program stream
+ *
+ * @throws IOException If there is an error getting the font data.
+ */
+ public InputStream getOriginalData() throws IOException
+ {
+ return data.getOriginalData();
+ }
+}
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/package.html
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/package.html?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/package.html (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/ttf/package.html Tue Jul 22 10:20:54 2008
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+
+</head>
+<body>
+This package contains classes to parse a TTF file.
+</body>
+</html>
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/BoundingBox.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/BoundingBox.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/BoundingBox.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/BoundingBox.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,188 @@
+/**
+ * Copyright (c) 2005, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of fontbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.fontbox.org
+ *
+ */
+package org.fontbox.util;
+
+import java.awt.Point;
+
+/**
+ * This is an implementation of a bounding box. This was originally written for the
+ * AMF parser.
+ *
+ * @author Ben Litchfield (ben@benlitchfield.com)
+ * @version $Revision: 1.1 $
+ */
+public class BoundingBox
+{
+ private float lowerLeftX;
+ private float lowerLeftY;
+ private float upperRightX;
+ private float upperRightY;
+
+ /**
+ * Getter for property lowerLeftX.
+ *
+ * @return Value of property lowerLeftX.
+ */
+ public float getLowerLeftX()
+ {
+ return lowerLeftX;
+ }
+
+ /**
+ * Setter for property lowerLeftX.
+ *
+ * @param lowerLeftXValue New value of property lowerLeftX.
+ */
+ public void setLowerLeftX(float lowerLeftXValue)
+ {
+ this.lowerLeftX = lowerLeftXValue;
+ }
+
+ /**
+ * Getter for property lowerLeftY.
+ *
+ * @return Value of property lowerLeftY.
+ */
+ public float getLowerLeftY()
+ {
+ return lowerLeftY;
+ }
+
+ /**
+ * Setter for property lowerLeftY.
+ *
+ * @param lowerLeftYValue New value of property lowerLeftY.
+ */
+ public void setLowerLeftY(float lowerLeftYValue)
+ {
+ this.lowerLeftY = lowerLeftYValue;
+ }
+
+ /**
+ * Getter for property upperRightX.
+ *
+ * @return Value of property upperRightX.
+ */
+ public float getUpperRightX()
+ {
+ return upperRightX;
+ }
+
+ /**
+ * Setter for property upperRightX.
+ *
+ * @param upperRightXValue New value of property upperRightX.
+ */
+ public void setUpperRightX(float upperRightXValue)
+ {
+ this.upperRightX = upperRightXValue;
+ }
+
+ /**
+ * Getter for property upperRightY.
+ *
+ * @return Value of property upperRightY.
+ */
+ public float getUpperRightY()
+ {
+ return upperRightY;
+ }
+
+ /**
+ * Setter for property upperRightY.
+ *
+ * @param upperRightYValue New value of property upperRightY.
+ */
+ public void setUpperRightY(float upperRightYValue)
+ {
+ this.upperRightY = upperRightYValue;
+ }
+
+ /**
+ * This will get the width of this rectangle as calculated by
+ * upperRightX - lowerLeftX.
+ *
+ * @return The width of this rectangle.
+ */
+ public float getWidth()
+ {
+ return getUpperRightX() - getLowerLeftX();
+ }
+
+ /**
+ * This will get the height of this rectangle as calculated by
+ * upperRightY - lowerLeftY.
+ *
+ * @return The height of this rectangle.
+ */
+ public float getHeight()
+ {
+ return getUpperRightY() - getLowerLeftY();
+ }
+
+ /**
+ * Checks if a point is inside this rectangle.
+ *
+ * @param x The x coordinate.
+ * @param y The y coordinate.
+ *
+ * @return true If the point is on the edge or inside the rectangle bounds.
+ */
+ public boolean contains( float x, float y )
+ {
+ return x >= lowerLeftX && x <= upperRightX &&
+ y >= lowerLeftY && y <= upperRightY;
+ }
+
+ /**
+ * Checks if a point is inside this rectangle.
+ *
+ * @param point The point to check
+ *
+ * @return true If the point is on the edge or inside the rectangle bounds.
+ */
+ public boolean contains( Point point )
+ {
+ return contains( (float)point.getX(), (float)point.getY() );
+ }
+
+ /**
+ * This will return a string representation of this rectangle.
+ *
+ * @return This object as a string.
+ */
+ public String toString()
+ {
+ return "[" + getLowerLeftX() + "," + getLowerLeftY() + "," +
+ getUpperRightX() + "," + getUpperRightY() +"]";
+ }
+
+}
\ No newline at end of file
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/ResourceLoader.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/ResourceLoader.java?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/ResourceLoader.java (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/ResourceLoader.java Tue Jul 22 10:20:54 2008
@@ -0,0 +1,163 @@
+/**
+ * Copyright (c) 2003-2006, www.fontbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.pdfbox.org
+ */
+package org.fontbox.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+
+import java.util.Properties;
+
+/**
+ * This class will handle loading resource files(AFM/CMAP). This was originally
+ * written for PDFBox but FontBox uses it as well. For now each project will
+ * have their own version.
+ *
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResourceLoader
+{
+
+ /**
+ * private constructor for utility class.
+ */
+ private ResourceLoader()
+ {
+ //private utility class
+ }
+
+ /**
+ * This will attempt to load the resource given the resource name.
+ *
+ * @param resourceName The resource to try and load.
+ *
+ * @return The resource as a stream or null if it could not be found.
+ *
+ * @throws IOException If there is an error while attempting to load the resource.
+ */
+ public static InputStream loadResource( String resourceName ) throws IOException
+ {
+ ClassLoader loader = ResourceLoader.class.getClassLoader();
+
+ InputStream is = null;
+
+ if( loader != null )
+ {
+ is = loader.getResourceAsStream( resourceName );
+ }
+
+ //see sourceforge bug 863053, this is a fix for a user that
+ //needed to have PDFBox loaded by the bootstrap classloader
+ if( is == null )
+ {
+ loader = ClassLoader.getSystemClassLoader();
+ if( loader != null )
+ {
+ is = loader.getResourceAsStream( resourceName );
+ }
+ }
+
+ if( is == null )
+ {
+ File f = new File( resourceName );
+ if( f.exists() )
+ {
+ is = new FileInputStream( f );
+ }
+ }
+
+ return is;
+ }
+
+ /**
+ * This will attempt to load the resource given the resource name.
+ *
+ * @param resourceName The resource to try and load.
+ *
+ * @return The resource as a stream or null if it could not be found.
+ *
+ * @throws IOException If there is an error loading the properties.
+ */
+ public static Properties loadProperties( String resourceName ) throws IOException
+ {
+ Properties properties = null;
+ InputStream is = null;
+ try
+ {
+ is = loadResource( resourceName );
+ if( is != null )
+ {
+ properties = new Properties();
+ properties.load( is );
+ }
+ }
+ finally
+ {
+ if( is != null )
+ {
+ is.close();
+ }
+ }
+ return properties;
+ }
+
+ /**
+ * This will attempt to load the resource given the resource name.
+ *
+ * @param resourceName The resource to try and load.
+ * @param defaults A stream of default properties.
+ *
+ * @return The resource as a stream or null if it could not be found.
+ *
+ * @throws IOException If there is an error loading the properties.
+ */
+ public static Properties loadProperties( String resourceName, Properties defaults ) throws IOException
+ {
+ InputStream is = null;
+ try
+ {
+ is = loadResource( resourceName );
+ if( is != null )
+ {
+ defaults.load( is );
+ }
+ }
+ finally
+ {
+ if( is != null )
+ {
+ is.close();
+ }
+ }
+ return defaults;
+ }
+}
\ No newline at end of file
Added: incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/package.html
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/package.html?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/package.html (added)
+++ incubator/pdfbox/trunk/fontbox/src/org/fontbox/util/package.html Tue Jul 22 10:20:54 2008
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+
+</head>
+<body>
+This package contains utility classes used by various font types.
+</body>
+</html>
Added: incubator/pdfbox/trunk/fontbox/website/.cvsignore
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/.cvsignore?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/.cvsignore (added)
+++ incubator/pdfbox/trunk/fontbox/website/.cvsignore Tue Jul 22 10:20:54 2008
@@ -0,0 +1 @@
+build
Added: incubator/pdfbox/trunk/fontbox/website/cli.xconf
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/cli.xconf?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/cli.xconf (added)
+++ incubator/pdfbox/trunk/fontbox/website/cli.xconf Tue Jul 22 10:20:54 2008
@@ -0,0 +1,312 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--+
+ | This is the Apache Cocoon command line configuration file.
+ | Here you give the command line interface details of where
+ | to find various aspects of your Cocoon installation.
+ |
+ | If you wish, you can also use this file to specify the URIs
+ | that you wish to generate.
+ |
+ | The current configuration information in this file is for
+ | building the Cocoon documentation. Therefore, all links here
+ | are relative to the build context dir, which, in the build.xml
+ | file, is set to ${build.context}
+ |
+ | Options:
+ | verbose: increase amount of information presented
+ | to standard output (default: false)
+ | follow-links: whether linked pages should also be
+ | generated (default: true)
+ | precompile-only: precompile sitemaps and XSP pages, but
+ | do not generate any pages (default: false)
+ | confirm-extensions: check the mime type for the generated page
+ | and adjust filename and links extensions
+ | to match the mime type
+ | (e.g. text/html->.html)
+ |
+ | Note: Whilst using an xconf file to configure the Cocoon
+ | Command Line gives access to more features, the use of
+ | command line parameters is more stable, as there are
+ | currently plans to improve the xconf format to allow
+ | greater flexibility. If you require a stable and
+ | consistent method for accessing the CLI, it is recommended
+ | that you use the command line parameters to configure
+ | the CLI. See documentation at:
+ | /userdocs/offline/index.html and Wiki:CommandLine
+ |
+ +-->
+
+<cocoon verbose="true"
+ follow-links="true"
+ precompile-only="false"
+ confirm-extensions="false">
+
+ <!--+
+ | The context directory is usually the webapp directory
+ | containing the sitemap.xmap file.
+ |
+ | The config file is the cocoon.xconf file.
+ |
+ | The work directory is used by Cocoon to store temporary
+ | files and cache files.
+ |
+ | The destination directory is where generated pages will
+ | be written (assuming the 'simple' mapper is used, see
+ | below)
+ +-->
+ <context-dir>.</context-dir>
+ <config-file>WEB-INF/cocoon.xconf</config-file>
+ <work-dir>../tmp/cocoon-work</work-dir>
+ <dest-dir>../site</dest-dir>
+
+ <!--+
+ | A checksum file can be used to store checksums for pages
+ | as they are generated. When the site is next generated,
+ | files will not be written if their checksum has not changed.
+ | This means that it will be easier to detect which files
+ | need to be uploaded to a server, using the timestamp.
+ +-->
+ <!-- <checksums-uri>build/work/checksums</checksums-uri>-->
+
+ <!--+
+ | Broken link reporting options:
+ | Report into a text file, one link per line:
+ | <broken-links type="text" report="filename"/>
+ | Report into an XML file:
+ | <broken-links type="xml" report="filename"/>
+ | Ignore broken links (default):
+ | <broken-links type="none"/>
+ |
+ | Two attributes to this node specify whether a page should
+ | be generated when an error has occured. 'generate' specifies
+ | whether a page should be generated (default: true) and
+ | extension specifies an extension that should be appended
+ | to the generated page's filename (default: none)
+ |
+ | Using this, a quick scan through the destination directory
+ | will show broken links, by their filename extension.
+ +-->
+ <broken-links type="xml"
+ file="../brokenlinks.xml"
+ generate="false"
+ extension=".error"/>
+
+ <!--+
+ | Load classes at startup. This is necessary for generating
+ | from sites that use SQL databases and JDBC.
+ | The <load-class> element can be repeated if multiple classes
+ | are needed.
+ +-->
+ <!--
+ <load-class>org.firebirdsql.jdbc.Driver</load-class>
+ -->
+
+ <!--+
+ | Configures logging.
+ | The 'log-kit' parameter specifies the location of the log kit
+ | configuration file (usually called logkit.xconf.
+ |
+ | Logger specifies the logging category (for all logging prior
+ | to other Cocoon logging categories taking over)
+ |
+ | Available log levels are:
+ | DEBUG: prints all level of log messages.
+ | INFO: prints all level of log messages except DEBUG
+ | ones.
+ | WARN: prints all level of log messages except DEBUG
+ | and INFO ones.
+ | ERROR: prints all level of log messages except DEBUG,
+ | INFO and WARN ones.
+ | FATAL_ERROR: prints only log messages of this level
+ +-->
+ <!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
+
+ <!--+
+ | Specifies the filename to be appended to URIs that
+ | refer to a directory (i.e. end with a forward slash).
+ +-->
+ <default-filename>index.html</default-filename>
+
+ <!--+
+ | Specifies a user agent string to the sitemap when
+ | generating the site.
+ |
+ | A generic term for a web browser is "user agent". Any
+ | user agent, when connecting to a web server, will provide
+ | a string to identify itself (e.g. as Internet Explorer or
+ | Mozilla). It is possible to have Cocoon serve different
+ | content depending upon the user agent string provided by
+ | the browser. If your site does this, then you may want to
+ | use this <user-agent> entry to provide a 'fake' user agent
+ | to Cocoon, so that it generates the correct version of your
+ | site.
+ |
+ | For most sites, this can be ignored.
+ +-->
+ <!--
+ <user-agent>Cocoon Command Line Environment 2.1</user-agent>
+ -->
+
+ <!--+
+ | Specifies an accept string to the sitemap when generating
+ | the site.
+ | User agents can specify to an HTTP server what types of content
+ | (by mime-type) they are able to receive. E.g. a browser may be
+ | able to handle jpegs, but not pngs. The HTTP accept header
+ | allows the server to take the browser's capabilities into account,
+ | and only send back content that it can handle.
+ |
+ | For most sites, this can be ignored.
+ +-->
+
+ <accept>*/*</accept>
+
+ <!--+
+ | Specifies which URIs should be included or excluded, according
+ | to wildcard patterns.
+ |
+ | These includes/excludes are only relevant when you are following
+ | links. A link URI must match an include pattern (if one is given)
+ | and not match an exclude pattern, if it is to be followed by
+ | Cocoon. It can be useful, for example, where there are links in
+ | your site to pages that are not generated by Cocoon, such as
+ | references to api-documentation.
+ |
+ | By default, all URIs are included. If both include and exclude
+ | patterns are specified, a URI is first checked against the
+ | include patterns, and then against the exclude patterns.
+ |
+ | Multiple patterns can be given, using muliple include or exclude
+ | nodes.
+ |
+ | The order of the elements is not significant, as only the first
+ | successful match of each category is used.
+ |
+ | Currently, only the complete source URI can be matched (including
+ | any URI prefix). Future plans include destination URI matching
+ | and regexp matching. If you have requirements for these, contact
+ | dev@cocoon.apache.org.
+ +-->
+
+ <exclude pattern="**/"/>
+ <exclude pattern="**apidocs**"/>
+ <exclude pattern="**javadoc**"/>
+ <exclude pattern="api/**"/>
+ <exclude pattern="**/images/**"/>
+
+ <exclude pattern="site:**"/>
+ <exclude pattern="ext:**"/>
+
+ <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
+ <exclude pattern="[preferred]/**"/>
+ <exclude pattern="[location]"/>
+
+ <!-- <include-links extension=".html"/>-->
+
+ <!--+
+ | <uri> nodes specify the URIs that should be generated, and
+ | where required, what should be done with the generated pages.
+ | They describe the way the URI of the generated file is created
+ | from the source page's URI. There are three ways that a generated
+ | file URI can be created: append, replace and insert.
+ |
+ | The "type" attribute specifies one of (append|replace|insert):
+ |
+ | append:
+ | Append the generated page's URI to the end of the source URI:
+ |
+ | <uri type="append" src-prefix="documents/" src="index.html"
+ | dest="build/dest/"/>
+ |
+ | This means that
+ | (1) the "documents/index.html" page is generated
+ | (2) the file will be written to "build/dest/documents/index.html"
+ |
+ | replace:
+ | Completely ignore the generated page's URI - just
+ | use the destination URI:
+ |
+ | <uri type="replace" src-prefix="documents/" src="index.html"
+ | dest="build/dest/docs.html"/>
+ |
+ | This means that
+ | (1) the "documents/index.html" page is generated
+ | (2) the result is written to "build/dest/docs.html"
+ | (3) this works only for "single" pages - and not when links
+ | are followed
+ |
+ | insert:
+ | Insert generated page's URI into the destination
+ | URI at the point marked with a * (example uses fictional
+ | zip protocol)
+ |
+ | <uri type="insert" src-prefix="documents/" src="index.html"
+ | dest="zip://*.zip/page.html"/>
+ |
+ | This means that
+ | (1)
+ |
+ | In any of these scenarios, if the dest attribute is omitted,
+ | the value provided globally using the <dest-dir> node will
+ | be used instead.
+ +-->
+ <!--
+ <uri type="replace"
+ src-prefix="samples/"
+ src="hello-world/hello.html"
+ dest="build/dest/hello-world.html"/>
+ -->
+
+ <!--+
+ | <uri> nodes can be grouped together in a <uris> node. This
+ | enables a group of URIs to share properties. The following
+ | properties can be set for a group of URIs:
+ | * follow-links: should pages be crawled for links
+ | * confirm-extensions: should file extensions be checked
+ | for the correct mime type
+ | * src-prefix: all source URIs should be
+ | pre-pended with this prefix before
+ | generation. The prefix is not
+ | included when calculating the
+ | destination URI
+ | * dest: the base destination URI to be
+ | shared by all pages in this group
+ | * type: the method to be used to calculate
+ | the destination URI. See above
+ | section on <uri> node for details.
+ |
+ | Each <uris> node can have a name attribute. When a name
+ | attribute has been specified, the -n switch on the command
+ | line can be used to tell Cocoon to only process the URIs
+ | within this URI group. When no -n switch is given, all
+ | <uris> nodes are processed. Thus, one xconf file can be
+ | used to manage multiple sites.
+ +-->
+ <!--
+ <uris name="mirrors" follow-links="false">
+ <uri type="append" src="mirrors.html"/>
+ </uris>
+ -->
+
+ <!--+
+ | File containing URIs (plain text, one per line).
+ +-->
+ <!--
+ <uri-file>uris.txt</uri-file>
+ -->
+</cocoon>
Added: incubator/pdfbox/trunk/fontbox/website/forrest.properties
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/forrest.properties?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/forrest.properties (added)
+++ incubator/pdfbox/trunk/fontbox/website/forrest.properties Tue Jul 22 10:20:54 2008
@@ -0,0 +1,166 @@
+# Copyright 2002-2005 The Apache Software Foundation or its licensors,
+# as applicable.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+##############
+# These are the defaults, un-comment them only if you need to change them.
+#
+# You can even have a completely empty file, to assist with maintenance.
+# The file obtained from 'forrest seed-sample' shows the defaults.
+##############
+
+# Prints out a summary of Forrest settings for this project
+#forrest.echo=true
+
+# Project name (used to name .war file)
+#project.name=my-project
+
+# Specifies name of Forrest skin to use
+# See list at http://forrest.apache.org/docs/skins.html
+#project.skin=pelt
+
+# codename: Dispatcher
+# uncomment the following skin
+#project.skin=leather-dev
+# Dispatcher is using a fallback mechanism for theming.
+# You can configure the theme name and its extension here
+#project.theme-extension=.fv
+#project.theme=pelt
+
+
+# Descriptors for plugins and skins
+# comma separated list, file:// is supported
+#forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml
+#forrest.plugins.descriptors=http://forrest.apache.org/plugins/plugins.xml,http://forrest.apache.org/plugins/whiteboard-plugins.xml
+
+##############
+# behavioural properties
+#project.menu-scheme=tab_attributes
+#project.menu-scheme=directories
+
+##############
+# layout properties
+
+# Properties that can be set to override the default locations
+#
+# Parent properties must be set. This usually means uncommenting
+# project.content-dir if any other property using it is uncommented
+
+
+project.configfile=${project.home}/cli.xconf
+#project.status=status.xml
+#project.content-dir=src/documentation
+#project.raw-content-dir=${project.content-dir}/content
+#project.conf-dir=${project.content-dir}/conf
+#project.sitemap-dir=${project.content-dir}
+#project.xdocs-dir=${project.content-dir}/content/xdocs
+#project.resources-dir=${project.content-dir}/resources
+#project.stylesheets-dir=${project.resources-dir}/stylesheets
+#project.images-dir=${project.resources-dir}/images
+#project.schema-dir=${project.resources-dir}/schema
+#project.skins-dir=${project.content-dir}/skins
+#project.skinconf=${project.content-dir}/skinconf.xml
+#project.lib-dir=${project.content-dir}/lib
+#project.classes-dir=${project.content-dir}/classes
+#project.translations-dir=${project.content-dir}/translations
+
+#project.build-dir=${project.home}/build
+#project.site=site
+#project.site-dir=${project.build-dir}/${project.site}
+#project.temp-dir=${project.build-dir}/tmp
+
+##############
+# Cocoon catalog entity resolver properties
+# A local OASIS catalog file to supplement the default Forrest catalog
+#project.catalog=${project.schema-dir}/catalog.xcat
+
+##############
+# validation properties
+
+# This set of properties determine if validation is performed
+# Values are inherited unless overridden.
+# e.g. if forrest.validate=false then all others are false unless set to true.
+#forrest.validate=false
+forrest.validate.xdocs=false
+#forrest.validate.skinconf=${forrest.validate}
+#forrest.validate.sitemap=${forrest.validate}
+#forrest.validate.stylesheets=${forrest.validate}
+#forrest.validate.skins=${forrest.validate}
+#forrest.validate.skins.stylesheets=${forrest.validate.skins}
+
+# *.failonerror=(true|false) - stop when an XML file is invalid
+#forrest.validate.failonerror=false
+
+# *.excludes=(pattern) - comma-separated list of path patterns to not validate
+# Note: If you do add an "excludes" list then you need to specify site.xml too.
+# e.g.
+#forrest.validate.xdocs.excludes=site.xml, samples/subdir/**, samples/faq.xml
+#forrest.validate.xdocs.excludes=site.xml
+
+
+##############
+# General Forrest properties
+
+# The URL to start crawling from
+#project.start-uri=linkmap.html
+
+# Set logging level for messages printed to the console
+# (DEBUG, INFO, WARN, ERROR, FATAL_ERROR)
+#project.debuglevel=ERROR
+
+# Max memory to allocate to Java
+#forrest.maxmemory=64m
+
+# Any other arguments to pass to the JVM. For example, to run on an X-less
+# server, set to -Djava.awt.headless=true
+#forrest.jvmargs=
+
+# The bugtracking URL - the issue number will be appended
+# Projects would use their own issue tracker, of course.
+#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
+#project.bugtracking-url=http://issues.apache.org/jira/browse/
+
+# The issues list as rss
+#project.issues-rss-url=
+
+#I18n Property. Based on the locale request for the browser.
+#If you want to use it for static site then modify the JVM system.language
+# and run once per language
+#project.i18n=false
+
+# The names of plugins that are required to build the project
+# comma separated list (no spaces)
+# You can request a specific version by appending "-VERSION" to the end of
+# the plugin name. If you exclude a version number, the latest released version
+# will be used. However, be aware that this may be a development version. In
+# a production environment it is recommended that you specify a known working
+# version.
+# Run "forrest available-plugins" for a list of plug-ins currently available.
+project.required.plugins=org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.input.projectInfo
+
+projectInfo.changes.includeCommitterList=false
+projectInfo.changes.includeContributorList=false
+projectInfo.changes.sort=false
+projectInfo.url=http://www.fontbox.org/
+
+# codename: Dispatcher
+# Add the following plugins to project.required.plugins:
+#org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.themer,org.apache.forrest.plugin.internal.structurer
+
+# Proxy configuration
+# - proxy.user and proxy.password are only needed if the proxy is an authenticated one...
+# proxy.host=myproxy.myhost.com
+# proxy.port=<ProxyPort>
+# proxy.user=<login, if authenticated proxy>
+# proxy.password=<password, if authenticated proxy>
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/classes/CatalogManager.properties
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/classes/CatalogManager.properties?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/classes/CatalogManager.properties (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/classes/CatalogManager.properties Tue Jul 22 10:20:54 2008
@@ -0,0 +1,57 @@
+# Copyright 2002-2005 The Apache Software Foundation or its licensors,
+# as applicable.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#=======================================================================
+# CatalogManager.properties for Catalog Entity Resolver.
+#
+# This is the default properties file for your project.
+# This facilitates local configuration of application-specific catalogs.
+# If you have defined any local catalogs, then they will be loaded
+# before Forrest's core catalogs.
+#
+# See the Apache Forrest documentation:
+# http://forrest.apache.org/docs/your-project.html
+# http://forrest.apache.org/docs/validation.html
+
+# verbosity:
+# The level of messages for status/debug (messages go to standard output).
+# The setting here is for your own local catalogs.
+# The verbosity of Forrest's core catalogs is controlled via
+# main/webapp/WEB-INF/cocoon.xconf
+#
+# The following messages are provided ...
+# 0 = none
+# 1 = ? (... not sure yet)
+# 2 = 1+, Loading catalog, Resolved public, Resolved system
+# 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
+# 10 = 3+, List all catalog entries when loading a catalog
+# (Cocoon also logs the "Resolved public" messages.)
+verbosity=1
+
+# catalogs ... list of additional catalogs to load
+# (Note that Apache Forrest will automatically load its own default catalog
+# from main/webapp/resources/schema/catalog.xcat)
+# Use either full pathnames or relative pathnames.
+# pathname separator is always semi-colon (;) regardless of operating system
+# directory separator is always slash (/) regardless of operating system
+catalogs=../resources/schema/catalog.xcat
+
+# relative-catalogs
+# If false, relative catalog URIs are made absolute with respect to the
+# base URI of the CatalogManager.properties file. This setting only
+# applies to catalog URIs obtained from the catalogs property in the
+# CatalogManager.properties file
+# Example: relative-catalogs=[yes|no]
+relative-catalogs=no
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/donations.xml
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/donations.xml?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/donations.xml (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/donations.xml Tue Jul 22 10:20:54 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>FontBox - Donations</title>
+ </header>
+ <body>
+ <section>
+ <title>Donations</title>
+ <p>FontBox is free software, if have found it useful or has saved you money over a commercial alternative then consider making a donation to the project.
+ Donations help keep the project active and support development of new features.<br /><br />
+
+ There are many ways that you can donate to the FontBox project, below are some suggested ways:
+ </p>
+ <table>
+ <tr>
+ <th>Donation</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><a href="http://partners.adobe.com/public/asn/developer/detail.html">ASN Membership</a></td>
+ <td>The Adobe Solutions Network allows for insider information to Adobe products, which can
+ help implement new features in PDFBox. This will also allow PDFBox be listed as a partner
+ on Adobe's site which will increase the user community of PDFBox.
+ Please contact <a href="mailto:ben@benlitchfield.com">Ben</a> to make arrangements.</td>
+ </tr>
+ <tr>
+ <td>Adobe® Acrobat 7.0 Professional</td>
+ <td>In order for PDFBox to produce correct results it is sometimes necessary to create a PDF using an Adobe tool
+ and then compare the results with what PDFBox produced. The 7.0 product suite contains lots of useful features
+ that would be nice to be able to verify against PDFBox. Amazon currently lists this as $409, but may be cheaper else where.
+ Please contact <a href="mailto:ben@benlitchfield.com">Ben</a> to make arrangements.(Legal donations only please)
+ </td>
+ </tr>
+ <tr>
+ <td>SourceForge subscription</td>
+ <td>An annual SF subscription is currently $40 and provides some niceties for PDFBox developers.
+ Please contact <a href="mailto:ben@benlitchfield.com">Ben</a> to make arrangements.</td>
+ </tr>
+ <tr>
+ <td>Monetary</td>
+ <td>Monetary donations are also gladly accepted. There are two ways to donate to the PDFBox project:<br/>
+ Donate via SourceForge <a href="http://sourceforge.net/donate/index.php?group_id=78314"><img src="http://sourceforge.net/images/project-support.jpg" width="88" height="32" border="0" alt="Support This Project" /></a><br/>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ <input type="hidden" name="cmd" value="_s-xclick" />
+ Donate directly <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
+ <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIG7QYJKoZIhvcNAQcEoIIG3jCCBtoCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCaEMwJn673BJD4txKPf67fhwWoUcQHmRKm7/iyFmrGbUzMWPM9Ca+hXlDrooam2gw/xPfXe0mr/VeHovtFAYYacsiXNyo5f0uIwo/PKn0SOMUuwZyxQZzjfOAZvXM1k2Vhdv1rx9qKsvWlIpnUelmndqtBSmWju1JhXXBDd8u4QTELMAkGBSsOAwIaBQAwawYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAhyRthYJRzV9IBI1B2NmUxenyyWjGQ00HoG54F3btuSVTZ7fK6IwWWoOAlQdS2xP7lrSrb2QQ8e6bv4i21gmmH1OayXGtN4idaAARJwmw6ipRb/oIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQ
YDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXc
xFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDUwMjIzMjA1ODQ2WjAjBgkqhkiG9w0BCQQxFgQU/lmWm6AVi31YBGb3tzvmNgq5nZ4wDQYJKoZIhvcNAQEBBQAEgYB+YX/AiRHTS3V2oQs94AtCRGKn20f+90DI5pp7rL1+delHFXChWz298xs+eOJkpKTCVt4eGiiGaJzVijSbHLtRt0QIiRuoamTlXcFUYp1kgXjgNU7fq8q8Co8prodcwQK81CGg8uQqUVWwEx1FZS6WfWalScGGdRP/qfTXVpxGFQ==-----END PKCS7-----
+ " />
+ </form>
+ Cash donations will be used for
+ <ul>
+ <li>Project expenses such as domain registration and web hosting</li>
+ <li>Perks for the developers to keep them motivated and fed</li>
+ <li>Marketing materials such as brochures/stickers/posters</li>
+ <li>Expenses for participation at PDF related trade shows and conferences</li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.gif
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.gif?rev=678810&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.png
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.png?rev=678810&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/Logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/group.svg
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/group.svg?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/group.svg (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/images/group.svg Tue Jul 22 10:20:54 2008
@@ -0,0 +1,81 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ SVG Anteater logo
+
+To get started with SVG, I'd recommend getting the Adobe SVG plugin, and the
+xml-batik CVS module. Then have a look at the xml-batik/samples files. Use the
+SVG spec (http://www.w3.org/TR/SVG/) as a reference.
+-->
+
+<!-- See Forrest Issue: FOR-229
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"
+[
+ <!ATTLIST svg xmlns:for CDATA #FIXED "http://apache.org/forrest">
+ <!ENTITY % textExt "|for:group-name">
+ <!ELEMENT for:group-name (#PCDATA)>
+]>
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xsl:version="1.0"
+ xmlns:for="http://apache.org/forrest"
+ width="220" height="65" >
+ <title>Anteater logo</title>
+
+ <defs>
+
+ <!--
+ <radialGradient id="radialGradient">
+ <stop style="stop-color:gold" offset="0"/>
+ <stop style="stop-color:orange" offset=".5"/>
+ <stop style="stop-color:crimson" offset="1"/>
+ </radialGradient>
+ <linearGradient id="linearGradient">
+ <stop style="stop-color:gold" offset="0"/>
+ <stop style="stop-color:orange" offset=".5"/>
+ <stop style="stop-color:crimson" offset="1"/>
+ </linearGradient>
+ -->
+
+ <linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
+ <stop style="stop-color:white" offset="0"/>
+ <stop style="stop-color:lightgreen" offset="1"/>
+ </linearGradient>
+
+ <filter id="shadowFilter" filterUnits="objectBoundingBox">
+ <!-- Takes the alpha channel (black outline of the text), blurs it and saves as 'blur' -->
+ <feGaussianBlur in="SourceAlpha" stdDeviation="2 2" result="blur"/>
+ <!-- Takes saved 'blur' and offsets it by 4 pixels, saves as 'offsetBlur' -->
+ <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+ <!-- Merges SourceGraphic (original image) and 'offsetBlur', putting the
+ former 'over' the latter, and using the merged result as the finished
+ image -->
+ <feComposite in="SourceGraphic" in2="offsetBlur" operator="over"/>
+ </filter>
+
+ </defs>
+
+ <g filter="url(#shadowFilter)" fill="url(#gradient)">
+ <text x="40%" y="60%" style="font-size:24pt; font-family:Verdana ; text-anchor: middle">
+ <for:group-name />
+ </text>
+ </g>
+</svg>
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/index.xml?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/index.xml (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/index.xml Tue Jul 22 10:20:54 2008
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>FontBox - Java Font Library</title>
+ <meta name="keywords">Java Font Library, pdfbox, java font</meta>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>FontBox is a Java font library used to obtain low level information from font files.</p>
+ </section>
+ </body>
+</document>
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/license.xml
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/license.xml?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/license.xml (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/license.xml Tue Jul 22 10:20:54 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>FontBox License - Java Font Library</title>
+ <meta name="keywords">Java Font Library, fontbox, font, type 1, adobe, Ben Litchfield, License</meta>
+ </header>
+ <body>
+ <section>
+ <title>License</title>
+ <p>
+ FontBox is licensed under the BSD License.
+ </p>
+ <table width="300px"><tr><td>
+ <pre>
+Copyright (c) 2006-2007, www.fontbox.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of pdfbox; nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ </pre></td></tr></table>
+ </section>
+ </body>
+</document>
Added: incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/references.xml
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/references.xml?rev=678810&view=auto
==============================================================================
--- incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/references.xml (added)
+++ incubator/pdfbox/trunk/fontbox/website/src/documentation/content/xdocs/references.xml Tue Jul 22 10:20:54 2008
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>FontBox - References</title>
+ </header>
+ <body>
+ <section>
+ <title>FontBox References</title>
+ <p>
+ This page lists projects that utilize FontBox and articles that have been written about fontBox.
+ Send <a href="mailto:ben@benlitchfield.com">me</a> an e-mail if your article
+ or project is missing.
+ </p>
+ </section>
+ <section>
+ <title>Projects</title>
+ <p><br/></p>
+ <table>
+ <tr>
+ <th>Project Name</th>
+ <th>License</th>
+ <th>Project Description</th>
+ </tr>
+ <tr>
+ <td><a href="http://www.pdfbox.org">PDFBox</a></td>
+ <td>BSD</td>
+ <td>PDFBox is a Java PDF Library, it utilizes FontBox for all font functionality.</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Articles/Books</title>
+ <p><br/></p>
+ <table>
+ <tr>
+ <th width="250px">Article Name</th>
+ <th>Article Abstract</th>
+ </tr>
+ <tr>
+ <td colspan="2"><center><i>No Articles at this time</i></center></td>
+ </tr>
+ </table>
+ </section>
+ </body>
+</document>
\ No newline at end of file