|
fop-pdf-images 2.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.truetype.OpenFont
org.apache.fop.fonts.truetype.TTFFile
org.apache.fop.fonts.truetype.TTFSubSetFile
org.apache.fop.render.pdf.pdfbox.MergeTTFonts
public class MergeTTFonts
Nested Class Summary | |
---|---|
static class |
MergeTTFonts.Cmap
|
Nested classes/interfaces inherited from class org.apache.fop.fonts.truetype.OpenFont |
---|
org.apache.fop.fonts.truetype.OpenFont.PostScriptVersion |
Field Summary | |
---|---|
protected MaximumProfileTable |
maxp
|
Fields inherited from class org.apache.fop.fonts.truetype.TTFSubSetFile |
---|
currentPos, glyphOffsets, locaOffset, newDirTabs, offsets, output, realSize |
Fields inherited from class org.apache.fop.fonts.truetype.OpenFont |
---|
advancedTableReader, cid, dirTabs, embedFontName, familyNames, fontFile, fullName, lastLoca, locaFormat, log, mtxTab, nhmtx, notice, numberOfGlyphs, postScriptName, subFamilyName, TRACE_ENABLED, unicodeMappings, useAdvanced, useKerning |
Constructor Summary | |
---|---|
MergeTTFonts(java.util.List<MergeTTFonts.Cmap> cmap)
|
Method Summary | |
---|---|
protected int[] |
buildSubsetIndexToOrigIndexMap(java.util.Map<java.lang.Integer,java.lang.Integer> glyphs)
Get index from starting at lowest glyph position |
protected void |
createHmtx()
Create the hmtx table by copying metrics from original font to subset font. |
byte[] |
getMergedFontSubset()
|
void |
readFont(java.io.InputStream is,
java.lang.String name,
FontContainer fontContainer,
java.util.Map<java.lang.Integer,java.lang.Integer> subsetGlyphs,
boolean cid)
Returns a subset of the original font. |
protected void |
scanGlyphs(org.apache.fop.fonts.truetype.FontFileReader in,
java.util.Map<java.lang.Integer,java.lang.Integer> subsetGlyphs)
|
Methods inherited from class org.apache.fop.fonts.truetype.TTFSubSetFile |
---|
createCheckSumAdjustment, createCvt, createDirectory, createFpgm, createHead, createHhea, createHmtx, createLoca, createMaxp, createName, createOS2, createPost, createPrep, getCheckSum, getFontSubset, pad4, readFont, stream, updateCheckSum, writeBytes, writeULong, writeUShort, writeUShort |
Methods inherited from class org.apache.fop.fonts.truetype.TTFFile |
---|
getLastGlyfLocation, initializeFont, readIndexToLocation, readName, updateBBoxAndOffset |
Methods inherited from class org.apache.fop.fonts.truetype.OpenFont |
---|
checkTTC, convertTTFUnit2PDFUnit, createCMaps, determineAscDesc, getAnsiKerning, getBBox, getBBoxRaw, getBoundingBoxes, getCapHeight, getCharSetName, getCharWidth, getCharWidthRaw, getCMaps, getCopyrightNotice, getDirectoryEntry, getEmbedFontName, getFamilyNames, getFirstChar, getFlags, getFontBBox, getFullName, getGDEF, getGPOS, getGSUB, getItalicAngle, getKerning, getLastChar, getLowerCaseAscent, getLowerCaseDescent, getMtx, getNumGlyphs, getPadSize, getPostScriptName, getStemV, getStrikeoutPosition, getStrikeoutThickness, getSubFamilyName, getTTCnames, getUnderlinePosition, getUnderlineThickness, getWeightClass, getWidths, getXHeight, guessVerticalMetricsFromGlyphBBox, handleCharacterSpacing, hasAdvancedTable, initAnsiWidths, isCFF, isEmbeddable, main, printStuff, readCMAP, readDirTabs, readFont, readFont, readFont, readFontHeader, readHorizontalHeader, readHorizontalMetrics, readKerning, readOS2, readPCLT, readPostScript, seekTab |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MaximumProfileTable maxp
Constructor Detail |
---|
public MergeTTFonts(java.util.List<MergeTTFonts.Cmap> cmap)
Method Detail |
---|
protected void createHmtx() throws java.io.IOException
java.io.IOException
- on errorpublic void readFont(java.io.InputStream is, java.lang.String name, FontContainer fontContainer, java.util.Map<java.lang.Integer,java.lang.Integer> subsetGlyphs, boolean cid) throws java.io.IOException
readFont
in interface MergeFonts
is
- font filename
- namefontContainer
- fontContainersubsetGlyphs
- Map of glyphs (glyphs has old index as (Integer) key and
new index as (Integer) value)cid
- is cid
java.io.IOException
- in case of an I/O problemprotected void scanGlyphs(org.apache.fop.fonts.truetype.FontFileReader in, java.util.Map<java.lang.Integer,java.lang.Integer> subsetGlyphs) throws java.io.IOException
scanGlyphs
in class org.apache.fop.fonts.truetype.TTFSubSetFile
java.io.IOException
public byte[] getMergedFontSubset() throws java.io.IOException
getMergedFontSubset
in interface MergeFonts
java.io.IOException
protected int[] buildSubsetIndexToOrigIndexMap(java.util.Map<java.lang.Integer,java.lang.Integer> glyphs)
buildSubsetIndexToOrigIndexMap
in class org.apache.fop.fonts.truetype.TTFSubSetFile
glyphs
- map
|
fop-pdf-images 2.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |