OTFFile (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.fonts.truetype

## Class OTFFile

- java.lang.Object
- - org.apache.fop.fonts.truetype.OpenFont
  - - org.apache.fop.fonts.truetype.OTFFile

- Direct Known Subclasses:
    OTFSubSetWriter

      public class OTFFile
      extends OpenFont

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.fonts.truetype.OpenFont

      `OpenFont.PostScriptVersion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.fontbox.cff.CFFFont` | `fileFont`

    - ### 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, svgs, TRACE_ENABLED, unicodeMappings, useAdvanced, useKerning`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OTFFile()`
    `OTFFile(boolean useKerning, boolean useAdvanced)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `getCFFData(FontFileReader fontFile)` Reads the CFFData from a given font file
    `protected void` | `initializeFont(FontFileReader in)`
    `boolean` | `isType1()`
    `protected void` | `readName()`
    `protected void` | `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, stream`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fileFont

          protected org.apache.fontbox.cff.CFFFont fileFont

  - ### Constructor Detail

    - #### OTFFile

          public OTFFile()
                  throws IOException

      Throws:
        `IOException`

    - #### OTFFile

          public OTFFile(boolean useKerning,
                         boolean useAdvanced)
                  throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### updateBBoxAndOffset

          protected void updateBBoxAndOffset()
                                      throws IOException

      Specified by:
        `updateBBoxAndOffset` in class `OpenFont`
      Throws:
        `IOException`

    - #### initializeFont

          protected void initializeFont(FontFileReader in)
                                 throws IOException

      Specified by:
        `initializeFont` in class `OpenFont`
      Throws:
        `IOException`

    - #### readName

          protected void readName()
                           throws IOException

      Specified by:
        `readName` in class `OpenFont`
      Throws:
        `IOException`

    - #### getCFFData

          public static byte[] getCFFData(FontFileReader fontFile)
                                   throws IOException

      Reads the CFFData from a given font file
      Parameters:
        `fontFile` - The font file being read
      Returns:
        The byte data found in the CFF table
      Throws:
        `IOException`

    - #### isType1

          public boolean isType1()

Copyright © 2025 Apache Software Foundation. All rights reserved.