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

Sun Font Tools. More...

#include <vcl/dllapi.h>
#include <vcl/fontcapabilities.hxx>
#include <vcl/fontcharmap.hxx>
#include <i18nlangtag/lang.h>
#include <array>
#include <memory>
#include <vector>
#include <cstdint>
#include "font/PhysicalFontFace.hxx"
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...
 
class  vcl::AbstractTrueTypeFont
 
class  vcl::TrueTypeFont
 
struct  vcl::TrueTypeFont::TTFontTable_
 

Namespaces

namespace  vcl
 

Typedefs

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

Enumerations

enum class  vcl::SFErrCodes {
  vcl::Ok ,
  vcl::BadFile ,
  vcl::FileIo ,
  vcl::Memory ,
  vcl::GlyphNum ,
  vcl::BadArg ,
  vcl::TtFormat ,
  vcl::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, const FontCharMapRef xCharMap=nullptr)
 TrueTypeFont constructor. More...
 
SFErrCodes vcl::OpenTTFontFile (const char *fname, sal_uInt32 facenum, TrueTypeFont **ttf, const FontCharMapRef xCharMap=nullptr)
 TrueTypeFont constructor. More...
 
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)
 
void vcl::CloseTTFont (TrueTypeFont *)
 TrueTypeFont destructor. More...
 
int vcl::GetTTGlyphPoints (AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< ControlPoint > &pointArray)
 Extracts TrueType control points, and stores them in an allocated array pointed to by *pointArray. More...
 
std::unique_ptr< 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::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...
 
void vcl::GetTTNameRecords (AbstractTrueTypeFont const *ttf, std::vector< NameRecord > &nr)
 Extracts all Name Records from the font and stores them in an allocated array of NameRecord structs. More...
 
SFErrCodes vcl::CreateT3FromTTGlyphs (TrueTypeFont *ttf, SvStream *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, std::vector< sal_uInt8 > &rOutBuffer, sal_uInt16 const *glyphArray, sal_uInt8 const *encoding, int nGlyphs)
 Generates a new TrueType font and dumps it to outf file. More...
 
bool vcl::CreateTTFfontSubset (vcl::AbstractTrueTypeFont &rTTF, std::vector< sal_uInt8 > &rOutBuffer, const sal_GlyphId *pGlyphIds, const sal_uInt8 *pEncoding, const int nOrigGlyphCount, FontSubsetInfo &rInfo)
 
SFErrCodes vcl::CreateT42FromTTGlyphs (TrueTypeFont *ttf, SvStream *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...
 
void vcl::GetTTGlobalFontInfo (AbstractTrueTypeFont *ttf, TTGlobalFontInfo *info)
 Returns global font information about the TrueType font. 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...
 

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_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_CFF = 15
 
constexpr int vcl::NUM_TAGS = 16
 

Detailed Description

Sun Font Tools.

Definition in file sft.hxx.