List of usage examples for com.lowagie.text FontFactory defaultEncoding
String defaultEncoding
To view the source code for com.lowagie.text FontFactory defaultEncoding.
Click Source Link
From source file:com.amphisoft.epub2pdf.content.TextFactory.java
License:Open Source License
public Paragraph newHeadline(int i) { if (i < 1) { i = 1;/*from w ww .j a v a 2 s . c om*/ } if (i > 6) { i = 6; } Font hFont = FontFactory.getFont(_defaultFont.getFamilyname(), FontFactory.defaultEncoding, BaseFont.EMBEDDED, baseFontSize * HMULTS[i - 1], Font.BOLD); Paragraph h = new Paragraph(); h.setAlignment(ITAlignment.CENTER.value); h.setFont(hFont); currentFont = hFont; h.setLeading(0F, getCurrentLeadingMultiplier()); h.setSpacingAfter(_defaultFont.getSize() * 0.33F); currentParagraph = h; return h; }
From source file:com.amphisoft.epub2pdf.content.TextFactory.java
License:Open Source License
public static boolean setDefaultFontByName(String fontName) { fontName = fontName.toLowerCase().trim(); if (TextFactory.fontFamilyRegistered(fontName)) { Font newDefaultFont = null; try {//from w w w. j a va2 s. c o m newDefaultFont = FontFactory.getFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); } catch (ExceptionConverter eC) { if (eC.getException() instanceof UnsupportedEncodingException) { newDefaultFont = FontFactory.getFont(fontName, FontFactory.defaultEncoding, BaseFont.EMBEDDED); } else { throw new RuntimeException(eC); } } newDefaultFont.setSize(_defaultFontSize); _defaultFont = newDefaultFont; return true; } else { return false; } }
From source file:com.amphisoft.epub2pdf.content.TextFactory.java
License:Open Source License
public static boolean setDefaultFontMonoByName(String fontName) { fontName = fontName.toLowerCase();/* www. j a v a2 s . co m*/ if (TextFactory.fontFamilyRegistered(fontName)) { Font newDefaultMonoFont = FontFactory.getFont(fontName, FontFactory.defaultEncoding, BaseFont.EMBEDDED); newDefaultMonoFont.setSize(_defaultFontMonoSize); _defaultFontMono = newDefaultMonoFont; return true; } else { return false; } }
From source file:fr.opensagres.xdocreport.itext.extension.font.AbstractFontRegistry.java
License:Open Source License
public String getSystemEncoding() { if (systemEncodingDetermined) { return systemEncoding; }//from w w w. ja v a2s . com // don't rely on file.encoding property because // it may be changed if application is launched inside an ide systemEncoding = System.getProperty("sun.jnu.encoding"); if (systemEncoding != null && systemEncoding.length() > 0) { systemEncodingDetermined = true; return systemEncoding; } systemEncoding = System.getProperty("ibm.system.encoding"); if (systemEncoding != null && systemEncoding.length() > 0) { systemEncodingDetermined = true; return systemEncoding; } systemEncoding = FontFactory.defaultEncoding; systemEncodingDetermined = true; return systemEncoding; }