Revision: 7259
Author: victormote
Date: 2006-05-26 07:21:41 -0700 (Fri, 26 May 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7259&view=rev
Log Message:
-----------
Conform to axsl changes regarding location of constants.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2006-05-26 13:24:41 UTC (rev 7258)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2006-05-26 14:21:41 UTC (rev 7259)
@@ -27,6 +27,8 @@
import org.foray.font.charset.CharSet;
import org.foray.font.format.Kerning;
+import org.axsl.common.Constants;
+
import org.apache.commons.logging.Log;
/**
@@ -326,34 +328,35 @@
public int estimateBaseline(int writingMode, int baselineType,
int fontSize) {
switch (baselineType) {
- case BASELINE_ALPHABETIC: {
+ case Constants.BASELINE_ALPHABETIC: {
return fontSize + this.getDescender(fontSize);
}
- case BASELINE_IDEOGRAPHIC: {
+ case Constants.BASELINE_IDEOGRAPHIC: {
return fontSize;
}
- case BASELINE_HANGING: {
+ case Constants.BASELINE_HANGING: {
return (int) Math.round(fontSize * .3);
}
- case BASELINE_MATHEMATICAL: {
+ case Constants.BASELINE_MATHEMATICAL: {
/* For now, this is the same as Alphabetic. */
return fontSize + this.getDescender(fontSize);
}
- case BASELINE_CENTRAL: {
+ case Constants.BASELINE_CENTRAL: {
return fontSize / 2;
}
- case BASELINE_MIDDLE: {
+ case Constants.BASELINE_MIDDLE: {
/* First get the Alphabetic baseline. */
- int baseline = baseline(writingMode, BASELINE_ALPHABETIC, fontSize);
+ int baseline = baseline(writingMode, Constants.BASELINE_ALPHABETIC,
+ fontSize);
baseline -= this.getXHeight(fontSize) / 2;
return baseline;
}
- case BASELINE_TEXT_BEFORE_EDGE: {
+ case Constants.BASELINE_TEXT_BEFORE_EDGE: {
/* TODO: This needs to comply with the Note under "text-before-edge"
* at Section 7.13 of XSL-FO 1.0. */
return 0;
}
- case BASELINE_TEXT_AFTER_EDGE: {
+ case Constants.BASELINE_TEXT_AFTER_EDGE: {
/* TODO: This needs to comply with the Note under "text-after-edge"
* at Section 7.13 of XSL-FO 1.0. */
return fontSize;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|