[FOray-commit] SF.net SVN: foray: [8547] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-01-30 03:49:01
|
Revision: 8547
http://svn.sourceforge.net/foray/?rev=8547&view=rev
Author: victormote
Date: 2007-01-29 19:49:01 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -248,7 +248,7 @@
if (rff != null) {
/* Try to find one with normal characteristics. */
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
FOrayFont.FONT_WEIGHT_NORMAL,
FOrayFont.FONT_VARIANT_NORMAL,
FOrayFont.FONT_STRETCH_NORMAL,
@@ -259,7 +259,7 @@
}
/* Try to find one with regardless of characteristics. */
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_ANY,
+ org.axsl.fontR.Font.Style.ANY,
FOrayFont.FONT_WEIGHT_ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
@@ -274,7 +274,7 @@
final Map.Entry entry = (Map.Entry) iterator.next();
rff = (RegisteredFontFamily) entry.getValue();
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_ANY,
+ org.axsl.fontR.Font.Style.ANY,
FOrayFont.FONT_WEIGHT_ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
@@ -466,17 +466,17 @@
return;
}
registerBase14Description("Base14-Courier", "Base14-Courier",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Oblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Courier",
"Base14-Courier-BoldOblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -491,18 +491,18 @@
return;
}
registerBase14Description("Base14-Helvetica", "Base14-Helvetica",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-Oblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Helvetica", "Base14-Helvetica-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-BoldOblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -517,16 +517,16 @@
return;
}
registerBase14Description("Base14-Times", "Base14-Times",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Italic",
- org.axsl.fontR.Font.FONT_STYLE_ITALIC,
+ org.axsl.fontR.Font.Style.ITALIC,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Times", "Base14-Times-BoldItalic",
- org.axsl.fontR.Font.FONT_STYLE_ITALIC,
+ org.axsl.fontR.Font.Style.ITALIC,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -541,7 +541,7 @@
return;
}
registerBase14Description("Base14-Symbol", "Base14-Symbol",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
}
@@ -556,7 +556,7 @@
return;
}
registerBase14Description("Base14-ZapfDingbats", "Base14-ZapfDingbats",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
}
@@ -642,9 +642,9 @@
this.logger.error(e.getMessage());
continue;
}
- byte fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ byte fontStyle = org.axsl.fontR.Font.Style.NORMAL;
if (awtFont.isItalic()) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
short fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (awtFont.isBold()) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -28,6 +28,7 @@
package org.foray.font;
+import org.axsl.fontR.Font;
import org.axsl.psR.Encoding;
/**
@@ -531,7 +532,7 @@
*/
public boolean styleMatches(final int inputDesiredStyle,
final boolean considerSimulated) {
- if (inputDesiredStyle == FOrayFont.FONT_STYLE_ANY) {
+ if (inputDesiredStyle == Font.Style.ANY) {
return true;
}
if (considerSimulated) {
@@ -539,9 +540,9 @@
/* If it can simulate oblique, it can be used for either
* oblique or italic or normal. */
switch (inputDesiredStyle) {
- case FOrayFont.FONT_STYLE_NORMAL:
- case FOrayFont.FONT_STYLE_ITALIC:
- case FOrayFont.FONT_STYLE_OBLIQUE: {
+ case Font.Style.NORMAL:
+ case Font.Style.ITALIC:
+ case Font.Style.OBLIQUE: {
return true;
}
}
@@ -555,12 +556,12 @@
}
/* If they are not equal, we need to treat "oblique" and "italic" as
* equivalent. */
- if (actualStyle == FOrayFont.FONT_STYLE_OBLIQUE) {
- actualStyle = FOrayFont.FONT_STYLE_ITALIC;
+ if (actualStyle == Font.Style.OBLIQUE) {
+ actualStyle = Font.Style.ITALIC;
}
int desiredStyle = inputDesiredStyle;
- if (inputDesiredStyle == FOrayFont.FONT_STYLE_OBLIQUE) {
- desiredStyle = FOrayFont.FONT_STYLE_ITALIC;
+ if (inputDesiredStyle == Font.Style.OBLIQUE) {
+ desiredStyle = Font.Style.ITALIC;
}
/* Test it again. */
if (actualStyle == desiredStyle) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -28,6 +28,7 @@
package org.foray.font;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontException;
import org.axsl.fontR.FontUtility;
import org.axsl.psR.Encoding;
@@ -95,7 +96,7 @@
throws FontException {
byte fontStyle = FontUtility.foFontStyle(style, false);
if (fontStyle < 0) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ fontStyle = Font.Style.NORMAL;
}
short fontWeight = FontUtility.foFontWeight(weight, false);
if (fontWeight < 0) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -3291,19 +3291,19 @@
public static byte convertFontStyle(final short parsedFontStyle) {
switch (parsedFontStyle) {
case FoValue.NORMAL: {
- return org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ return org.axsl.fontR.Font.Style.NORMAL;
}
case FoValue.ITALIC: {
- return org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ return org.axsl.fontR.Font.Style.ITALIC;
}
case FoValue.OBLIQUE: {
- return org.axsl.fontR.Font.FONT_STYLE_OBLIQUE;
+ return org.axsl.fontR.Font.Style.OBLIQUE;
}
case FoValue.BACKSLANT: {
- return org.axsl.fontR.Font.FONT_STYLE_BACKSLANT;
+ return org.axsl.fontR.Font.Style.BACKSLANT;
}
}
- return org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ return org.axsl.fontR.Font.Style.NORMAL;
}
public static int convertFontStretch(final short parsedFontStretch) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -916,9 +916,9 @@
fontFamily = "sans-serif";
}
final float fontSize = gFont.getSize();
- int fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ int fontStyle = org.axsl.fontR.Font.Style.NORMAL;
if (gFont.isItalic()) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
int fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (gFont.isBold()) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -287,9 +287,9 @@
final Float size, final boolean italic, final boolean bold)
throws FontException {
org.axsl.fontR.FontUse font = null;
- int style = Font.FONT_STYLE_NORMAL;
+ int style = Font.Style.NORMAL;
if (italic) {
- style = Font.FONT_STYLE_ITALIC;
+ style = Font.Style.ITALIC;
}
int weight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (bold) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|