LibreOffice Module vcl (master)  1
Classes | Namespaces | Enumerations | Functions | Variables
sft.hxx File Reference

Sun Font Tools. More...

#include <vcl/dllapi.h>
#include <vcl/fontcapabilities.hxx>
#include <i18nlangtag/lang.h>
#include <array>
#include <memory>
#include <vector>
#include <cstdint>
Include dependency graph for sft.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vcl::TTSimpleGlyphMetrics
 Structure used by GetTTSimpleCharMetrics() functions. More...
 
struct  vcl::GlyphData
 Structure used by the TrueType Creator and GetRawGlyphData() More...
 
struct  vcl::NameRecord
 Structure used by the TrueType Creator and CreateTTFromTTGlyphs() More...
 
struct  vcl::TTGlobalFontInfo
 Return value of GetTTGlobalFontInfo() More...
 
struct  vcl::ControlPoint
 ControlPoint structure used by GetTTGlyphPoints() More...
 
struct  vcl::TrueTypeFont
 

Namespaces

 vcl
 

Typedefs

typedef sal_Int32 vcl::F16Dot16
 fixed: 16.16 More...
 

Enumerations

enum  vcl::SFErrCodes {
  vcl::SFErrCodes::Ok,
  vcl::SFErrCodes::BadFile,
  vcl::SFErrCodes::FileIo,
  vcl::SFErrCodes::Memory,
  vcl::SFErrCodes::GlyphNum,
  vcl::SFErrCodes::BadArg,
  vcl::SFErrCodes::TtFormat,
  vcl::SFErrCodes::FontNo
}
 Return value of OpenTTFont() and CreateT3FromTTGlyphs() More...
 
enum  vcl::WeightClass {
  vcl::FW_THIN = 100,
  vcl::FW_EXTRALIGHT = 200,
  vcl::FW_LIGHT = 300,
  vcl::FW_NORMAL = 400,
  vcl::FW_MEDIUM = 500,
  vcl::FW_SEMIBOLD = 600,
  vcl::FW_BOLD = 700,
  vcl::FW_EXTRABOLD = 800,
  vcl::FW_BLACK = 900
}
 Value of the weight member of the TTGlobalFontInfo struct. More...
 
enum  vcl::WidthClass {
  vcl::FWIDTH_ULTRA_CONDENSED = 1,
  vcl::FWIDTH_EXTRA_CONDENSED = 2,
  vcl::FWIDTH_CONDENSED = 3,
  vcl::FWIDTH_SEMI_CONDENSED = 4,
  vcl::FWIDTH_NORMAL = 5,
  vcl::FWIDTH_SEMI_EXPANDED = 6,
  vcl::FWIDTH_EXPANDED = 7,
  vcl::FWIDTH_EXTRA_EXPANDED = 8,
  vcl::FWIDTH_ULTRA_EXPANDED = 9
}
 Value of the width member of the TTGlobalFontInfo struct. More...
 
enum  vcl::CompositeFlags {
  vcl::ARG_1_AND_2_ARE_WORDS = 1,
  vcl::ARGS_ARE_XY_VALUES = 1<<1,
  vcl::ROUND_XY_TO_GRID = 1<<2,
  vcl::WE_HAVE_A_SCALE = 1<<3,
  vcl::MORE_COMPONENTS = 1<<5,
  vcl::WE_HAVE_AN_X_AND_Y_SCALE = 1<<6,
  vcl::WE_HAVE_A_TWO_BY_TWO = 1<<7,
  vcl::WE_HAVE_INSTRUCTIONS = 1<<8,
  vcl::USE_MY_METRICS = 1<<9,
  vcl::OVERLAP_COMPOUND = 1<<10
}
 Composite glyph flags definition. More...
 

Functions

int vcl::CountTTCFonts (const char *fname)
 Get the number of fonts contained in a TrueType collection. More...
 
SFErrCodes vcl::OpenTTFontBuffer (const void *pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont **ttf)
 TrueTypeFont constructor. More...
 
SFErrCodes vcl::OpenTTFontFile (const char *fname, sal_uInt32 facenum, TrueTypeFont **ttf)
 TrueTypeFont constructor. More...
 
bool vcl::getTTCoverage (boost::optional< std::bitset< UnicodeCoverage::MAX_UC_ENUM >> &rUnicodeRange, boost::optional< std::bitset< CodePageCoverage::MAX_CP_ENUM >> &rCodePageRange, const unsigned char *pTable, size_t nLength)
 
void vcl::CloseTTFont (TrueTypeFont *)
 TrueTypeFont destructor. More...
 
int vcl::GetTTGlyphPoints (TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray)
 Extracts TrueType control points, and stores them in an allocated array pointed to by *pointArray. More...
 
GlyphData * vcl::GetTTRawGlyphData (TrueTypeFont *ttf, sal_uInt32 glyphID)
 Extracts raw glyph data from the 'glyf' table and returns it in an allocated GlyphData structure. More...
 
int vcl::GetTTGlyphComponents (TrueTypeFont *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...
 
int vcl::GetTTNameRecords (TrueTypeFont 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...
 
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 (TrueTypeFont *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...
 
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 (TrueTypeFont const *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical)
 Queries glyph metrics. More...
 
void vcl::GetTTGlobalFontInfo (TrueTypeFont *ttf, TTGlobalFontInfo *info)
 Returns global font information about the TrueType font. More...
 
void vcl::GetTTFontMetrics (const uint8_t *pHhea, size_t nHhea, const uint8_t *pOs2, size_t nOs2, TTGlobalFontInfo *info)
 Returns fonts metrics. More...
 
int vcl::GetTTGlyphCount (TrueTypeFont const *ttf)
 returns the number of glyphs in a font More...
 
bool vcl::GetSfntTable (TrueTypeFont const *ttf, int nSubtableIndex, const sal_uInt8 **ppRawBytes, int *pRawLength)
 provide access to the raw data of a SFNT-container's subtable More...
 

Variables

constexpr int vcl::OS2_Legacy_length = 68
 
constexpr int vcl::OS2_V0_length = 78
 
constexpr int vcl::OS2_V1_length = 86
 
constexpr int vcl::OS2_usWeightClass_offset = 4
 
constexpr int vcl::OS2_usWidthClass_offset = 6
 
constexpr int vcl::OS2_fsType_offset = 8
 
constexpr int vcl::OS2_panose_offset = 32
 
constexpr int vcl::OS2_panoseNbBytes_offset = 10
 
constexpr int vcl::OS2_ulUnicodeRange1_offset = 42
 
constexpr int vcl::OS2_ulUnicodeRange2_offset = 46
 
constexpr int vcl::OS2_ulUnicodeRange3_offset = 50
 
constexpr int vcl::OS2_ulUnicodeRange4_offset = 54
 
constexpr int vcl::OS2_fsSelection_offset = 62
 
constexpr int vcl::OS2_typoAscender_offset = 68
 
constexpr int vcl::OS2_typoDescender_offset = 70
 
constexpr int vcl::OS2_typoLineGap_offset = 72
 
constexpr int vcl::OS2_winAscent_offset = 74
 
constexpr int vcl::OS2_winDescent_offset = 76
 
constexpr int vcl::OS2_ulCodePageRange1_offset = 78
 
constexpr int vcl::OS2_ulCodePageRange2_offset = 82
 
constexpr int vcl::HHEA_Length = 36
 
constexpr int vcl::HHEA_ascender_offset = 4
 
constexpr int vcl::HHEA_descender_offset = 6
 
constexpr int vcl::HHEA_lineGap_offset = 8
 
constexpr int vcl::HHEA_caretSlopeRise_offset = 18
 
constexpr int vcl::HHEA_caretSlopeRun_offset = 20
 
constexpr int vcl::POST_italicAngle_offset = 4
 
constexpr int vcl::POST_underlinePosition_offset = 8
 
constexpr int vcl::POST_underlineThickness_offset = 10
 
constexpr int vcl::POST_isFixedPitch_offset = 12
 
constexpr int vcl::HEAD_Length = 54
 
constexpr int vcl::HEAD_majorVersion_offset = 0
 
constexpr int vcl::HEAD_fontRevision_offset = 4
 
constexpr int vcl::HEAD_magicNumber_offset = 12
 
constexpr int vcl::HEAD_flags_offset = 16
 
constexpr int vcl::HEAD_unitsPerEm_offset = 18
 
constexpr int vcl::HEAD_created_offset = 20
 
constexpr int vcl::HEAD_xMin_offset = 36
 
constexpr int vcl::HEAD_yMin_offset = 38
 
constexpr int vcl::HEAD_xMax_offset = 40
 
constexpr int vcl::HEAD_yMax_offset = 42
 
constexpr int vcl::HEAD_macStyle_offset = 44
 
constexpr int vcl::HEAD_lowestRecPPEM_offset = 46
 
constexpr int vcl::HEAD_fontDirectionHint_offset = 48
 
constexpr int vcl::HEAD_indexToLocFormat_offset = 50
 
constexpr int vcl::HEAD_glyphDataFormat_offset = 52
 
constexpr int vcl::MAXP_Version1Length = 32
 
constexpr int vcl::MAXP_numGlyphs_offset = 4
 
constexpr int vcl::MAXP_maxPoints_offset = 6
 
constexpr int vcl::MAXP_maxContours_offset = 8
 
constexpr int vcl::MAXP_maxCompositePoints_offset = 10
 
constexpr int vcl::MAXP_maxCompositeContours_offset = 12
 
constexpr int vcl::GLYF_Length = 10
 
constexpr int vcl::GLYF_numberOfContours_offset = 0
 
constexpr int vcl::GLYF_xMin_offset = 2
 
constexpr int vcl::GLYF_yMin_offset = 4
 
constexpr int vcl::GLYF_xMax_offset = 6
 
constexpr int vcl::GLYF_yMax_offset = 8
 
constexpr sal_uInt32 vcl::T_true = 0x74727565
 
constexpr sal_uInt32 vcl::T_ttcf = 0x74746366
 
constexpr sal_uInt32 vcl::T_otto = 0x4f54544f
 
constexpr sal_uInt32 vcl::T_maxp = 0x6D617870
 
constexpr sal_uInt32 vcl::T_glyf = 0x676C7966
 
constexpr sal_uInt32 vcl::T_head = 0x68656164
 
constexpr sal_uInt32 vcl::T_loca = 0x6C6F6361
 
constexpr sal_uInt32 vcl::T_name = 0x6E616D65
 
constexpr sal_uInt32 vcl::T_hhea = 0x68686561
 
constexpr sal_uInt32 vcl::T_hmtx = 0x686D7478
 
constexpr sal_uInt32 vcl::T_cmap = 0x636D6170
 
constexpr sal_uInt32 vcl::T_vhea = 0x76686561
 
constexpr sal_uInt32 vcl::T_vmtx = 0x766D7478
 
constexpr sal_uInt32 vcl::T_OS2 = 0x4F532F32
 
constexpr sal_uInt32 vcl::T_post = 0x706F7374
 
constexpr sal_uInt32 vcl::T_cvt = 0x63767420
 
constexpr sal_uInt32 vcl::T_prep = 0x70726570
 
constexpr sal_uInt32 vcl::T_fpgm = 0x6670676D
 
constexpr sal_uInt32 vcl::T_gsub = 0x47535542
 
constexpr sal_uInt32 vcl::T_CFF = 0x43464620
 
constexpr int vcl::O_maxp = 0
 
constexpr int vcl::O_glyf = 1
 
constexpr int vcl::O_head = 2
 
constexpr int vcl::O_loca = 3
 
constexpr int vcl::O_name = 4
 
constexpr int vcl::O_hhea = 5
 
constexpr int vcl::O_hmtx = 6
 
constexpr int vcl::O_cmap = 7
 
constexpr int vcl::O_vhea = 8
 
constexpr int vcl::O_vmtx = 9
 
constexpr int vcl::O_OS2 = 10
 
constexpr int vcl::O_post = 11
 
constexpr int vcl::O_cvt = 12
 
constexpr int vcl::O_prep = 13
 
constexpr int vcl::O_fpgm = 14
 
constexpr int vcl::O_gsub = 15
 
constexpr int vcl::O_CFF = 16
 
constexpr int vcl::NUM_TAGS = 17
 

Detailed Description

Sun Font Tools.

Definition in file sft.hxx.