harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r555920 - in /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font: FontFinder.java TextMetricsCalculator.java TextRunBreaker.java
Date Fri, 13 Jul 2007 09:58:02 GMT
Author: apetrenko
Date: Fri Jul 13 02:58:00 2007
New Revision: 555920

URL: http://svn.apache.org/viewvc?view=rev&rev=555920
Log:
Patch for HARMONY-4386 "[classlib][awt] Exception when trying to use java.awt.font.LineBreakMeasurer"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontFinder.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontFinder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontFinder.java?view=diff&rev=555920&r1=555919&r2=555920
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontFinder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontFinder.java
Fri Jul 13 02:58:00 2007
@@ -103,7 +103,7 @@
      * @param fonts - mapping of the font run starts to the fonts
      */
     static void findFonts(char text[], int runStart, int runLimit, List<Integer> runStarts,
-            Map<Integer, Font> fonts) {
+            Map<Integer, Object> fonts) {
         Font prevFont = null;
         Font currFont;
         for (int i = runStart; i < runLimit; i++) {

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java?view=diff&rev=555920&r1=555919&r2=555920
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java
Fri Jul 13 02:58:00 2007
@@ -86,7 +86,7 @@
      */
     public void checkBaselines() {
         // Take baseline offsets of the first font and normalize them
-        HashMap<Integer, Font> fonts = breaker.fonts;
+        HashMap<Integer, Object> fonts = breaker.fonts;
 
         Object val = fonts.get(new Integer(0));
 

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java?view=diff&rev=555920&r1=555919&r2=555920
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java
Fri Jul 13 02:58:00 2007
@@ -53,7 +53,7 @@
 
     byte[] levels;
 
-    HashMap<Integer, Font> fonts;
+    HashMap<Integer, Object> fonts;
     HashMap<Integer, Decoration> decorations;
 
     // Related to default font substitution
@@ -193,7 +193,7 @@
      */
     void createStyleRuns() {
         // TODO - implement fast and simple case
-        fonts = new HashMap<Integer, Font>();
+        fonts = new HashMap<Integer, Object>();
         decorations = new HashMap<Integer, Decoration>();
         ////
 
@@ -221,7 +221,8 @@
             // Find appropriate font or place GraphicAttribute there
 
             // 1. Try to pick up CHAR_REPLACEMENT (compatibility)
-            Font value = (Font)attributes.get(TextAttribute.CHAR_REPLACEMENT);
+            Object value = (GraphicAttribute)
+                    attributes.get(TextAttribute.CHAR_REPLACEMENT);
 
             if (value == null) {
                 // 2. Try to Get FONT



Mime
View raw message