Java 8 FontFormatException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 FontFormatException class.

This code example shows how to use the following methods:printStackTrace
      System.out.println(font.getNumGlyphs());
      System.out.println(font.getStyle() + "/" + Font.ITALIC + "/" + Font.BOLD
          + "/" + Font.PLAIN);
    } catch (FontFormatException e) {
      // throw exception if invalid true type 
      e.printStackTrace();
    } 
  } 
} 
3
CodeRank
This code example shows how to use the following methods:printStackTrace
		InputStream fontStream = null;
		try { 
			fontStream = UIRes.getStream("fonts/webfont.ttf");
			font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
		} catch (FontFormatException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally { 
			if (fontStream != null) {
				try { 
					fontStream.close();
				} catch (IOException e) {
					e.printStackTrace();
				} 
			} 
		} 
	} 
 
	private static class LazyHolder { 
3
CodeRank
This code example shows how to use the following methods:printStackTrace
          "/usr/share/fonts/default/Type1/a010015l.pfb")); 
      // Font.createFont(Font.TYPE1_FONT, new 
      // FileInputStream("resources/bad_type_1.pfb")); 
    } catch (FontFormatException e) {
      // throw exception if invalid true type 
      e.printStackTrace();
    } 
  } 
} 
3
CodeRank
See Code Examples for Java 8 FontFormatException Methods: