public static String[] getFamilyNames(BaseFont font) { String[][] names = font.getFamilyFontName(); if (names.length == 1) { return new String[]{names[0][3]}; } List<String> result = new ArrayList<String>(); for (String[] name : names) { if ((name[0].equals("1") && name[1].equals("0")) || name[2].equals("1033")) { result.add(name[3]); } } return result.toArray(new String[result.size()]); }
public static String[] getFamilyNames(BaseFont font) { String[][] names = font.getFamilyFontName(); if (names.length == 1) { return new String[]{names[0][3]}; } List<String> result = new ArrayList<String>(); for (String[] name : names) { if ((name[0].equals("1") && name[1].equals("0")) || name[2].equals("1033")) { result.add(name[3]); } } return result.toArray(new String[result.size()]); }
public static String[] getFamilyNames(BaseFont font) { String names[][] = font.getFamilyFontName(); if (names.length == 1) { return new String[] { names[0][3] }; } List result = new ArrayList(); for (int k = 0; k < names.length; ++k) { String name[] = names[k]; if ((name[0].equals("1") && name[1].equals("0")) || name[2].equals("1033")) { result.add(name[3]); } } return (String[]) result.toArray(new String[result.size()]); }
public static String[] getFamilyNames(BaseFont font) { String names[][] = font.getFamilyFontName(); if (names.length == 1) { return new String[] { names[0][3] }; } List result = new ArrayList(); for (int k = 0; k < names.length; ++k) { String name[] = names[k]; if ((name[0].equals("1") && name[1].equals("0")) || name[2].equals("1033")) { result.add(name[3]); } } return (String[]) result.toArray(new String[result.size()]); }
public static String getFamilyName(BaseFont font) { String names[][] = font.getFamilyFontName(); if (names.length == 1) { return names[0][3]; } String name10 = null; String name3x = null; for (int k = 0; k < names.length; ++k) { String name[] = names[k]; if (name[0].equals("1") && name[1].equals("0")) name10 = name[3]; else if (name[2].equals("1033")) { name3x = name[3]; break; } } String finalName = name3x; if (finalName == null) { finalName = name10; } if (finalName == null) { finalName = names[0][3]; } return finalName; }
default: if (baseFont != null) { String[][] names = baseFont.getFamilyFontName(); for (int i = 0; i < names.length; i++) { if ("0".equals(names[i][2])) {
default: if (baseFont != null) { String[][] names = baseFont.getFamilyFontName(); for (int i = 0; i < names.length; i++) { if ("0".equals(names[i][2])) {
default: if (baseFont != null) { String[][] names = baseFont.getFamilyFontName(); for (int i = 0; i < names.length; i++) { if ("0".equals(names[i][2])) {
/** Gets all the names from the font. Only the required tables are read. * @param name the name of the font * @param encoding the encoding of the font * @param ttfAfm the true type font or the afm in a byte array * @throws DocumentException on error * @throws IOException on error * @return an array of Object[] built with {getPostscriptFontName(), getFamilyFontName(), getFullFontName()} */ public static Object[] getAllFontNames(String name, String encoding, byte ttfAfm[]) throws DocumentException, IOException { String nameBase = getBaseName(name); BaseFont fontBuilt = null; if (nameBase.toLowerCase().endsWith(".ttf") || nameBase.toLowerCase().endsWith(".otf") || nameBase.toLowerCase().indexOf(".ttc,") > 0) fontBuilt = new TrueTypeFont(name, CP1252, false, ttfAfm, true, false); else fontBuilt = createFont(name, encoding, false, false, ttfAfm, null); return new Object[]{fontBuilt.getPostscriptFontName(), fontBuilt.getFamilyFontName(), fontBuilt.getFullFontName()}; }
/** Gets all the names from the font. Only the required tables are read. * @param name the name of the font * @param encoding the encoding of the font * @param ttfAfm the true type font or the afm in a byte array * @throws DocumentException on error * @throws IOException on error * @return an array of Object[] built with {getPostscriptFontName(), getFamilyFontName(), getFullFontName()} */ public static Object[] getAllFontNames(String name, String encoding, byte ttfAfm[]) throws DocumentException, IOException { String nameBase = getBaseName(name); BaseFont fontBuilt = null; if (nameBase.toLowerCase().endsWith(".ttf") || nameBase.toLowerCase().endsWith(".otf") || nameBase.toLowerCase().indexOf(".ttc,") > 0) fontBuilt = new TrueTypeFont(name, CP1252, false, ttfAfm, true, false); else fontBuilt = createFont(name, encoding, false, false, ttfAfm, null); return new Object[]{fontBuilt.getPostscriptFontName(), fontBuilt.getFamilyFontName(), fontBuilt.getFullFontName()}; }
fontBuilt.getFamilyFontName(), fontBuilt.getFullFontName() };
name, encoding, embedded, false, afmttf, pfb); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);
name, encoding, embedded, false, afmttf, pfb); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);
name, encoding, embedded, false, afmttf, pfb); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);
path, encoding, embedded, false, null, readFile(pathToPFB)); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);
fontFamilyName = fontFamilyNameOverride; } else { fontFamilyName = font.getFamilyFontName()[0][3];
fontFamilyName = fontFamilyNameOverride; } else { fontFamilyName = font.getFamilyFontName()[0][3];
fontFamilyName = fontFamilyNameOverride; } else { fontFamilyName = font.getFamilyFontName()[0][3];
name, encoding, embedded, false, afmttf, pfb); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);
name, encoding, embedded, false, afmttf, pfb); String fontFamilyName = font.getFamilyFontName()[0][3]; FontFamily fontFamily = getFontFamily(fontFamilyName);