namespace font
{ // make sure no padding bytes are added for the struct #pragmapack(push, 1)
/** Table directory of a TTF font, values are all in big endian */ struct TableDirectory
{
o3tl::sal_uInt32_BE nSfntVersion;
o3tl::sal_uInt16_BE nNumberOfTables;
o3tl::sal_uInt16_BE nSearchRange;
o3tl::sal_uInt16_BE nEntrySelector;
o3tl::sal_uInt16_BE nRangeShift;
};
// Check the size of OS2Table struct is as expected
static_assert(sizeof(OS2Table) == 100);
/** Structure of "head" table. * *See:https://learn.microsoft.com/en-us/typography/opentype/spec/head
*/ struct HeadTable
{
sal_uInt16 nMajorVersion;
sal_uInt16 nMinorVersion;
sal_uInt32 nFontRevision;
o3tl::sal_uInt32_BE nCheckSumAdjustment;
o3tl::sal_uInt32_BE nMagicNumber;
o3tl::sal_uInt16_BE nFlags;
o3tl::sal_uInt16_BE nUnitsPerEm;
sal_Int64 nCreated; // LONGDATETIME - signed 64-bit (TODO: need a BE type)
sal_Int64 nModified; // LONGDATETIME - signed 64-bit (TODO: need a BE type)
o3tl::sal_uInt16_BE nXMin;
o3tl::sal_uInt16_BE nXMax;
o3tl::sal_uInt16_BE nYMin;
o3tl::sal_uInt16_BE nYMax;
o3tl::sal_uInt16_BE nMacStyle;
o3tl::sal_uInt16_BE nLowestRectPPEM;
o3tl::sal_uInt16_BE nFontDirectionHint;
o3tl::sal_uInt16_BE nIndexToLocFormat;
o3tl::sal_uInt16_BE nGlyphDataFormat;
};
// Check the size of HeadTable struct is as expected
static_assert(sizeof(HeadTable) == 54);
/** Structure of "name" table (Version 0) * *See:https://learn.microsoft.com/en-us/typography/opentype/spec/name
*/ struct NameTable
{
o3tl::sal_uInt16_BE nVersion;
o3tl::sal_uInt16_BE nCount;
o3tl::sal_uInt16_BE nStorageOffset; // Following this are NameRecords -> nCount times
};
/** Name record structure * *ArrayofthosefollowsNameTablestructure.
*/ struct NameRecord
{
o3tl::sal_uInt16_BE nPlatformID;
o3tl::sal_uInt16_BE nEncodingID;
o3tl::sal_uInt16_BE nLanguageID;
o3tl::sal_uInt16_BE nNameID;
o3tl::sal_uInt16_BE nLength; // (in bytes)
o3tl::sal_uInt16_BE nStringOffset; // offset from start of storage area (in bytes)
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.