Techwiki:Win32k/RFONT

From ReactOS Wiki
Jump to: navigation, search

Windows XP version of Realized Font structure. Pool tag is 'Gfnt'

typedef struct
{
    PRFONT prfntPrev; // 000
    PRFONT prfntNext; // 004
} RFONTLINK, *PRFONTLINK;
 
typedef struct
{
    PMATRIX pmx;
    ULONG   ulMode;
} EXFORMOBJ;

typedef struct
{
    GLYPHDATA     *pgdNext;                // 000
    GLYPHDATA     *pgdThreshold;           // 004
    PBYTE          pjFirstBlockEnd;        // 008
    void *         pdblBase;               // 00c
    ULONG          cMetrics;               // 010
    DWORD          unknow_014;
    ULONG          cjbbl;                  // 018
    ULONG          cBlocksMax;             // 01c
    ULONG          cBlocks;                // 020
    ULONG          cGlyphs;                // 024
    ULONG          cjTotal;                // 028
    void *         pbblBase;               // 02c
    void *         pbblCur;                // 030
    GLYPHBITS *    pgbNext;                // 034
    GLYPHBITS *    pgbThreshold;           // 038
    PBYTE          pjAuxCacheMem;          // 03c
    ULONG          cjAuxCacheMem;          // 040
    ULONG          cjGlyphMax;             // 044
    BOOL           bSmallMetrics;          // 048
    ULONG          iMax;                   // 04c
    ULONG          iFirst;                 // 050
    ULONG          cBits;                  // 054
    //                                 size = 058
} CACHE;
typedef struct _FONTOBJ
{
    ULONG     iUniq;
    ULONG     iFace;
    ULONG     cxMax;
    FLONG     flFontType;
    ULONG_PTR iTTUniq;
    ULONG_PTR iFile;
    SIZE      sizLogResPpi;
    ULONG     ulStyleSize;
    PVOID     pvConsumer;
    PVOID     pvProducer;
} FONTOBJ;

iTTUniq

Pointer to the corresponding PFE.

iFile

Identifies the font file. Identical to the HFF member of the corresponding PFF.
typedef struct _RFONT
{
    FONTOBJ        fobj;                   // 000
    ULONG          iUnique;                // 02c
    FLONG          flType;                 // 030
    ULONG          ulContent;              // 034
    PVOID          hdevProducer;           // 038
    BOOL           bDeviceFont;            // 03c
    PVOID          hdevConsumer;           // 040
    DHPDEV         dhpdev;                 // 044
    PFE *          ppfe;                   // 048
    PFF *          pPFF;                   // 04c
    FD_XFORM       fdx;                    // 050
    ULONG          cBitsPerPel;            // 060
    MATRIX         mxWorldToDevice;        // 064
    ULONG          iGraphicsMode;          // 0a0
    FLOATOBJ       eptflNtoWScale_x_i;     // 0a4
    FLOATOBJ       eptflNtoWScale_y_i;     // 0ac
    ULONG          bNtoWIdent;             // 0b4
    EXFORMOBJ      xoForDDI;               // 0b8
    unsigned       unk_000;                // 0c0
    MATRIX         mxForDDI;               // 0c4
    ULONG          flRealizedType;         // 100
    POINTL         ptlUnderline1;          // 104
    POINTL         ptlStrikeOut;           // 10c
    POINTL         ptlULThickness;         // 114
    POINTL         ptlSOThickness;         // 11c
    LONG           lCharInc;               // 124
    FIX            fxMaxAscent;            // 128
    FIX            fxMaxDescent;           // 12c
    FIX            fxMaxExtent;            // 130
    POINTFX        ptfxMaxAscent;          // 134
    POINTFX        ptfxMaxDescent;         // 13c
    ULONG          cxMax;                  // 144
    LONG           lMaxAscent;             // 148
    LONG           lMaxHeight;             // 14c
    ULONG          cyMax;                  // 150
    ULONG          cjGlyphMax;             // 154
    FD_XFORM       fdxQuantized;           // 158
    LONG           lNonLinearExtLeading;   // 168
    LONG           lNonLinearIntLeading;   // 16c
    LONG           lNonLinearMaxCharWidth; // 170
    LONG           lNonLinearAvgCharWidth; // 174
    ULONG          ulOrientation;          // 178
    POINTEF        pteUnitBase;            // 17c
    FLOATOBJ       efWtoDBase;             // 18c
    FLOATOBJ       efDtoWBase;             // 194
    LONG           lAscent;                // 19c
    POINTEF        pteUnitAscent;          // 1A0
    FLOATOBJ       efWtoDAscent;           // 1B0
    FLOATOBJ       efDtoWAscent;           // 1B8
    LONG           lEscapement;            // 1c0
    FLOATOBJ       efWtoDEsc;              // 1c4
    FLOATOBJ       efDtoWEsc;              // 1cc
    ULONG          unknown[4];             // 1d4
    FLOATOBJ       efEscToBase;            // 1e4
    FLOATOBJ       efEscToAscent;          // 1ec
    HGLYPH         hgDefault;              // 1f4 
    HGLYPH         hgBreak;                // 1f8
    FIX            fxBreak;                // 1fc
    FD_GLYPHSET *  pfdg;                   // 200
    void *         wcgp;                   // 204 
    FLONG          flInfo;                 // 208 
    ULONG          cSelected;              // 20c
    RFONTLINK      rflPDEV;                // 210
    RFONTLINK      rflPFF;                 // 218
    void *         hsemCache;              // 220 
    CACHE          cache;                  // 224
    POINTL         ptlSim;                 // 27c
    BOOL           bNeededPaths;           // 284
    FLOATOBJ       efDtoWBase_31;          // 288
    FLOATOBJ       efDtoWAscent_31;        // 290
    TEXTMETRICW *  ptmw;                   // 298
    LONG           lMaxNegA;               // 29c
    LONG           lMaxNegC;               // 2a0
    LONG           lMinWidthD;             // 2a4
    BOOL           bIsSystemFont;          // 2a8
    FLONG          flEUDCState;            // 2ac
    PRFONT         prfntSystemTT;          // 2b0
    PRFONT         prfntSysEUDC;           // 2b4
    PRFONT         prfntDefEUDC;           // 2b8
    PRFONT         paprfntFaceName;        // 2bc
    PRFONT         aprfntQuickBuff[8];     // 2c0
    BOOL           bFilledEudcArray;       // 2e0
    ULONG          ulTimeStamp;            // 2e4
    ULONG          uiNumLinks;             // 2e8
    BOOL           bVertical;              // 2ec
    HSEMAPHORE     hsemCache1;             // 2f0
    ULONG          unknown2                // 2f4
} RFONT, *PRFONT; // size 0x2F4 allocated in RFONTOBJ::bRealizeFont

iUnique

Does NOT match fobj.iUniq. (0)

flType

ulContent

Can be one of:
RFONT_CONTENT_METRICS
RFONT_CONTENT_BITMAPS
RFONT_CONTENT_PATHS

hdevProducer

HDEV of the font device that loaded this font. Identical to the hdev member of the correspinding PFF.

bDeviceFont

TRUE if the font is a device font.

hdevConsumer

HDEV of the device that uses this RFONT to output text.

dhpdev

Driver defined device handle, that identifies the output device identified by hdevConsumer.

ppfe pPFF fdx cBitsPerPel mxWorldToDevice iGraphicsMode eptflNtoWScale_x_i eptflNtoWScale_y_i bNtoWIdent xoForDDI unk_000 mxForDDI


flRealizedType

See FDM_TYPE_XXX flags.

cxMax

Maximum glyph bitmap width, in pixels for this font instance. Not used for outlines.

cyMax

Maximum glyph bitmap height, in pixels for this font instance. Not used for outlines.

cjGlyphMax

Maximum bitmap size of a glyph, in bytes for this font instance.

phg

Pointer to an array of HGLYPHs.

pfdg

'wcgp

Pointer to Gdi glyph cache ('Gcac')

flInfo

see FM_INFO_* in IFIMETRICS

hsemCache

HSEMAPHORE to protect the cache

lMaxNegA

See CHWIDTHINFO and FD_DEVICEMETRICS lMinA

lMaxNegC

See CHWIDTHINFO and FD_DEVICEMETRICS lMinC

lMinWidthD

See CHWIDTHINFO and FD_DEVICEMETRICS lMinD

hsemCache1

HSEMAPHORE to protect the cache

References