public class MergeTTFonts extends org.apache.fop.fonts.truetype.TTFSubSetFile implements MergeFonts
Modifier and Type | Class and Description |
---|---|
static class |
MergeTTFonts.Cmap |
Modifier and Type | Field and Description |
---|---|
protected MaximumProfileTable |
maxp |
currentPos, glyphOffsets, locaOffset, newDirTabs, offsets, output, realSize
advancedTableReader, cid, dirTabs, embedFontName, familyNames, fontFile, fullName, lastLoca, locaFormat, log, mtxTab, nhmtx, notice, numberOfGlyphs, postScriptName, subFamilyName, svgs, TRACE_ENABLED, unicodeMappings, useAdvanced, useKerning
Constructor and Description |
---|
MergeTTFonts(java.util.List<MergeTTFonts.Cmap> cmap) |
Modifier and Type | Method and Description |
---|---|
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) |
createCheckSumAdjustment, createCvt, createDirectory, createFpgm, createHead, createHhea, createHmtx, createLoca, createMaxp, createName, createOS2, createPost, createPrep, getCheckSum, getFontSubset, pad4, readFont, stream, updateCheckSum, writeBytes, writeULong, writeUShort, writeUShort
getLastGlyfLocation, initializeFont, readIndexToLocation, readName, updateBBoxAndOffset
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
protected MaximumProfileTable maxp
public MergeTTFonts(java.util.List<MergeTTFonts.Cmap> cmap)
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 cidjava.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
- mapCopyright 2007-2022 The Apache Software Foundation. All Rights Reserved.