-         private final UnicodeFont font;
 
-         @SuppressWarnings("unchecked") 
 
-         public UnicodeFontRenderer(Font awtFont) {
 
-  
 
-                super(Minecraft.getMinecraft().gameSettings, new 
 
- ResourceLocation("textures/font/ascii.png"), 
 
- Minecraft.getMinecraft().getTextureManager(), false);
 
-                 font = new UnicodeFont(awtFont);
 
-                 font.addAsciiGlyphs();
 
-                 font.getEffects().add(new ColorEffect(Color.WHITE));
 
-                 try {
 
-                         font.loadGlyphs();
 
-                 } catch(SlickException exception) {
 
-                         throw new RuntimeException(exception);
 
-                 }
 
-                 String alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";
 
-                 FONT_HEIGHT = font.getHeight(alphabet) / 2;
 
- }
-                 public static void loadFonts(){
 
-                         InputStream is =Fonts.class.getResourceAsStream("fonts/font.ttf");
 
-                         Font font =null;
 
-                         try{
 
-                                         font=Font.createFont(Font.TRUETYPE_FONT, is);
 
-                         }catch(FontFormatException e){
 
-                                 e.printStackTrace();
 
-                         }catch(IOException e){
 
-                                 e.printStackTrace();
 
-                         }
 
-                         smallLC=new UnicodeFontRenderer(font.deriveFont(20F));
 
-                         menuLC=new UnicodeFontRenderer(font.deriveFont(60F));
 
-                         if(Minecraft.getMinecraft().gameSettings.language !=null){
 
-                                 Fonts.smallXX.setUnicodeFlag(true);
 
-                                 Fonts.menuXX..setUnicodeFlag(true);
 
-  
 
-                                
 
- Fonts.smallLC.setBidiFlag(Minecraft.getMinecraft().mcLanguageManager.isCurrentLanguageBidirectional());
 
-  
 
-                                
 
- Fonts.menuLC.setBidiFlag(Minecraft.getMinecraft().mcLanguageManager.isCurrentLanguageBidirectional());
 
 
-                         }
 
-                         
 
- }
只显示英文