congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Chunk.getFont
Code IndexAdd Tabnine to your IDE (free)

How to use
getFont
method
in
com.itextpdf.text.Chunk

Best Java code snippets using com.itextpdf.text.Chunk.getFont (Showing top 20 results out of 315)

origin: com.itextpdf/itextpdf

/**
 * Changes the font of the list symbol to the font of the first chunk
 * in the list item.
 * @since 5.0.6
 */
public void adjustListSymbolFont() {
  java.util.List<Chunk> cks = getChunks();
  if (!cks.isEmpty() && symbol != null)
    symbol.setFont(cks.get(0).getFont());
}
origin: com.itextpdf/itextg

/**
 * Changes the font of the list symbol to the font of the first chunk
 * in the list item.
 * @since 5.0.6
 */
public void adjustListSymbolFont() {
  java.util.List<Chunk> cks = getChunks();
  if (!cks.isEmpty() && symbol != null)
    symbol.setFont(cks.get(0).getFont());
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE>.
 *
 * @param    chunk        a <CODE>Chunk</CODE>
 */
public Phrase(final Chunk chunk) {
  super.add(chunk);
  font = chunk.getFont();
  setHyphenation(chunk.getHyphenation());
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE>
 * and a certain leading.
 *
 * @param    leading    the leading
 * @param    chunk        a <CODE>Chunk</CODE>
 */
public Phrase(final float leading, final Chunk chunk) {
  this.leading = leading;
  super.add(chunk);
  font = chunk.getFont();
  setHyphenation(chunk.getHyphenation());
}
origin: com.itextpdf/itextg

/**
 * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE>.
 *
 * @param    chunk        a <CODE>Chunk</CODE>
 */
public Phrase(final Chunk chunk) {
  super.add(chunk);
  font = chunk.getFont();
  setHyphenation(chunk.getHyphenation());
}
origin: com.itextpdf/itextg

/**
 * Sets the listsymbol.
 *
 * @param    symbol    a <CODE>Chunk</CODE>
 */
public void setListSymbol(final Chunk symbol) {
  if (this.symbol == null) {
    this.symbol = symbol;
    if (this.symbol.getFont().isStandardFont()) {
      this.symbol.setFont(font);
    }
  }
}
origin: com.itextpdf/itextpdf

/**
 * Creates a ZapfDingbatsList
 *
 * @param zn a char-number
 */
public ZapfDingbatsList(int zn) {
  super(true);
  this.zn = zn;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextg

/**
 * Creates a ZapdDingbatsNumberList
 * @param type the type of list
 */
public ZapfDingbatsNumberList(int type) {
  super(true);
  this.type = type;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextpdf

/**
 * change the font to SYMBOL
 */
protected void setGreekFont() {
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.SYMBOL, fontsize, Font.NORMAL));
}
origin: com.itextpdf/itextpdf

private static void changeFontSize(Phrase p, float size) {
  for (int k = 0; k < p.size(); ++k)
    ((Chunk)p.get(k)).getFont().setSize(size);
}
origin: com.itextpdf/itextg

/**
 * Sets the dingbat's color.
 *
 * @param zapfDingbatColor color for the ZapfDingbat
 */
public void setDingbatColor(BaseColor zapfDingbatColor) {
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor));
}
origin: com.itextpdf/itextpdf

/**
 * Sets the dingbat's color.
 *
 * @param zapfDingbatColor color for the ZapfDingbat
 */
public void setDingbatColor(BaseColor zapfDingbatColor) {
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor));
}
origin: com.itextpdf/itextpdf

/**
 * Creates a ZapdDingbatsNumberList
 * @param type the type of list
 */
public ZapfDingbatsNumberList(int type) {
  super(true);
  this.type = type;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextpdf

/**
 * Creates a ZapdDingbatsNumberList
 * @param type the type of list
 * @param symbolIndent    indent
 */
public ZapfDingbatsNumberList(int type, int symbolIndent) {
  super(true, symbolIndent);
  this.type = type;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextg

/**
 * Creates a ZapfDingbatsList
 *
 * @param zn a char-number
 * @param symbolIndent    indent
 */
public ZapfDingbatsList(int zn, int symbolIndent) {
  super(true, symbolIndent);
  this.zn = zn;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextpdf

/**
 * Creates a ZapfDingbatsList
 *
 * @param zn a char-number
 * @param symbolIndent    indent
 */
public ZapfDingbatsList(int zn, int symbolIndent) {
  super(true, symbolIndent);
  this.zn = zn;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextg

/**
 * Creates a ZapfDingbatsList
 *
 * @param zn a char-number
 */
public ZapfDingbatsList(int zn) {
  super(true);
  this.zn = zn;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL));
  postSymbol = " ";
}
origin: com.itextpdf/itextpdf

/**
 * Creates a ZapfDingbatList with a colored symbol
 *
 * @param zn a char-number
 * @param symbolIndent indent
 * @param zapfDingbatColor color for the ZpafDingbat
 */
public ZapfDingbatsList(int zn, int symbolIndent, BaseColor zapfDingbatColor) {
  super(true, symbolIndent);
  this.zn = zn;
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor));
  postSymbol = " ";
}
origin: com.itextpdf/itextg

/**
 * change the font to SYMBOL
 */
protected void setGreekFont() {
  float fontsize = symbol.getFont().getSize();
  symbol.setFont(FontFactory.getFont(FontFactory.SYMBOL, fontsize, Font.NORMAL));
}
origin: com.github.hazendaz/displaytag

/**
 * Makes chunk content bold.
 * @param chunk The chunk whose content is to be rendered bold.
 * @param color The font color desired.
 */
private void setBoldStyle(Chunk chunk, BaseColor color)
{
  Font font = chunk.getFont();
  chunk.setFont(FontFactory.getFont(font.getFamilyname(), font.getSize(), Font.BOLD, color));
}
com.itextpdf.textChunkgetFont

Javadoc

Gets the font of this Chunk.

Popular methods of Chunk

  • <init>
    Constructs a chunk of text with a certain content and a certain Font.
  • setBackground
    Sets the color and the size of the background Chunk.
  • getContent
    Returns the content of this Chunk.
  • getWidthPoint
    Gets the width of the Chunk in points.
  • setGenericTag
    Sets the generic tag Chunk. The text for this tag can be retrieved with PdfPageEvent.
  • setFont
    Sets the font of this Chunk.
  • setLocalDestination
    Sets a local destination for this Chunk.
  • setTextRise
    Sets the text displacement relative to the baseline. Positive values rise the text, negative values
  • append
    appends some text to this Chunk.
  • createTabspace
  • createWhitespace
  • getAccessibleAttribute
  • createWhitespace,
  • getAccessibleAttribute,
  • getAccessibleAttributes,
  • getAttributes,
  • getHorizontalScaling,
  • getHyphenation,
  • getId,
  • getImage,
  • getRole

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • getSystemService (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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