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 ad...@apache.org on 2008/06/23 00:18:54 UTC

svn commit: r670424 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java

Author: adelmelle
Date: Sun Jun 22 15:18:53 2008
New Revision: 670424

URL: http://svn.apache.org/viewvc?rev=670424&view=rev
Log:
Another missing file...

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java?rev=670424&r1=670423&r2=670424&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSelector.java Sun Jun 22 15:18:53 2008
@@ -88,7 +88,7 @@
     /**
      * Selects a font which is able to display the most of the given characters.
      * 
-     * @param textArray
+     * @param charSeq
      *            Text to go through
      * @param firstIndex
      *            first index within text.
@@ -100,9 +100,10 @@
      *            the Percent-based context needed for creating the actual font.
      * @return a Font object.
      */
-    public static Font selectFontForCharactersInText(char[] textArray,
+    public static Font selectFontForCharactersInText(CharSequence charSeq,
             int firstIndex, int breakIndex, FOText text,
             PercentBaseContext context) {
+
         final FontInfo fi = text.getFOEventHandler().getFontInfo();
         final CommonFont commonFont = text.getCommonFont();
         final FontTriplet[] fontkeys = commonFont.getFontState(fi);
@@ -115,7 +116,7 @@
                     commonFont.fontSize.getValue(context));
             fonts[fontnum] = font;
             for (int pos = firstIndex; pos < breakIndex; pos++) {
-                if (font.hasChar(textArray[pos])) {
+                if (font.hasChar(charSeq.charAt(pos))) {
                     fontCount[fontnum]++;
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org