wxMaxima
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
wxPdfFontSubsetCff Class Reference

Class representing OpenType Font Subsets. (For internal use only) More...

#include <pdffontsubsetcff.h>

Public Member Functions

 wxPdfFontSubsetCff (const wxString &fileName)
 Default constructor.
 
virtual ~wxPdfFontSubsetCff ()
 Default destructor.
 
void DestructDictionary (wxPdfCffDictionary *dict)
 Destruct dictionary.
 
wxMemoryOutputStream * CreateSubset (wxInputStream *inFont, wxPdfChar2GlyphMap *glyphsUsed, bool includeCmap=false)
 Create subset of a font.
 

Protected Member Functions

bool ReadCffFont ()
 Read a font which is in CFF format.
 
bool ReadHeader ()
 Read the font header.
 
bool ReadFontName ()
 Read the font name.
 
bool ReadTopDict ()
 Read the top dictionary.
 
bool ReadStrings ()
 Read the list of strings.
 
bool ReadGlobalSubroutines ()
 read the global subroutines
 
bool ReadFontIndex (wxPdfCffIndexArray *index)
 Read a font index.
 
bool ReadFontDict (wxPdfCffDictionary *dict, int dictOffset, int dictSize)
 Read a font dictionary.
 
bool ReadFdSelect ()
 Read a FD selector.
 
bool ReadCidFontDict ()
 Read the font dictionary of a CID font.
 
bool ReadPrivateDict (wxPdfCffDictionary *privateDict, wxPdfCffIndexArray *localSubIndex, int offset, int size)
 Read a private dictionary.
 
wxPdfCffDictElement * FindDictElement (wxPdfCffDictionary *dict, int key)
 Find a dictionary element.
 
void SetDictElementArgument (wxPdfCffDictionary *dict, int key, wxMemoryOutputStream &buffer)
 Set the argument of a dictionary element.
 
void RemoveDictElement (wxPdfCffDictionary *dict, int key)
 Remove an element from a dictionary.
 
int DecodeInteger ()
 Decode an integer.
 
void EncodeIntegerMax (int value, wxMemoryOutputStream &buffer)
 Encode an integer using maximal size.
 
void EncodeInteger (int value, wxMemoryOutputStream &buffer)
 Encode an integer.
 
void SeekI (int offset)
 Seek to offset in the default font input stream.
 
int TellI ()
 Get the current position in the default font input stream.
 
int GetSizeI ()
 Get the size of the default font input stream.
 
unsigned char ReadByte ()
 Read a byte from the default font input stream.
 
short ReadShort ()
 Read a short integer from the default font input stream.
 
int ReadInt ()
 Read an integer from the default font input stream.
 
int ReadOffset (int offSize)
 Read an offset of specific size from the default font input stream.
 
int ReadOperandLength ()
 Read the length of an operand from the default font input stream.
 
int ReadOperator ()
 Read an operator from the default font input stream.
 
wxString ReadString (int length)
 Read a string from the default font input stream.
 
void GenerateFontSubset ()
 Generate the subset.
 
void SetRosStrings ()
 Set the ROS strings.
 
void SubsetCharstrings ()
 Build the subset of the charstrings' list.
 
void SubsetFontDict ()
 Build the subset of the font dictionary.
 
void CreateCidFontDict ()
 Create a dictionary for a CID font.
 
void SubsetStrings ()
 Build the subset of the strings' list.
 
void SubsetDictString (wxPdfCffDictionary *dict, int op)
 Build the subset of a dictionary string.
 
void SubsetDictStrings (wxPdfCffDictionary *dict)
 Build the subset of the strings' dictionary.
 
void SeekO (int offset)
 Seek offset in the default output stream.
 
int TellO ()
 Get the current position in the default output stream.
 
void WriteFontSubset ()
 Write the font's subset to the default output stream.
 
void WriteHeader ()
 Write the font header.
 
void WriteName ()
 Write the font's name.
 
void WriteTopDict ()
 Write the top dictionary.
 
void WriteDict (wxPdfCffDictionary *dict)
 Write a dictionary.
 
void WriteDictOperator (wxPdfCffDictElement *op)
 Write a dictionary operator.
 
void SetTopDictOperatorToCurrentPosition (int op)
 Set a top dictionary operator to the current position.
 
int GetLocation (wxPdfCffDictionary *dict, int op)
 Get the location of a dictionary in the default output stream.
 
void WriteStrings ()
 Write the list of strings.
 
void WriteGlobalSubrs ()
 Write the list of global subroutines.
 
void WriteCharset ()
 Write the charset.
 
void WriteFdSelect ()
 Write the FD selector.
 
void WriteCharStrings ()
 Write the list of charstrings.
 
void WriteCidFontDict ()
 Write the CID font dictionary.
 
void WriteCidPrivateDictAndLocalSub ()
 Write a CID private dictionary and local subroutines.
 
void WritePrivateDict (int dictNum, wxPdfCffDictionary *parentDict, wxPdfCffDictionary *privateDict)
 Write a private dictionary.
 
void WriteLocalSub (int dictNum, wxPdfCffDictionary *privateDict, wxPdfCffIndexArray *localSubIndex)
 Write the local subroutines.
 
void WriteIndex (wxPdfCffIndexArray *index)
 Write an index.
 
void WriteInteger (int value, int size, wxMemoryOutputStream *buffer)
 Write an integer.
 
void FindLocalAndGlobalSubrsUsed ()
 Find the local and global subroutines used.
 
void SubsetSubrs (wxPdfCffIndexArray &subrIndex, wxPdfSortedArrayInt &subrsUsed)
 Build the subset of the subroutines.
 
void FindSubrsUsed (int fd, wxPdfCffIndexArray &localSubIndex, wxPdfSortedArrayInt &hSubrsUsed, wxArrayInt &lSubrsUsed)
 Find the subroutines used.
 
void FindGlobalSubrsUsed ()
 Find the global subroutines use.
 

Detailed Description

Class representing OpenType Font Subsets. (For internal use only)

Member Function Documentation

◆ CreateSubset()

wxMemoryOutputStream * wxPdfFontSubsetCff::CreateSubset ( wxInputStream *  inFont,
wxPdfChar2GlyphMap *  glyphsUsed,
bool  includeCmap = false 
)

Create subset of a font.

Parameters
inFontstream containing the font data
glyphsUseda list of used glyphs
includeCmapflag whether to include the CMap table
Returns
the stream containing the font subset

◆ DestructDictionary()

void wxPdfFontSubsetCff::DestructDictionary ( wxPdfCffDictionary *  dict)

Destruct dictionary.

Parameters
dictreference of the dictionary to be destructed

The documentation for this class was generated from the following files: