cvs commit: xml-fop/src/org/apache/fop/fonts/apps PFMReader.java TTFReader.java

2002-12-02 Thread jeremias
jeremias2002/12/02 06:27:58

  Modified:src/org/apache/fop/fonts Glyphs.java TTFFile.java
   src/org/apache/fop/fonts/apps PFMReader.java TTFReader.java
  Removed: src/org/apache/fop/fonts PFMFile.java PFMInputStream.java
  Log:
  Moved PFM classes to type1 subpackage
  Style and javadocs
  Remove dependencies on Xerces (using JAXP instead)
  PFMReader uses Avalon Logging
  Setting logger now following Avalon lifecycle
  
  Revision  ChangesPath
  1.9   +45 -29xml-fop/src/org/apache/fop/fonts/Glyphs.java
  
  Index: Glyphs.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/Glyphs.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Glyphs.java   29 Nov 2002 23:18:54 -  1.8
  +++ Glyphs.java   2 Dec 2002 14:27:57 -   1.9
  @@ -1,18 +1,28 @@
   /*
* $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
   
   package org.apache.fop.fonts;
   
  +/**
  + * This class provides a number of constants for glyph management.
  + */
   public class Glyphs {
  -static String notdef = ".notdef";
   
  -static String mac_glyph_names[] = {
  +/**
  + * Glyph name for the "notdef" glyph
  + */
  +public static final String NOTDEF = ".notdef";
  +
  +/**
  + * Glyph names for Mac encoding
  + */
  +public static final String MAC_GLYPH_NAMES[] = {
   /* 0x00 */
  -notdef, ".null", "CR", "space", "exclam", "quotedbl", "numbersign",
  +NOTDEF, ".null", "CR", "space", "exclam", "quotedbl", "numbersign",
   "dollar", "percent", "ampersand", "quotesingle", "parenleft",
   "parenright", "asterisk", "plus", "comma", /* 0x10 */
   "hyphen", "period", "slash", "zero", "one", "two", "three", "four",
  @@ -68,9 +78,12 @@
   "ccaron", "dmacron"
   };
   
  -static String[] tex8r = {
  +/**
  + * Glyph names for tex8r encoding
  + */
  +public static final String[] TEX8R_GLYPH_NAMES = {
   // 0x00
  -".notdef", "dotaccent", "fi", "fl", "fraction", "hungarumlaut",
  +NOTDEF, "dotaccent", "fi", "fl", "fraction", "hungarumlaut",
  "Lslash", "lslash", "ogonek", "ring", ".notdef", "breve",
  "minus", ".notdef", "Zcaron", "zcaron", // 0x10
   "caron", "dotlessi", "dotlessj", "ff", "ffi", "ffl", ".notdef",
  @@ -127,7 +140,7 @@
   /**
* The characters in WinAnsiEncoding
*/
  -public static char[] winAnsiEncoding = {
  +public static final char[] WINANSI_ENCODING = {
   // not used until char 32
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x20
  @@ -143,7 +156,8 @@
'n', 'o', // 0x70
   'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\u007b', '\u007c', 
'\u007d',
'\u007e', '\u2022', // 0x80
  -'\u20ac', '\u2022', '\u201a', '\u0192', '\u201e', '\u2026', '\u2020', 
'\u2021', '\u02c6', '\u2030', '\u0160', '\u2039', '\u0152', '\u2022',
  +'\u20ac', '\u2022', '\u201a', '\u0192', '\u201e', '\u2026', '\u2020',
  + '\u2021', '\u02c6', '\u2030', '\u0160', '\u2039', '\u0152', '\u2022',
'\u017d', '\u2022', // 0x90
   '\u2022', '\u2018', // quoteleft
   '\u2019',   // quoteright
  @@ -158,8 +172,8 @@
'\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab',
'\u00ac', '\u00ad',  '\u00ae', '\u00af', // 0xb0
   '\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4',
  - '\u00b5',  // This is hand-coded, the 
rest is assumption
  -'\u00b6',   // and *might* not be 
correct...
  + '\u00b5',  // This is hand-coded, the rest is 
assumption
  +'\u00b6',   // and *might* not be correct...
   '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd',
'\u00be', '\u00bf', // 0xc0
   '\u00c0', '\u00c1', '\u00c2', '\u00c3', '\u00c4', '\u00c5', // Aring
  @@ -179,8 +193,11 @@
'\u00fc', '\u00fd', '\u00fe', '\u00ff'
   };
   
  -static String[] unicode_glyphs = {
  -  "\u0041", "A",
  +/**
  + * List of unicode glyphs
  + */
  +public static final String[] UNICODE_GLYPHS = {
  +"\u0041", "A",
   "\u00C6", "AE",
   "\u01FC", "AEacute",
   "\uF7E6", "AEsmall",
  @@ -1233,39 +1250

cvs commit: xml-fop/src/org/apache/fop/fonts/apps PFMReader.java TTFReader.java

2001-11-14 Thread keiron

keiron  01/11/14 05:45:45

  Modified:src/org/apache/fop/fo FObj.java FObjMixed.java
PropertyList.java
   src/org/apache/fop/fo/expr PropertyParser.java
   src/org/apache/fop/fo/flow BasicLink.java Block.java
BlockContainer.java ExternalGraphic.java Flow.java
Footnote.java FootnoteBody.java
InstreamForeignObject.java ListBlock.java
ListItem.java ListItemBody.java ListItemLabel.java
Marker.java Table.java TableBody.java
TableCell.java TableRow.java
   src/org/apache/fop/fo/pagination LayoutMasterSet.java
PageSequence.java Root.java SimplePageMaster.java
   src/org/apache/fop/fonts PFMFile.java TTFFile.java
TTFMtxEntry.java
   src/org/apache/fop/fonts/apps PFMReader.java TTFReader.java
  Log:
  changed a few more vector and hastable
  
  Revision  ChangesPath
  1.26  +26 -26xml-fop/src/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- FObj.java 2001/11/11 22:09:37 1.25
  +++ FObj.java 2001/11/14 13:45:44 1.26
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FObj.java,v 1.25 2001/11/11 22:09:37 klease Exp $
  + * $Id: FObj.java,v 1.26 2001/11/14 13:45:44 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -26,8 +26,8 @@
   
   import java.util.Iterator;
   import java.util.ListIterator;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   
   /**
* base class for representation of formatting objects and their processing
  @@ -54,7 +54,7 @@
*/
   protected int marker = START;
   
  -protected Vector children = new Vector();// made public for searching for 
id's
  +protected ArrayList children = new ArrayList();// made public for searching 
for id's
   
   protected boolean isInTableCell = false;
   
  @@ -70,11 +70,11 @@
   public int areasGenerated = 0;
   
   // markers
  -protected Hashtable markers;
  +protected HashMap markers;
   
   public FObj(FONode parent) {
   super(parent);
  -markers = new Hashtable();
  +markers = new HashMap();
   if (parent instanceof FObj)
   this.areaClass = ((FObj)parent).areaClass;
   }
  @@ -127,7 +127,7 @@
   }
   
   protected void addChild(FONode child) {
  -children.addElement(child);
  +children.add(child);
   }
   
   /**
  @@ -165,7 +165,7 @@
   idReferences.removeID(((FObj)this).properties.get("id").getString());
   int numChildren = this.children.size();
   for (int i = 0; i < numChildren; i++) {
  -FONode child = (FONode)children.elementAt(i);
  +FONode child = (FONode)children.get(i);
   if ((child instanceof FObj)) {
   ((FObj)child).removeID(idReferences);
   }
  @@ -213,7 +213,7 @@
   this.isInTableCell = true;
   // made recursive by Eric Schaeffer
   for (int i = 0; i < this.children.size(); i++) {
  -Object obj = this.children.elementAt(i);
  +Object obj = this.children.get(i);
   if(obj instanceof FObj) {
   FObj child = (FObj)obj;
   child.setIsInTableCell();
  @@ -225,7 +225,7 @@
   this.forcedStartOffset = offset; 
   // made recursive by Eric Schaeffer
   for (int i = 0; i < this.children.size(); i++) {
  -Object obj = this.children.elementAt(i);
  +Object obj = this.children.get(i);
   if(obj instanceof FObj) {
   FObj child = (FObj)obj;
   child.forceStartOffset(offset);
  @@ -237,7 +237,7 @@
   this.forcedWidth = width;
   // made recursive by Eric Schaeffer
   for (int i = 0; i < this.children.size(); i++) {
  -Object obj = this.children.elementAt(i);
  +Object obj = this.children.get(i);
   if(obj instanceof FObj) {
   FObj child = (FObj)obj;
   child.forceWidth(width);
  @@ -249,7 +249,7 @@
   this.marker = START;
   int numChildren = this.children.size();
   for (int i = 0; i < numChildren; i++) {
  -Object obj = this.children.elementAt(i);
  +Object obj = this.children.get(i);
   if(obj instanceof FObj) {
   FObj child = (FObj)obj;
   child.re