You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/07/25 14:46:22 UTC
svn commit: r679781 [12/34] - in
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ ...
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/PropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/PropertyMaker.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/PropertyMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/PropertyMaker.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -123,8 +123,8 @@
/**
* Add a enum constant.
- * @param constant the enum constant
- * @param value the Property value to use when the constant is specified
+ * @param constant the enum constant
+ * @param value the Property value to use when the constant is specified
*/
public void addEnum(String constant, Property value) {
if (enums == null) {
@@ -138,16 +138,16 @@
* @param subproperty the PropertyMaker for the subproperty
*/
public void addSubpropMaker(PropertyMaker subproperty) {
- throw new RuntimeException("Unable to add subproperties " + getClass());
+ throw new RuntimeException("Unable to add subproperties " + getClass());
}
/**
- * Return a subproperty maker for the subpropertyId.
- * @param subpropertyId The subpropertyId of the maker.
+ * Return a subproperty maker for the subpropertyId.
+ * @param subpropertyId The subpropertyId of the maker.
* @return The subproperty maker.
*/
public PropertyMaker getSubpropMaker(int subpropertyId) {
- throw new RuntimeException("Unable to add subproperties");
+ throw new RuntimeException("Unable to add subproperties");
}
/**
@@ -155,7 +155,7 @@
* shorthands list. Later the Integers are replaced with references
* to the actual shorthand property makers.
* @param shorthand a property maker thar is that is checked for
- * shorthand values.
+ * shorthand values.
*/
public void addShorthand(PropertyMaker shorthand) {
if (shorthands == null) {
@@ -197,7 +197,7 @@
}
/**
- * Set the percent base identifier for this maker.
+ * Set the percent base identifier for this maker.
* @param percentBase the percent base (ex. LengthBase.FONTSIZE)
*/
public void setPercentBase(int percentBase) {
@@ -205,9 +205,9 @@
}
/**
- * Set the setByShorthand flag which only is applicable for subproperty
- * makers. It should be true for the subproperties which must be
- * assigned a value when the base property is assigned a attribute
+ * Set the setByShorthand flag which only is applicable for subproperty
+ * makers. It should be true for the subproperties which must be
+ * assigned a value when the base property is assigned a attribute
* value directly.
* @param setByShorthand true if this subproperty must be set when the base property is set
*/
@@ -217,7 +217,7 @@
/**
* Set the correspoding property information.
- * @param corresponding a corresponding maker where the
+ * @param corresponding a corresponding maker where the
* isForcedCorresponding and compute methods are delegated to.
*/
public void setCorresponding(CorrespondingPropertyMaker corresponding) {
@@ -225,7 +225,7 @@
}
/**
- * Create a new empty property. Must be overriden in compound
+ * Create a new empty property. Must be overriden in compound
* subclasses.
* @return a new instance of the Property for which this is a maker.
*/
@@ -243,13 +243,13 @@
* @param propertyList the applicable property list
* @param tryInherit true if inherited properties should be examined.
* @return the property value
- * @throws PropertyException if there is a problem evaluating the property
+ * @throws PropertyException if there is a problem evaluating the property
*/
- public Property findProperty(PropertyList propertyList,
+ public Property findProperty(PropertyList propertyList,
boolean tryInherit)
throws PropertyException {
Property p = null;
-
+
if (log.isTraceEnabled()) {
log.trace("PropertyMaker.findProperty: "
+ FOPropertyMapping.getPropertyName(propId)
@@ -267,9 +267,9 @@
p = this.compute(propertyList);
}
}
- if (p == null && tryInherit) {
+ if (p == null && tryInherit) {
// else inherit (if has parent and is inheritable)
- PropertyList parentPropertyList = propertyList.getParentPropertyList();
+ PropertyList parentPropertyList = propertyList.getParentPropertyList();
if (parentPropertyList != null && isInherited()) {
p = parentPropertyList.get(propId, true, false);
}
@@ -287,8 +287,8 @@
* @param propertyList The PropertyList object being built for this FO.
* @param tryInherit true if inherited properties should be examined.
* @param tryDefault true if the default value should be returned.
- * @return the property value
- * @throws PropertyException if there is a problem evaluating the property
+ * @return the property value
+ * @throws PropertyException if there is a problem evaluating the property
*/
public Property get(int subpropertyId, PropertyList propertyList,
boolean tryInherit, boolean tryDefault)
@@ -370,7 +370,7 @@
}
/**
- * Return the default value.
+ * Return the default value.
* @param propertyList The PropertyList object being built for this FO.
* @return the Property object corresponding to the parameters
* @throws PropertyException for invalid or inconsisten FO input
@@ -422,7 +422,7 @@
.getExplicit(getPropId());
if (parentExplicit == null) {
log.warn(FOPropertyMapping.getPropertyName(getPropId())
- + "=\"inherit\" on " + propertyList.getFObj().getName()
+ + "=\"inherit\" on " + propertyList.getFObj().getName()
+ ", but no explicit value found on the parent FO.");
}
}
@@ -436,7 +436,7 @@
newProp = PropertyParser.parse(pvalue,
new PropertyInfo(this,
propertyList));
- }
+ }
if (newProp != null) {
newProp = convertProperty(newProp, propertyList, fo);
}
@@ -475,7 +475,7 @@
/**
* Converts a shorthand property
- *
+ *
* @param propertyList the propertyList for which to convert
* @param prop the shorthand property
* @param fo ...
@@ -538,7 +538,7 @@
* file specifies a length value equivalent for these keywords,
* such as "0.5pt" for "thin".
* @param keyword the string value of property attribute.
- * @return a String containing a parseable equivalent or null if
+ * @return a String containing a parseable equivalent or null if
* the passed value isn't a keyword initializer for this Property
*/
protected String checkValueKeywords(String keyword) {
@@ -549,7 +549,7 @@
}
}
// TODO: should return null here?
- return keyword;
+ return keyword;
}
/**
@@ -642,7 +642,7 @@
}
return null;
}
-
+
/** @return the name of the property this maker is used for. */
public String getName() {
return FOPropertyMapping.getPropertyName(propId);
@@ -650,7 +650,7 @@
/**
* Return a clone of the makers. Used by useGeneric() to clone the
- * subproperty makers of the generic compound makers.
+ * subproperty makers of the generic compound makers.
* {@inheritDoc}
*/
public Object clone() {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ReferenceOrientationMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ReferenceOrientationMaker.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ReferenceOrientationMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ReferenceOrientationMaker.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -35,16 +35,16 @@
public ReferenceOrientationMaker(int propId) {
super(propId);
}
-
+
/**
* Check the value of the reference-orientation property.
- *
- * {@inheritDoc}
+ *
+ * {@inheritDoc}
*/
public Property get(int subpropId, PropertyList propertyList,
- boolean tryInherit, boolean tryDefault)
+ boolean tryInherit, boolean tryDefault)
throws PropertyException {
-
+
Property p = super.get(0, propertyList, tryInherit, tryDefault);
int ro = 0;
if (p != null) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ShorthandParser.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ShorthandParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ShorthandParser.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpaceProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpaceProperty.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpaceProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpaceProperty.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -47,7 +47,7 @@
/**
* Create a new empty instance of SpaceProperty.
- * @return the new instance.
+ * @return the new instance.
*/
public Property makeNewProperty() {
return new SpaceProperty();
@@ -69,7 +69,7 @@
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
@@ -138,10 +138,10 @@
public String toString() {
return "Space[" +
- "min:" + getMinimum(null).getObject() +
- ", max:" + getMaximum(null).getObject() +
- ", opt:" + getOptimum(null).getObject() +
- ", precedence:" + precedence.getObject() +
+ "min:" + getMinimum(null).getObject() +
+ ", max:" + getMaximum(null).getObject() +
+ ", opt:" + getOptimum(null).getObject() +
+ ", precedence:" + precedence.getObject() +
", conditionality:" + conditionality.getObject() + "]";
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -26,7 +26,7 @@
/**
* A maker which creates 'letter-spacing' and 'word-spacing' properties.
- * These two properties properties are standard space properties with
+ * These two properties properties are standard space properties with
* additinal support for the 'normal' enum value.
*/
@@ -42,7 +42,7 @@
/**
* Support for the 'normal' value.
*/
- public Property convertProperty(Property p,
+ public Property convertProperty(Property p,
PropertyList propertyList,
FObj fo) throws PropertyException {
if (p.getEnum() == Constants.EN_NORMAL) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/StringProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/StringProperty.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/StringProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/StringProperty.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -81,13 +81,13 @@
}
}
-
+
/** cache containing all canonical StringProperty instances */
private static final PropertyCache cache = new PropertyCache(StringProperty.class);
-
+
/** canonical instance for empty strings */
public static final StringProperty EMPTY_STRING_PROPERTY = new StringProperty("");
-
+
private final String str;
/**
@@ -99,7 +99,7 @@
}
/**
- * Return the canonical StringProperty instance
+ * Return the canonical StringProperty instance
* corresponding to the given string value
* @param str the base String
* @return the canonical instance
@@ -112,7 +112,7 @@
new StringProperty(str));
}
}
-
+
/** @return the Object equivalent of this property */
public Object getObject() {
return this.str;
@@ -135,7 +135,7 @@
}
return false;
}
-
+
/** {@inheritDoc} */
public int hashCode() {
return str.hashCode();
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -36,10 +36,10 @@
public TableBorderPrecedence(int propId) {
super(propId);
}
-
+
/**
* Set default precedence according to the parent FObj
- *
+ *
* {@inheritDoc}
*/
public Property make(PropertyList propertyList) throws PropertyException {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableColLength.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableColLength.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableColLength.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TableColLength.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -41,7 +41,7 @@
private double tcolUnits;
/**
- * The column the column-units are defined on.
+ * The column the column-units are defined on.
*/
private FObj column;
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/TextDecorationProperty.java Fri Jul 25 05:44:20 2008
@@ -84,7 +84,7 @@
}
return lst;
}
-
+
}
/**
@@ -156,5 +156,5 @@
addProperty(prop);
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/VerticalAlignShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/VerticalAlignShorthandParser.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/VerticalAlignShorthandParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/VerticalAlignShorthandParser.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -23,13 +23,13 @@
/**
* A shorthand parser for the vertical-align shorthand. It is used to set
- * values for alignment-baseline, alignment-adjust, baseline-shift
+ * values for alignment-baseline, alignment-adjust, baseline-shift
* and dominant-baseline.
*/
public class VerticalAlignShorthandParser implements ShorthandParser, Constants {
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public Property getValueForProperty(int propId,
Property property,
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/WhiteSpaceShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/WhiteSpaceShorthandParser.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/WhiteSpaceShorthandParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/WhiteSpaceShorthandParser.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -32,7 +32,7 @@
public class WhiteSpaceShorthandParser implements ShorthandParser {
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public Property getValueForProperty(int propId, Property property,
PropertyMaker maker, PropertyList propertyList)
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java Fri Jul 25 05:44:20 2008
@@ -25,14 +25,14 @@
public class XMLLangShorthandParser extends GenericShorthandParser {
private static final char HYPHEN_MINUS = '-';
-
+
/** {@inheritDoc} */
public Property getValueForProperty(int propId,
Property property,
PropertyMaker maker,
PropertyList propertyList)
throws PropertyException {
-
+
String shorthandValue = property.getString();
int hyphenIndex = shorthandValue.indexOf(HYPHEN_MINUS);
if (propId == Constants.PR_LANGUAGE) {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -38,7 +38,7 @@
private char[] unicodeMap; //code point to Unicode char
private String[] charNameMap; //all character names in the encoding
private Map fallbackMap; //Here we accumulate all mappings we have found through substitution
-
+
/**
* Main constructor.
* @param name the name of the encoding
@@ -140,7 +140,7 @@
bot = mid + 1;
}
}
-
+
//Fallback: using cache
synchronized (this) {
if (fallbackMap != null) {
@@ -164,7 +164,7 @@
}
}
}
-
+
putFallbackCharacter(c, NOT_FOUND_CODE_POINT);
return NOT_FOUND_CODE_POINT;
}
@@ -177,7 +177,7 @@
this.fallbackMap.put(new Character(c), new Character(mapTo));
}
}
-
+
/**
* Returns the main Unicode value that is associated with the given code point in the encoding.
* Note that multiple Unicode values can theoretically be mapped to one code point in the
@@ -200,10 +200,10 @@
System.arraycopy(this.unicodeMap, 0, copy, 0, this.unicodeMap.length);
return copy;
}
-
+
/**
* Returns the index of a character/glyph with the given name. Note that this
- * method is relatively slow and should only be used for fallback operations.
+ * method is relatively slow and should only be used for fallback operations.
* @param charName the character name
* @return the index of the character in the encoding or -1 if it doesn't exist
*/
@@ -219,7 +219,7 @@
}
return -1;
}
-
+
/** {@inheritDoc} */
public String[] getCharNameMap() {
if (this.charNameMap != null) {
@@ -235,7 +235,7 @@
if (c != CharUtilities.NOT_A_CHARACTER) {
String charName = Glyphs.charToGlyphName(c);
if (charName.length() > 0) {
- derived[i] = charName;
+ derived[i] = charName;
}
}
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/BFEntry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/BFEntry.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/BFEntry.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/BFEntry.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
/**
* This is just a holder class for bfentries, groups of characters of a base font (bf).
*/
public class BFEntry {
-
+
private int unicodeStart;
private int unicodeEnd;
private int glyphStartIndex;
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Base14Font.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Base14Font.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Base14Font.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Base14Font.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
/**
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFontType.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFontType.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFontType.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDFontType.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import org.apache.avalon.framework.ValuedEnum;
@@ -59,8 +59,8 @@
throw new IllegalArgumentException("Invalid CID font type: " + name);
}
}
-
-
+
+
/**
* Returns the CID FontType by value.
* @param value Value of the CID font type to look up
@@ -75,5 +75,5 @@
throw new IllegalArgumentException("Invalid CID font type: " + value);
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDSubset.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDSubset.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDSubset.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CIDSubset.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -54,10 +54,10 @@
* usedCharsIndex contains new glyph, original char (char selector -> Unicode)
*/
private Map/*<Integer, Character>*/ usedCharsIndex = new java.util.HashMap();
-
+
public CIDSubset() {
}
-
+
/**
* Adds the initial 3 glyphs which are the same for all CID subsets.
*/
@@ -73,7 +73,7 @@
usedGlyphsIndex.put(new Integer(2), new Integer(2));
usedGlyphsCount++;
}
-
+
/**
* Returns the original index of the glyph inside the (non-subset) font's glyph list. This
* index can be used to access the character width information, for example.
@@ -88,7 +88,7 @@
return -1;
}
}
-
+
/**
* Returns the Unicode value for a subset index (character selector). If there's no such
* Unicode value, the "NOT A CHARACTER" (0xFFFF) is returned.
@@ -103,7 +103,7 @@
return CharUtilities.NOT_A_CHARACTER;
}
}
-
+
/**
* Maps a character to a character selector for a font subset. If the character isn't in the
* subset, yet, it is added and a new character selector returned. Otherwise, the already
@@ -139,7 +139,7 @@
public Map/*<Integer, Integer>*/ getSubsetGlyphs() {
return Collections.unmodifiableMap(this.usedGlyphs);
}
-
+
/**
* Returns a char array containing all Unicode characters that are in the subset.
* @return a char array with all used Unicode characters
@@ -159,7 +159,7 @@
public int getSubsetSize() {
return this.usedGlyphsCount;
}
-
+
/**
* Returns a BitSet with bits set for each available glyph index.
* @return a BitSet indicating available glyph indices
@@ -173,5 +173,5 @@
}
return bitset;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CustomFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CustomFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CustomFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/CustomFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -39,7 +39,7 @@
private String embedFileName = null;
private String embedResourceName = null;
private FontResolver resolver = null;
-
+
private int capHeight = 0;
private int xHeight = 0;
private int ascender = 0;
@@ -72,7 +72,7 @@
public String getFullName() {
return fullName;
}
-
+
/**
* Returns the font family names.
* @return the font family names (a Set of Strings)
@@ -117,7 +117,7 @@
if (resolver != null && embedFileName != null) {
result = resolver.resolve(embedFileName);
if (result == null) {
- throw new IOException("Unable to resolve Source '"
+ throw new IOException("Unable to resolve Source '"
+ embedFileName + "' for embedded font");
}
}
@@ -194,7 +194,7 @@
public int getFlags() {
return flags;
}
-
+
/** {@inheritDoc} */
public boolean isSymbolicFont() {
return ((getFlags() & 4) != 0) || "ZapfDingbatsEncoding".equals(getEncodingName());
@@ -210,7 +210,7 @@
public int getWeight() {
return this.weight;
}
-
+
/**
* {@inheritDoc}
*/
@@ -293,20 +293,20 @@
public void setFullName(String name) {
this.fullName = name;
}
-
+
/** {@inheritDoc} */
public void setFamilyNames(Set names) {
this.familyNames = new java.util.HashSet(names);
}
-
+
/**
* Sets the font's subfamily name.
* @param subFamilyName the subfamily name of the font
*/
public void setFontSubFamilyName(String subFamilyName) {
- this.fontSubName = subFamilyName;
+ this.fontSubName = subFamilyName;
}
-
+
/**
* {@inheritDoc}
*/
@@ -374,7 +374,7 @@
weight = Math.min(900, weight);
this.weight = weight;
}
-
+
/**
* {@inheritDoc}
*/
@@ -439,7 +439,7 @@
}
this.kerning.put(key, value);
}
-
+
/**
* Replaces the existing kerning map with a new one.
* @param kerningMap the kerning map (Map<Integer, Map<Integer, Integer>, the integers are
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Font.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Font.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Font.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Font.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCache.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCache.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCache.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCache.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCollection.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCollection.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCollection.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontCollection.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontDescriptor.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontDescriptor.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventAdapter.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventAdapter.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import java.util.Map;
@@ -32,7 +32,7 @@
public class FontEventAdapter implements FontEventListener {
private EventBroadcaster eventBroadcaster;
-
+
/**
* Creates a new FontEventAdapter.
* @param broadcaster the event broadcaster to send the generated events to
@@ -40,7 +40,7 @@
public FontEventAdapter(EventBroadcaster broadcaster) {
this.eventBroadcaster = broadcaster;
}
-
+
/**
* Returns the event group ID.
* @return the event group ID
@@ -48,7 +48,7 @@
protected String getEventGroupID() {
return getClass().getName();
}
-
+
/** {@inheritDoc} */
public void fontSubstituted(Object source, FontTriplet requested, FontTriplet effective) {
Map params = new java.util.HashMap();
@@ -78,5 +78,5 @@
EventSeverity.WARN, params);
this.eventBroadcaster.broadcastEvent(ev);
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventListener.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventListener.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventListener.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontEventListener.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
@@ -48,5 +48,5 @@
* @param fontName the name of the font
*/
void glyphNotAvailable(Object source, char ch, String fontName);
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontInfo.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontInfo.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -40,8 +40,6 @@
*/
public class FontInfo {
- private static final FontTriplet[] TRIPLETS_TYPE = new FontTriplet[1];
-
/** logging instance */
protected static Log log = LogFactory.getLog(FontInfo.class);
@@ -58,7 +56,7 @@
/** look up a font-name to get a font (that implements FontMetrics at least) */
private Map/*<String,FontMetrics>*/ fonts = null; //(String = font key)
- /**
+ /**
* a collection of missing fonts; used to make sure the user gets
* a warning for a missing font only once (not every time the font is used)
*/
@@ -143,7 +141,7 @@
/**
* Log warning about duplicate font triplets.
- *
+ *
* @param triplet the duplicate font triplet
* @param replacing true iff the new font will replace the old one
* @param oldKey the old internal font name
@@ -188,12 +186,12 @@
* @param family font family
* @param style font style
* @param weight font weight
- * @param substFont true if the font may be substituted with the
+ * @param substitutable true if the font may be substituted with the
* default font if not found
* @return internal font triplet key
*/
private FontTriplet fontLookup(String family, String style,
- int weight, boolean substFont) {
+ int weight, boolean substitutable) {
if (log.isTraceEnabled()) {
log.trace("Font lookup: " + family + " " + style + " " + weight);
}
@@ -203,7 +201,7 @@
// first try given parameters
String internalFontKey = getInternalFontKey(fontTriplet);
if (internalFontKey == null) {
- fontTriplet = fuzzyFontLookup(family, style, weight, startKey, substFont);
+ fontTriplet = fuzzyFontLookup(family, style, weight, startKey, substitutable);
}
if (fontTriplet != null) {
@@ -219,7 +217,7 @@
private FontTriplet fuzzyFontLookup(String family, String style,
int weight, FontTriplet startKey, boolean substFont) {
FontTriplet key;
- String internalFontKey;
+ String internalFontKey = null;
if (!family.equals(startKey.getName())) {
key = createFontKey(family, style, weight);
internalFontKey = getInternalFontKey(key);
@@ -230,7 +228,9 @@
// adjust weight, favouring normal or bold
key = findAdjustWeight(family, style, weight);
- internalFontKey = getInternalFontKey(key);
+ if (key != null) {
+ internalFontKey = getInternalFontKey(key);
+ }
if (!substFont && internalFontKey == null) {
return null;
@@ -317,10 +317,10 @@
Integer size = new Integer(fontSize);
Font font = (Font)sizes.get(size);
if (font == null) {
- String fname = getInternalFontKey(triplet);
- useFont(fname);
- FontMetrics metrics = getMetricsFor(fname);
- font = new Font(fname, triplet, metrics, fontSize);
+ String fontKey = getInternalFontKey(triplet);
+ useFont(fontKey);
+ FontMetrics metrics = getMetricsFor(fontKey);
+ font = new Font(fontKey, triplet, metrics, fontSize);
sizes.put(size, font);
}
return font;
@@ -343,6 +343,19 @@
return fontLookup(family, style, weight, true);
}
+ private List/*<FontTriplet>*/ fontLookup(String[] families, String style,
+ int weight, boolean substitutable) {
+ List matchingTriplets = new java.util.ArrayList();
+ FontTriplet triplet = null;
+ for (int i = 0; i < families.length; i++) {
+ triplet = fontLookup(families[i], style, weight, substitutable);
+ if (triplet != null) {
+ matchingTriplets.add(triplet);
+ }
+ }
+ return matchingTriplets;
+ }
+
/**
* Looks up a set of fonts.
* <br>
@@ -361,27 +374,34 @@
if (families.length == 0) {
throw new IllegalArgumentException("Specify at least one font family");
}
- FontTriplet triplet;
- List tmpTriplets = new java.util.ArrayList();
- for (int i = 0, c = families.length; i < c; i++) {
- triplet = fontLookup(families[i], style, weight, (i >= families.length - 1));
- if (triplet != null) {
- tmpTriplets.add(triplet);
- }
- }
- if (tmpTriplets.size() != 0) {
- return (FontTriplet[]) tmpTriplets.toArray(TRIPLETS_TYPE);
+
+ // try matching without substitutions
+ List/*<FontTriplet>*/ matchedTriplets = fontLookup(families, style, weight, false);
+
+ // if there are no matching font triplets found try with substitutions
+ if (matchedTriplets.size() == 0) {
+ matchedTriplets = fontLookup(families, style, weight, true);
}
- StringBuffer sb = new StringBuffer();
- for (int i = 0, c = families.length; i < c; i++) {
- if (i > 0) {
- sb.append(", ");
+
+ // no matching font triplets found!
+ if (matchedTriplets.size() == 0) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0, c = families.length; i < c; i++) {
+ if (i > 0) {
+ sb.append(", ");
+ }
+ sb.append(families[i]);
}
- sb.append(families[i]);
+ throw new IllegalStateException(
+ "fontLookup must return an array with at least one "
+ + "FontTriplet on the last call. Lookup: " + sb.toString());
+
}
- throw new IllegalStateException(
- "fontLookup must return an array with at least one "
- + "FontTriplet on the last call. Lookup: " + sb.toString());
+ FontTriplet[] fontTriplets = new FontTriplet[matchedTriplets.size()];
+ matchedTriplets.toArray(fontTriplets);
+
+ // found some matching fonts so return them
+ return fontTriplets;
}
private Set/*<FontTriplet>*/ getLoggedFontKeys() {
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -97,7 +97,7 @@
boolean embedded, FontResolver resolver) throws IOException {
return loadFont(fontUrl.toExternalForm(), subFontName, embedded, resolver);
}
-
+
/**
* Loads a custom font from a URI. In the case of Type 1 fonts, the PFB file must be specified.
* @param fontFileURI the URI to the font
@@ -128,14 +128,14 @@
* @throws IOException In case of an I/O error
* @throws MalformedURLException If an invalid URL is built
*/
- public static InputStream openFontUri(FontResolver resolver, String uri)
+ public static InputStream openFontUri(FontResolver resolver, String uri)
throws IOException, MalformedURLException {
InputStream in = null;
if (resolver != null) {
Source source = resolver.resolve(uri);
if (source == null) {
- String err = "Cannot load font: failed to create Source for font file "
- + uri;
+ String err = "Cannot load font: failed to create Source for font file "
+ + uri;
throw new IOException(err);
}
if (source instanceof StreamSource) {
@@ -146,7 +146,7 @@
}
if (in == null) {
String err = "Cannot load font: failed to create InputStream from"
- + " Source for font file " + uri;
+ + " Source for font file " + uri;
throw new IOException(err);
}
} else {
@@ -154,7 +154,7 @@
}
return in;
}
-
+
/**
* Reads/parses the font data.
* @throws IOException In case of an I/O error
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontManagerConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontManagerConfigurator.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontManagerConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontManagerConfigurator.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontMetrics.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontMetrics.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontMetrics.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontMetrics.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import java.util.Map;
@@ -33,31 +33,31 @@
* @return the font name
*/
String getFontName();
-
+
/**
* Returns the font's full name (Example: "Helvetica Bold Oblique").
* @return the font's full name
*/
String getFullName();
-
+
/**
* Returns the font's family names as a Set of Strings (Example: "Helvetica").
* @return the font's family names (a Set of Strings)
*/
Set getFamilyNames();
-
+
/**
* Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").
* @return the name for font embedding
*/
String getEmbedFontName();
-
+
/**
* Returns the type of the font.
* @return the font type
*/
FontType getFontType();
-
+
/**
* Returns the maximum ascent of the font described by this
@@ -66,7 +66,7 @@
* @return ascent in milliponts
*/
int getMaxAscent(int size);
-
+
/**
* Returns the ascent of the font described by this
* FontMetrics object. It returns the nominal ascent within the em box.
@@ -74,15 +74,15 @@
* @return ascent in milliponts
*/
int getAscender(int size);
-
+
/**
* Returns the size of a capital letter measured from the font's baseline.
* @param size font size
* @return height of capital characters
*/
int getCapHeight(int size);
-
-
+
+
/**
* Returns the descent of the font described by this
* FontMetrics object.
@@ -90,8 +90,8 @@
* @return descent in milliponts
*/
int getDescender(int size);
-
-
+
+
/**
* Determines the typical font height of this
* FontMetrics object
@@ -117,17 +117,17 @@
* @return an array of widths
*/
int[] getWidths();
-
+
/**
* Indicates if the font has kering information.
* @return True, if kerning is available.
*/
boolean hasKerningInfo();
-
+
/**
* Returns the kerning map for the font.
* @return the kerning map
*/
Map getKerningInfo();
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontReader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontReader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -154,7 +154,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
@@ -222,7 +222,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void endElement(String uri, String localName, String qName) throws SAXException {
String content = text.toString().trim();
@@ -298,7 +298,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void characters(char[] ch, int start, int length) {
text.append(ch, start, length);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontResolver.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontResolver.java Fri Jul 25 05:44:20 2008
@@ -35,5 +35,5 @@
* @return A Source object, or null if the href could not resolved.
*/
Source resolve(String href);
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSelector.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSelector.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSelector.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSelector.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -54,7 +54,7 @@
/**
* Selects a font which is able to display the given character.
- *
+ *
* @param fobj
* a Character object containing the character and its
* attributes.
@@ -70,7 +70,7 @@
/**
* Selects a font which is able to display the given character.
- *
+ *
* @param c
* character to find.
* @param text
@@ -87,7 +87,7 @@
/**
* Selects a font which is able to display the most of the given characters.
- *
+ *
* @param charSeq
* Text to go through
* @param firstIndex
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSetup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSetup.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSetup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontSetup.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontTriplet.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontTriplet.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontType.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontType.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontType.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontType.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import org.apache.avalon.framework.ValuedEnum;
@@ -82,8 +82,8 @@
throw new IllegalArgumentException("Invalid font type: " + name);
}
}
-
-
+
+
/**
* Returns the FontType by value.
* @param value Value of the font type to look up
@@ -106,5 +106,5 @@
throw new IllegalArgumentException("Invalid font type: " + value);
}
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontUtil.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontUtil.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Glyphs.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Glyphs.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Glyphs.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Glyphs.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
/**
@@ -179,7 +179,7 @@
'\u2022', // bullet
'\u2013', // endash
'\u2014', // emdash
- '~',
+ '~',
'\u2122', // trademark
'\u0161', '\u203a', '\u0153', '\u2022', '\u017e', '\u0178', // 0xA0
' ', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5',
@@ -1276,7 +1276,7 @@
public static final String charToGlyphName(char ch) {
return stringToGlyph(new Character(ch).toString());
}
-
+
/**
* Return the glyphname from a string,
* eg, glyphToString("\\") returns "backslash"
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -40,7 +40,7 @@
public class LazyFont extends Typeface implements FontDescriptor {
private static Log log = LogFactory.getLog(LazyFont.class);
-
+
private String metricsFileName = null;
private String fontEmbedPath = null;
private boolean useKerning = false;
@@ -52,14 +52,14 @@
private FontDescriptor realFontDescriptor = null;
private FontResolver resolver = null;
-
+
/**
* Main constructor
* @param fontInfo the font info to embed
* @param resolver the font resolver to handle font URIs
*/
public LazyFont(EmbedFontInfo fontInfo, FontResolver resolver) {
-
+
this.metricsFileName = fontInfo.getMetricsFile();
this.fontEmbedPath = fontInfo.getEmbedFile();
this.useKerning = fontInfo.getKerning();
@@ -73,7 +73,7 @@
return ( "metrics-url=" + metricsFileName + ", embed-url=" + fontEmbedPath
+ ", kerning=" + useKerning );
}
-
+
private void load(boolean fail) {
if (!isMetricsLoaded) {
try {
@@ -84,8 +84,8 @@
Source source = resolver.resolve(metricsFileName);
if (source == null) {
String err
- = "Cannot load font: failed to create Source from metrics file "
- + metricsFileName;
+ = "Cannot load font: failed to create Source from metrics file "
+ + metricsFileName;
if (fail) {
throw new RuntimeException(err);
} else {
@@ -104,7 +104,7 @@
String err = "Cannot load font: After URI resolution, the returned"
+ " Source object does not contain an InputStream"
+ " or a valid URL (system identifier) for metrics file: "
- + metricsFileName;
+ + metricsFileName;
if (fail) {
throw new RuntimeException(err);
} else {
@@ -113,7 +113,7 @@
return;
}
InputSource src = new InputSource(in);
- src.setSystemId(source.getSystemId());
+ src.setSystemId(source.getSystemId());
reader = new FontReader(src);
} else {
reader = new FontReader(new InputSource(
@@ -182,7 +182,7 @@
load(true);
return realFont.hadMappingOperations();
}
-
+
/**
* {@inheritDoc}
*/
@@ -265,7 +265,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public int getWidth(int i, int size) {
load(true);
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MultiByteFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MultiByteFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MultiByteFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MultiByteFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -30,7 +30,7 @@
private static int uniqueCounter = -1;
private static final DecimalFormat COUNTER_FORMAT = new DecimalFormat("00000");
-
+
private String ttcName = null;
private String encoding = "Identity-H";
@@ -40,7 +40,7 @@
private String namePrefix = null; // Quasi unique prefix
private CIDSubset subset = new CIDSubset();
-
+
/** A map from Unicode indices to glyph indices */
private BFEntry[] bfentries = null;
@@ -50,7 +50,7 @@
public MultiByteFont() {
// Make sure that the 3 first glyphs are included
subset.setupFirstThreeGlyphs();
-
+
// Create a quasiunique prefix for fontname
synchronized (this.getClass()) {
uniqueCounter++;
@@ -59,7 +59,7 @@
}
}
String cntString = COUNTER_FORMAT.format(uniqueCounter);
-
+
//Subset prefix as described in chapter 5.5.3 of PDF 1.4
StringBuffer sb = new StringBuffer("E");
for (int i = 0, c = cntString.length(); i < c; i++) {
@@ -104,11 +104,11 @@
public void setCIDType(CIDFontType cidType) {
this.cidType = cidType;
}
-
+
private String getPrefixedFontName() {
return namePrefix + FontUtil.stripWhiteSpace(super.getFontName());
}
-
+
/** {@inheritDoc} */
public String getEmbedFontName() {
if (isEmbeddable()) {
@@ -127,7 +127,7 @@
public CIDSubset getCIDSubset() {
return this.subset;
}
-
+
/** {@inheritDoc} */
public String getEncodingName() {
return encoding;
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MutableFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MutableFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MutableFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/MutableFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import java.util.Map;
@@ -33,7 +33,7 @@
* @param name font name
*/
void setFontName(String name);
-
+
/**
* Sets the font's full name (usually the one that the operating system displays). Example:
* "Helvetica Bold Oblique".
@@ -46,7 +46,7 @@
* @param names the font's family names (a Set of Strings)
*/
void setFamilyNames(Set names);
-
+
/**
* Sets the path to the embeddable font file.
* @param path URI to the file
@@ -64,13 +64,13 @@
* @param capHeight capital height
*/
void setCapHeight(int capHeight);
-
+
/**
* Sets the ascent value.
* @param ascender ascent height
*/
void setAscender(int ascender);
-
+
/**
* Sets the descent value.
* @param descender descent value
@@ -88,54 +88,54 @@
* @param flags flags
*/
void setFlags(int flags);
-
+
/**
* Sets the font's StemV value.
* @param stemV StemV
*/
void setStemV(int stemV);
-
+
/**
* Sets the font's italic angle.
* @param italicAngle italic angle
*/
void setItalicAngle(int italicAngle);
-
+
/**
* Sets the font's default width
* @param width default width
*/
void setMissingWidth(int width);
-
+
/**
* Sets the font type.
* @param fontType font type
*/
void setFontType(FontType fontType);
-
+
/**
* Sets the index of the first character in the character table.
* @param index index of first character
*/
void setFirstChar(int index);
-
+
/**
* Sets the index of the last character in the character table.
* @param index index of the last character
*/
void setLastChar(int index);
-
+
/**
* Enables/disabled kerning.
* @param enabled True if kerning should be enabled if available
*/
void setKerningEnabled(boolean enabled);
-
+
/**
* Adds an entry to the kerning table.
* @param key Kerning key
* @param value Kerning value
*/
void putKerningEntry(Integer key, Map value);
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/NamedCharacter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/NamedCharacter.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/NamedCharacter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/NamedCharacter.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You 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.
@@ -28,10 +28,10 @@
* sequence that this character represents.
*/
public class NamedCharacter {
-
+
private String charName;
private String unicodeSequence;
-
+
/**
* Main constructor.
* @param charName the character name
@@ -48,7 +48,7 @@
this.unicodeSequence = Glyphs.getUnicodeSequenceForGlyphName(charName);
}
}
-
+
/**
* Simple constructor.
* @param charName the character name
@@ -56,7 +56,7 @@
public NamedCharacter(String charName) {
this(charName, null);
}
-
+
/** {@inheritDoc} */
public int hashCode() {
final int prime = 31;
@@ -87,7 +87,7 @@
public String getName() {
return this.charName;
}
-
+
/**
* Returns the Unicode sequence associated with this character.
* @return the Unicode sequence (or null if no Unicode sequence is associated)
@@ -95,7 +95,7 @@
public String getUnicodeSequence() {
return this.unicodeSequence;
}
-
+
/**
* Indicates whether a single Unicode value is associated with this character.
* @return true if exactly one Unicode value is associated with this character, false otherwise
@@ -103,7 +103,7 @@
public boolean hasSingleUnicodeValue() {
return (this.unicodeSequence != null && this.unicodeSequence.length() == 1);
}
-
+
/**
* Returns the single Unicode value associated with this named character. Check
* {@link #hasSingleUnicodeValue()} before you call this method because an
@@ -125,7 +125,7 @@
}
return this.unicodeSequence.charAt(0);
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer(this.unicodeSequence);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org