Tabnine Logo
TrueTypeUtil.getFamilyNames
Code IndexAdd Tabnine to your IDE (free)

How to use
getFamilyNames
method
in
org.xhtmlrenderer.pdf.TrueTypeUtil

Best Java code snippets using org.xhtmlrenderer.pdf.TrueTypeUtil.getFamilyNames (Showing top 12 results out of 315)

origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

/**
 * Utility method which uses iText libraries to determine the family name(s) for the font at the given path.
 * The iText APIs seem to indicate there can be more than one name, but this method will return a set of them.
 * Use a name from this list when referencing the font in CSS for PDF output. Note that family names as reported
 * by iText may vary from those reported by the AWT Font class, e.g. "Arial Unicode MS" for iText and
 * "ArialUnicodeMS" for AWT.
 *
 * @param path local path to the font file
 * @param encoding same as what you would use for {@link #addFont(String, String, boolean)}
 * @param embedded same as what you would use for {@link #addFont(String, String, boolean)}
 * @return set of all family names for the font file, as reported by iText libraries
 */
public static Set getDistinctFontFamilyNames(String path, String encoding, boolean embedded) {
  BaseFont font = null;
  try {
    font = BaseFont.createFont(path, encoding, embedded);
    String[] fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
    Set distinct = new HashSet();
    for (int i = 0; i < fontFamilyNames.length; i++) {
      distinct.add(fontFamilyNames[i]);
    }
    return distinct;
  } catch (DocumentException e) {
    throw new RuntimeException(e);
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: org.xhtmlrenderer/flying-saucer-pdf

/**
 * Utility method which uses iText libraries to determine the family name(s) for the font at the given path.
 * The iText APIs seem to indicate there can be more than one name, but this method will return a set of them.
 * Use a name from this list when referencing the font in CSS for PDF output. Note that family names as reported
 * by iText may vary from those reported by the AWT Font class, e.g. "Arial Unicode MS" for iText and
 * "ArialUnicodeMS" for AWT.
 *
 * @param path local path to the font file
 * @param encoding same as what you would use for {@link #addFont(String, String, boolean)}
 * @param embedded same as what you would use for {@link #addFont(String, String, boolean)}
 * @return set of all family names for the font file, as reported by iText libraries
 */
public static Set getDistinctFontFamilyNames(String path, String encoding, boolean embedded) {
  BaseFont font = null;
  try {
    font = BaseFont.createFont(path, encoding, embedded);
    String[] fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
    Set distinct = new HashSet();
    for (int i = 0; i < fontFamilyNames.length; i++) {
      distinct.add(fontFamilyNames[i]);
    }
    return distinct;
  } catch (DocumentException e) {
    throw new RuntimeException(e);
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

/**
 * Utility method which uses iText libraries to determine the family name(s) for the font at the given path.
 * The iText APIs seem to indicate there can be more than one name, but this method will return a set of them.
 * Use a name from this list when referencing the font in CSS for PDF output. Note that family names as reported
 * by iText may vary from those reported by the AWT Font class, e.g. "Arial Unicode MS" for iText and
 * "ArialUnicodeMS" for AWT.
 *
 * @param path local path to the font file
 * @param encoding same as what you would use for {@link #addFont(String, String, boolean)}
 * @param embedded same as what you would use for {@link #addFont(String, String, boolean)}
 * @return set of all family names for the font file, as reported by iText libraries
 */
public static Set getDistinctFontFamilyNames(String path, String encoding, boolean embedded) {
  BaseFont font = null;
  try {
    font = BaseFont.createFont(path, encoding, embedded);
    String[] fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
    Set distinct = new HashSet();
    for (int i = 0; i < fontFamilyNames.length; i++) {
      distinct.add(fontFamilyNames[i]);
    }
    return distinct;
  } catch (DocumentException e) {
    throw new RuntimeException(e);
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

/**
 * Utility method which uses iText libraries to determine the family name(s) for the font at the given path.
 * The iText APIs seem to indicate there can be more than one name, but this method will return a set of them.
 * Use a name from this list when referencing the font in CSS for PDF output. Note that family names as reported
 * by iText may vary from those reported by the AWT Font class, e.g. "Arial Unicode MS" for iText and
 * "ArialUnicodeMS" for AWT.
 *
 * @param path local path to the font file
 * @param encoding same as what you would use for {@link #addFont(String, String, boolean)}
 * @param embedded same as what you would use for {@link #addFont(String, String, boolean)}
 * @return set of all family names for the font file, as reported by iText libraries
 */
public static Set getDistinctFontFamilyNames(String path, String encoding, boolean embedded) {
  BaseFont font = null;
  try {
    font = BaseFont.createFont(path, encoding, embedded);
    String[] fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
    Set distinct = new HashSet();
    for (int i = 0; i < fontFamilyNames.length; i++) {
      distinct.add(fontFamilyNames[i]);
    }
    return distinct;
  } catch (DocumentException e) {
    throw new RuntimeException(e);
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

  fontFamilyNames = new String[] { fontFamilyNameOverride };
} else {
  fontFamilyNames = TrueTypeUtil.getFamilyNames(font);
org.xhtmlrenderer.pdfTrueTypeUtilgetFamilyNames

Popular methods of TrueTypeUtil

  • extractTables
  • getTTCName
  • guessStyle
  • populateDescription
  • populateDescription0
  • getFamilyName

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Socket (java.net)
    Provides a client-side TCP socket.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JPanel (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now