[FOray-commit] SF.net SVN: foray:[13084] trunk/foray/foray-font/src/main/java/org/foray/ font
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2023-01-23 12:39:56
|
Revision: 13084
http://sourceforge.net/p/foray/code/13084
Author: victormote
Date: 2023-01-23 12:39:53 +0000 (Mon, 23 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Now returning -1 if metric index not found.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FsType1Font.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2023-01-23 12:23:58 UTC (rev 13083)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2023-01-23 12:39:53 UTC (rev 13084)
@@ -210,8 +210,8 @@
if (getKerning() == null) {
return 0;
}
- final int metricIndex1 = this.metricIndex(codePoint1);
- final int metricIndex2 = this.metricIndex(codePoint2);
+ final int metricIndex1 = metricIndex(codePoint1);
+ final int metricIndex2 = metricIndex(codePoint2);
final int rawKerning = getKerning().kern(metricIndex1, metricIndex2);
if (TypographicConstants.MILLIPOINTS_PER_POINT == this.getUnitsPerEm()) {
/* Avoid the potential loss of precision. */
@@ -220,7 +220,6 @@
return Math.round(rawKerning * TypographicConstants.MILLIPOINTS_PER_POINT / getUnitsPerEm());
}
-
/**
* Reports on the availability of a glyph in this font, without regard to
* encoding issues.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FsType1Font.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FsType1Font.java 2023-01-23 12:23:58 UTC (rev 13083)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FsType1Font.java 2023-01-23 12:39:53 UTC (rev 13084)
@@ -399,11 +399,10 @@
@Override
public int metricIndex(final int codePoint) {
- final int metricIndex =
- this.metricsFile.getCharSet().getIndex(codePoint);
+ final int metricIndex = this.metricsFile.getCharSet().getIndex(codePoint);
if (metricIndex < 0
|| metricIndex > this.getWidths().length()) {
- return Integer.MIN_VALUE;
+ return -1;
}
return metricIndex;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|