LibreOffice Module vcl (master)  1
Namespaces | Macros | Enumerations | Functions | Variables
sft.cxx File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sft.hxx>
#include <impfontcharmap.hxx>
#include "ttcr.hxx"
#include "xlat.hxx"
#include <rtl/crc.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
#include <osl/endian.h>
#include <algorithm>
Include dependency graph for sft.cxx:

Go to the source code of this file.




#define HFORMAT_LINELEN   64


enum  PathSegmentType


static voidvcl::smalloc (size_t size)
static voidvcl::scalloc (size_t n, size_t size)
static sal_Int16 vcl::GetInt16 (const sal_uInt8 *ptr, size_t offset)
static sal_uInt16 vcl::GetUInt16 (const sal_uInt8 *ptr, size_t offset)
static sal_Int32 vcl::GetInt32 (const sal_uInt8 *ptr, size_t offset)
static sal_uInt32 vcl::GetUInt32 (const sal_uInt8 *ptr, size_t offset)
static F16Dot16 vcl::fixedMul (F16Dot16 a, F16Dot16 b)
static F16Dot16 vcl::fixedDiv (F16Dot16 a, F16Dot16 b)
static F16Dot16 vcl::fixedMulDiv (F16Dot16 a, F16Dot16 b, F16Dot16 c)
static int vcl::XUnits (int unitsPerEm, int n)
static char vcl::toHex (sal_uInt8 nIndex)
static HexFmt * vcl::HexFmtNew (FILE *outf)
static bool vcl::HexFmtFlush (HexFmt *_this)
static void vcl::HexFmtOpenString (HexFmt *_this)
static void vcl::HexFmtCloseString (HexFmt *_this)
static void vcl::HexFmtDispose (HexFmt *_this)
static void vcl::HexFmtBlockWrite (HexFmt *_this, const void *ptr, sal_uInt32 size)
static void vcl::GetMetrics (AbstractTrueTypeFont const *ttf, sal_uInt32 glyphID, TTGlyphMetrics *metrics)
static int vcl::GetTTGlyphOutline (AbstractTrueTypeFont *, sal_uInt32, ControlPoint **, TTGlyphMetrics *, std::vector< sal_uInt32 > *)
static int vcl::GetSimpleTTOutline (AbstractTrueTypeFont const *ttf, sal_uInt32 glyphID, ControlPoint **pointArray, TTGlyphMetrics *metrics)
static F16Dot16 vcl::fromF2Dot14 (sal_Int16 n)
static int vcl::GetCompoundTTOutline (AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray, TTGlyphMetrics *metrics, std::vector< sal_uInt32 > &glyphlist)
static int vcl::BSplineToPSPath (ControlPoint const *srcA, int srcCount, PSPathElement **path)
static char * vcl::nameExtract (const sal_uInt8 *name, int nTableSize, int n, int dbFlag, sal_Unicode **ucs2result)
static int vcl::findname (const sal_uInt8 *name, sal_uInt16 n, sal_uInt16 platformID, sal_uInt16 encodingID, sal_uInt16 languageID, sal_uInt16 nameID)
static void vcl::GetNames (TrueTypeFont *t)
int vcl::CountTTCFonts (const char *fname)
 Get the number of fonts contained in a TrueType collection. More...
SFErrCodes vcl::OpenTTFontFile (const char *fname, sal_uInt32 facenum, TrueTypeFont **ttf, const FontCharMapRef xCharMap=nullptr)
 TrueTypeFont constructor. More...
SFErrCodes vcl::OpenTTFontBuffer (const void *pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont **ttf, const FontCharMapRef xCharMap=nullptr)
 TrueTypeFont constructor. More...
void vcl::CloseTTFont (TrueTypeFont *)
 TrueTypeFont destructor. More...
int vcl::GetTTGlyphPoints (AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray)
 Extracts TrueType control points, and stores them in an allocated array pointed to by *pointArray. More...
int vcl::GetTTGlyphComponents (AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal_uInt32 > &glyphlist)
 For a specified glyph adds all component glyphs IDs to the list and return their number. More...
SFErrCodes vcl::CreateT3FromTTGlyphs (TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode)
 Generates a new PostScript Type 3 font and dumps it to outf file. More...
SFErrCodes vcl::CreateTTFromTTGlyphs (AbstractTrueTypeFont *ttf, const char *fname, sal_uInt16 const *glyphArray, sal_uInt8 const *encoding, int nGlyphs)
 Generates a new TrueType font and dumps it to outf file. More...
static GlyphOffsets * vcl::GlyphOffsetsNew (sal_uInt8 *sfntP, sal_uInt32 sfntLen)
static void vcl::GlyphOffsetsDispose (GlyphOffsets *_this)
static void vcl::DumpSfnts (FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
SFErrCodes vcl::CreateT42FromTTGlyphs (TrueTypeFont *ttf, FILE *outf, const char *psname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs)
 Generates a new PostScript Type42 font and dumps it to outf file. More...
std::unique_ptr< sal_uInt16[]> vcl::GetTTSimpleGlyphMetrics (AbstractTrueTypeFont const *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical)
 Queries glyph metrics. More...
void vcl::GetTTFontMetrics (const uint8_t *pHhea, size_t nHhea, const uint8_t *pOs2, size_t nOs2, TTGlobalFontInfo *info)
 Returns fonts metrics. More...
bool vcl::GetTTGlobalFontHeadInfo (const AbstractTrueTypeFont *ttf, int &xMin, int &yMin, int &xMax, int &yMax, sal_uInt16 &macStyle)
 Returns part of the head table info, normally collected by GetTTGlobalFontInfo. More...
void vcl::GetTTGlobalFontInfo (TrueTypeFont *ttf, TTGlobalFontInfo *info)
 Returns global font information about the TrueType font. More...
GlyphData * vcl::GetTTRawGlyphData (AbstractTrueTypeFont *ttf, sal_uInt32 glyphID)
 Extracts raw glyph data from the 'glyf' table and returns it in an allocated GlyphData structure. More...
int vcl::GetTTNameRecords (AbstractTrueTypeFont const *ttf, NameRecord **nr)
 Extracts all Name Records from the font and stores them in an allocated array of NameRecord structs. More...
void vcl::DisposeNameRecords (NameRecord *nr, int n)
 Deallocates previously allocated array of NameRecords. More...
template<size_t N>
static void vcl::append (std::bitset< N > &rSet, size_t const nOffset, sal_uInt32 const nValue)
bool vcl::getTTCoverage (std::optional< std::bitset< UnicodeCoverage::MAX_UC_ENUM >> &rUnicodeRange, std::optional< std::bitset< CodePageCoverage::MAX_CP_ENUM >> &rCodePageRange, const unsigned char *pTable, size_t nLength)


const char *const vcl::modname = "SunTypeTools-TT"
const char *const vcl::modver = "1.0"
const char *const vcl::modextra = "gelf"

Macro Definition Documentation

#define HFORMAT_LINELEN   64

Definition at line 96 of file sft.cxx.

Referenced by vcl::HexFmtBlockWrite().