[OpenJDK 2D-Dev] [PATCH] FontManager refactoring, rev6
Roman Kennke
Roman.Kennke at Sun.COM
Wed Aug 5 23:10:52 UTC 2009
Hi there,
6th round of the FontManager refactoring.
> you aren't using these import in sun.font.FontManager :
> 30 import java.util.Locale;
> 31 import java.util.TreeMap;
> 32
> 33 import javax.swing.plaf.FontUIResource;
>
> There may be other such cases but its easy to see in this much reduced file.
I went over all the files with NetBeans and removed all unused imports.
> SunGraphicsEnvironment.java
> 173 assert fm instanceof FontManagerForSGE;
> 174 return (FontManagerForSGE) fm;
>
> I don't see the point of the assert here because the cast is
> going to tell you if there's a problem whether asserts are on or not.
I agree. Removed.
> SharedSecrets.java
>
> I think you can restore the empty line (115) you deleted and remove this
> file from the webrev.
Done.
> FcFontConfiguration.java
>
> you aren't using the "fm" instance so can remove that line :
> 331 SunFontManager fm = SunFontManager.getInstance();
> 332 if (FontUtilities.debugFonts()) {
> 333 Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
> 334 logger.warning("Exception identifying Linux distro.");
> 335 }
> 336 }
> 337 }
Yeah, I found a couple more instances of this problem and removed all of
them.
> WPathGraphics.java
>
> I see you moved the definition of textLayoutIsCompatible in here.
> Whilst its used only by this code, its also meaning that updating
> that font internal code in the future will affect the printing code.
> And the getDirectoryEntry() method isn't public so I'm not sure
> how this will work! Ah, I just remembered you said you didn't test
> on windows yet. Puzzlement over, this won't build. I'd prefer this
> to go back to TrueTypeFont.
> Clearly you need to get that windows build tested before you push.
> You don't need to set up a windows machine, you can submit a jprt job
> now that you have SWAN access.
I resolved all windows related problems and verified that it works using
Font2DTest and JPRT (excluding an apparently known assertion in
awt_Frame.h, line 121).
http://cr.openjdk.java.net/~rkennke/fontmanager/webrev.06/
/Roman
More information about the 2d-dev
mailing list