[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: FontMetrics fixlet
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] FYI: FontMetrics fixlet |
Date: |
Wed, 17 Aug 2005 12:42:28 +0200 |
Hi,
On Wed, 2005-08-17 at 11:07 +0200, Roman Kennke wrote:
> This correctly maps Unicode indices to char[] in
> FontMetrics.charWidth(int). This probably does not matter much in most
> cases but could be interesting in some exotic fonts.
>
> 2005-08-17 Roman Kennke <address@hidden>
>
> * java/awt/FontMetrics.java
> (charWidth(int)): Correctly map Unicode indices to char[] here.
Which gives:
196. char[] chars = Character.toChars(ch);
^-------------------^
*** Semantic Error: No accessible method with signature "toChars(int)"
was found in type "java.lang.Character".
This method seems to be trying to handle arbitrary unicode code points,
but we don't support those outside bmp yet. To fix the build breakage I
just disabled this method for now. We can reenable it when the necessary
updates for Character go in.
2005-08-17 Mark Wielaard <address@hidden>
* java/awt/FontMetrics.java (charWidth(int)): Disable.
Should I commit that or do you have an update to Character pending?
Thanks,
Mark
Index: java/awt/FontMetrics.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/FontMetrics.java,v
retrieving revision 1.15
diff -u -r1.15 FontMetrics.java
--- java/awt/FontMetrics.java 17 Aug 2005 09:05:58 -0000 1.15
+++ java/awt/FontMetrics.java 17 Aug 2005 10:38:14 -0000
@@ -185,17 +185,18 @@
}
/**
- * Returns the width of the specified character.
+ * FIXME - Needs codepoint support in Character.
+ * Returns the width of the specified codepoint.
*
- * @param ch The character to return the width of.
+ * @param ch The codepoint to return the width of.
*
- * @return The width of the specified character.
- */
+ * @return The width of the specified codepoint.
public int charWidth(int ch)
{
char[] chars = Character.toChars(ch);
return charsWidth(chars, 0, chars.length);
}
+ */
/**
* Returns the width of the specified character.
signature.asc
Description: This is a digitally signed message part