com.stimulsoft.report.export.tools.pdf
Class PdfFonts

java.lang.Object
  extended by com.stimulsoft.report.export.tools.pdf.PdfFontInfo
      extended by com.stimulsoft.report.export.tools.pdf.PdfFonts

public class PdfFonts
extends PdfFontInfo

Copyright Stimulsoft


Nested Class Summary
static class PdfFonts.FontsInfoStore
          Accessory class FontsInfoStore
 class PdfFonts.pfontInfo
          Accessory class pfontInfo Copyright Stimulsoft
 class PdfFonts.RECT
          Accessory class RECT
 
Field Summary
static int FIRST_MAPPED_SYMBOL
          First mapped symbol
 PdfFontInfo[] fonts
           
 java.util.ArrayList<int[]> GlyphMapsList
           
 java.lang.String[] PDF_FONT_NAME
          PDF font name
 java.util.ArrayList<int[]> UnicodeMapsList
           
 
Fields inherited from class com.stimulsoft.report.export.tools.pdf.PdfFontInfo
ASC, CH, CharPdfNames, ChildFontsMap, DESC, GlyphBackList, GlyphList, GlyphRtfList, GlyphWidths, ItalicAngle, LineGap, LLX, LLY, MacAscend, MacDescend, MacLineGap, MappedSymbolsCount, NeedSynt, NtmFlags, StemV, StrikeoutPosition, StrikeoutSize, SymsToPDF, tmASC, tmDESC, tmExternal, UnderscorePosition, UnderscoreSize, UnicodeMap, UnicodeMapBack, URX, URY, Widths, XH
 
Constructor Summary
PdfFonts()
           
 
Method Summary
 void clear()
          Clear pdfFonts
static void clearFontsCache()
          Clear fonts cache
 int getCurrentFont()
          Get current font number
 byte[] getFontDataBuf(StiFont font)
          Get font file byte array fron buffer (if exist)
 java.util.ArrayList<PdfFonts.pfontInfo> getFontList()
           
 void getFontMetrics(StiFont font, PdfFontInfo currentFontInfo, int[] glyphMap)
          get font metrics
 int getFontNumber(StiFont incomingFont)
          Returns number of font in table of fonts.
 int getMaxSymbols()
           
 void initFontsData()
          Init fonts data
 boolean isStandardPdfFonts()
           
 boolean isUseUnicode()
           
 int[] makeGlyphBackMap(StiFont font)
          Make glyph back map
 byte[] reduceFontSize(byte[] buff, java.lang.String fontName, boolean remakeGlyphTable)
          Reduce font size
 void setCurrentFont(int value)
          Set current font number in table of fonts
 void setFontList(java.util.ArrayList<PdfFonts.pfontInfo> fontList)
           
 void setMaxSymbols(int maxSymbols)
           
 void setStandardPdfFonts(boolean standardPdfFonts)
           
 void setUseUnicode(boolean useUnicode)
           
 void storeGlyphsInMap(java.lang.StringBuilder sb)
          Store glyphs in map
 void storeUnicodeSymbolsInMap(java.lang.StringBuilder sb)
          Store unicode symbols in map
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDF_FONT_NAME

public final java.lang.String[] PDF_FONT_NAME
PDF font name


FIRST_MAPPED_SYMBOL

public static final int FIRST_MAPPED_SYMBOL
First mapped symbol

See Also:
Constant Field Values

fonts

public PdfFontInfo[] fonts

UnicodeMapsList

public java.util.ArrayList<int[]> UnicodeMapsList

GlyphMapsList

public java.util.ArrayList<int[]> GlyphMapsList
Constructor Detail

PdfFonts

public PdfFonts()
Method Detail

makeGlyphBackMap

public int[] makeGlyphBackMap(StiFont font)
Make glyph back map

Parameters:
font -
Returns:
Back map

getFontMetrics

public void getFontMetrics(StiFont font,
                           PdfFontInfo currentFontInfo,
                           int[] glyphMap)
get font metrics

Parameters:
font -
currentFontInfo -
glyphMap -

getCurrentFont

public int getCurrentFont()
Get current font number

Returns:
Current font number in table of fonts

setCurrentFont

public void setCurrentFont(int value)
Set current font number in table of fonts

Parameters:
value -

initFontsData

public void initFontsData()
Init fonts data


getFontNumber

public int getFontNumber(StiFont incomingFont)
Returns number of font in table of fonts.

Parameters:
incomingFont -
Returns:

storeUnicodeSymbolsInMap

public void storeUnicodeSymbolsInMap(java.lang.StringBuilder sb)
Store unicode symbols in map

Parameters:
sb - StringBuilder

storeGlyphsInMap

public void storeGlyphsInMap(java.lang.StringBuilder sb)
Store glyphs in map

Parameters:
sb - StringBuilder

reduceFontSize

public byte[] reduceFontSize(byte[] buff,
                             java.lang.String fontName,
                             boolean remakeGlyphTable)
                      throws java.io.IOException
Reduce font size

Parameters:
buff -
fontName -
remakeGlyphTable -
Returns:
reduced font
Throws:
java.io.IOException

clear

public void clear()
Clear pdfFonts


getFontDataBuf

public byte[] getFontDataBuf(StiFont font)
                      throws java.lang.IllegalArgumentException,
                             java.lang.SecurityException,
                             java.io.IOException,
                             java.lang.IllegalAccessException,
                             java.lang.NoSuchFieldException
Get font file byte array fron buffer (if exist)

Parameters:
font - StiFont
Returns:
Font file byte array
Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.io.IOException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException

clearFontsCache

public static void clearFontsCache()
Clear fonts cache


isUseUnicode

public boolean isUseUnicode()
Returns:
the useUnicode

setUseUnicode

public void setUseUnicode(boolean useUnicode)
Parameters:
useUnicode - the useUnicode to set

isStandardPdfFonts

public boolean isStandardPdfFonts()
Returns:
the standardPdfFonts

setStandardPdfFonts

public void setStandardPdfFonts(boolean standardPdfFonts)
Parameters:
standardPdfFonts - the standardPdfFonts to set

getMaxSymbols

public int getMaxSymbols()
Returns:
the maxSymbols

setMaxSymbols

public void setMaxSymbols(int maxSymbols)
Parameters:
maxSymbols - the maxSymbols to set

getFontList

public java.util.ArrayList<PdfFonts.pfontInfo> getFontList()
Returns:
the fontList

setFontList

public void setFontList(java.util.ArrayList<PdfFonts.pfontInfo> fontList)
Parameters:
fontList - the fontList to set