13#include FT_TYPE1_TABLES_H
14#include FT_TRUETYPE_TABLES_H
15#include FT_TRUETYPE_TAGS_H
16#include FT_TRIGONOMETRY_H
20#include FT_SFNT_NAMES_H
21#include FT_SYNTHESIS_H
22#include FT_TRUETYPE_IDS_H
58#define FONTLINK_DEFAULT_CHAR 0x30FB
80 L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink",
107 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\FontAssoc\\Associated DefaultFonts",
145 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\FontAssoc\\Associated Charset",
191#ifndef _TMPF_VARIABLE_PITCH
192 #define _TMPF_VARIABLE_PITCH TMPF_FIXED_PITCH
196#define EMUBOLD_NEEDED(original, request) \
197 (((request) != FW_DONTCARE) && ((request) - (original) >= FW_BOLD - FW_MEDIUM))
204#define gmxWorldToDeviceDefault gmxWorldToPageDefault
210 RTL_CONSTANT_STRING(
L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
219#define ASSERT_FREETYPE_LOCK_HELD() \
220 ASSERT(g_FreeTypeLock->Owner == KeGetCurrentThread())
222#define ASSERT_FREETYPE_LOCK_NOT_HELD() \
223 ASSERT(g_FreeTypeLock->Owner != KeGetCurrentThread())
225#define IntLockFreeType() \
227 ASSERT_FREETYPE_LOCK_NOT_HELD(); \
228 ExEnterCriticalRegionAndAcquireFastMutexUnsafe(g_FreeTypeLock); \
231#define IntUnLockFreeType() \
233 ASSERT_FREETYPE_LOCK_HELD(); \
234 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(g_FreeTypeLock); \
237#define MAX_FONT_CACHE 256
269#define MAXTCIINDEX 32
360 if (pFontLink->bIgnore)
363 if (pFontLink->SharedFace)
380 pFontLink->bIgnore =
TRUE;
384 pFontGDI =
ObjToGDI(pFontObj, FONT);
392 pFontLink->bIgnore =
TRUE;
447 Ptr->IsMapping = IsMapping;
448 DPRINT(
"Creating SharedMem for %p (%i, %p)\n",
Buffer, IsMapping,
Ptr);
481 for (CurrentEntry = g_FontCacheListHead.
Flink;
482 CurrentEntry != &g_FontCacheListHead;
483 CurrentEntry = NextEntry)
486 NextEntry = CurrentEntry->
Flink;
500 if (
Ptr->RefCount <= 0)
504 if (
Ptr->RefCount == 0)
506 DPRINT(
"Releasing SharedMem for %p (%i, %p)\n",
Ptr->Buffer,
Ptr->IsMapping,
Ptr);
532 if (
Ptr->RefCount <= 0)
536 if (
Ptr->RefCount == 0)
538 DPRINT(
"Releasing SharedFace for %s\n",
Ptr->Face->family_name ?
Ptr->Face->family_name :
"<NULL>");
581 pt->x.fract = (
vec->
x & 0x3f) << 10;
582 pt->x.fract |= ((
pt->x.fract >> 6) | (
pt->x.fract >> 12));
584 pt->y.fract = (
vec->
y & 0x3f) << 10;
585 pt->y.fract |= ((
pt->y.fract >> 6) | (
pt->y.fract >> 12));
601 const char *style_name;
620 style_name =
"<invalid>";
623 DPRINT(
"family_name '%s', style_name '%s', FaceName '%wZ', StyleName '%wZ', FontGDI %p, "
624 "FontObj %p, iUnique %lu, SharedFace %p, Face %p, CharSet %u, Filename '%S'\n",
643 DPRINT(
"## DumpFontList(%p)\n", Head);
648 DumpFontEntry(CurrentEntry);
654 DPRINT(
"%wZ,%u -> %wZ,%u\n",
667 DPRINT(
"## DumpFontSubstList\n");
669 for (pListEntry = pHead->
Flink;
671 pListEntry = pListEntry->
Flink)
674 DumpFontSubstEntry(pSubstEntry);
678VOID DumpPrivateFontList(
BOOL bDoLock)
704VOID DumpGlobalFontList(
BOOL bDoLock)
711 DumpFontList(&g_FontListHead);
719 DumpGlobalFontList(bDoLock);
720 DumpPrivateFontList(bDoLock);
737 BYTE InfoBuffer[128];
746 L"Microsoft\\Windows NT\\CurrentVersion\\"
762 &KeyFullInfo,
sizeof(KeyFullInfo), &
Length);
775 InfoBuffer,
sizeof(InfoBuffer), &
Length);
789 DPRINT(
"RtlCreateUnicodeString failed\n");
795 InfoBuffer,
sizeof(InfoBuffer), &
Length);
811 DPRINT(
"RtlCreateUnicodeString failed\n");
853 DPRINT(
"ExAllocatePoolWithTag failed\n");
890 pEntry->pszzFontLink = pszz;
918 L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink",
923 for (
DWORD dwIndex = 0;; ++dwIndex)
926 cbData =
sizeof(szzFontLink);
938 DPRINT(
"szzFontLink: %S\n", szzFontLink);
964 DPRINT1(
"FT_Init_FreeType failed with error code 0x%x\n", ulError);
970 DPRINT1(
"Fonts registry is empty.\n");
999 pHead = &g_FontCacheListHead;
1008 pHead = &g_FontSubstListHead;
1017 pHead = &g_FontListHead;
1043 pmat->
xx = vecAngle.
x;
1044 pmat->
xy = -vecAngle.
y;
1045 pmat->
yx = -pmat->
xy;
1046 pmat->
yy = pmat->
xx;
1082 BYTE RequestedCharSet,
1093 for (pListEntry = pHead->
Flink;
1094 pListEntry != pHead;
1095 pListEntry = pListEntry->
Flink)
1142 UINT RecurseCount = 5;
1153 while (RecurseCount-- > 0)
1156 &OutputNameW, &InputNameW,
1182 pChain->pBaseTextObj = pTextObj;
1183 pChain->pDefFace =
face;
1189 L"tahoma.ttf,Tahoma\0"
1190 L"msgothic.ttc,MS UI Gothic\0"
1191 L"mingliu.ttc,PMingLiU\0"
1192 L"simsun.ttc,SimSun\0"
1193 L"gulim.ttc,Gulim\0"
1197 L"cour.ttf,Courier New\0"
1198 L"msgothic.ttc,MS Gothic\0"
1199 L"mingliu.ttc,MingLiU\0"
1200 L"simsun.ttc,NSimSun\0"
1201 L"gulim.ttc,GulimChe\0"
1297 pChain->pszzFontLink =
pEntry->pszzFontLink;
1308 PTEXTOBJ pTextObj = pChain->pBaseTextObj;
1334 default: bFixCharSet =
TRUE;
break;
1339 pChain->LogFont = lfBase;
1346 pszLink = pChain->pszzFontLink;
1349 DPRINT(
"pszLink: '%S'\n", pszLink);
1353 pszLink +=
wcslen(pszLink) + 1;
1362 DPRINT(
"szEntry: '%S'\n", szEntry);
1384 BYTE *DirInfoBuffer;
1426 if (DirInfoBuffer ==
NULL)
1444 Status = ZwQueryDirectoryFile(
1493 bRestartScan =
FALSE;
1509 if (CodePageRange1 == 0)
1512 for (BitIndex = 0; BitIndex <
MAXTCIINDEX; ++BitIndex)
1514 if (CodePageRange1 & (1 << BitIndex))
1517 if ((nIndex >= 0) && (nCount == (
UINT)nIndex))
1531 FT_Error ft_err = FT_Err_Invalid_CharMap_Handle;
1532 FT_CharMap cmap0, cmap1, cmap2, cmap3, cmap_def;
1535 cmap0 = cmap1 = cmap2 = cmap3 = cmap_def =
NULL;
1541 TRACE(
"found cmap with platform_id %u, encoding_id %u\n",
1589 static const FT_Encoding regular_order[] = { FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, FT_ENCODING_MS_SYMBOL, 0 };
1590 static const FT_Encoding symbol_order[] = { FT_ENCODING_MS_SYMBOL, FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, 0 };
1601 if (!
face->charmap &&
face->num_charmaps)
1604 return face->charmap->encoding;
1636 Face = SharedFace->
Face;
1739 if (pOS2 && os2_version >= 1)
1746 for (BitIndex = 0; BitIndex <
MAXTCIINDEX; ++BitIndex)
1748 if (os2_ulCodePageRange1 & (1 << BitIndex))
1753 if ((CharSetIndex == -1 && CharSetCount == 0) ||
1754 CharSetIndex == CharSetCount)
1789 if (CharSetIndex == -1)
1797 ERR(
"Could not find desired charmap!\n");
1798 Error = FT_Err_Invalid_CharMap_Handle;
1799 goto CleanupAndFail;
1821 goto CleanupAndFail;
1824 DPRINT(
"Font loaded: %s (%s)\n",
1831 Entry->Font = FontGDI;
1832 Entry->NotEnum = (Characteristics & FR_NOT_ENUM);
1835 if (Characteristics & FR_PRIVATE)
1850 if (CharSetIndex == -1)
1855 if (
Entry->StyleName.Length)
1856 NameLength +=
Entry->StyleName.Length +
sizeof(
WCHAR);
1884 *pValueName = NewString;
1886 if (
Entry->StyleName.Length)
1892 for (
i = 1;
i < CharSetCount; ++
i)
1935 ((FontIndex == -1) ? 0 : FontIndex), &Face);
1939 if (
Error == FT_Err_Unknown_File_Format)
1940 DPRINT1(
"Unknown font file format\n");
1942 DPRINT1(
"Error reading font (error code: %d)\n",
Error);
1964 WARN(
"Could not find default charmap!\n");
1977 DPRINT1(
"SharedFace_Create failed\n");
1982 if (FontIndex == -1)
2028 RtlInitEmptyUnicodeString(&PathName, pszBuffer,
Length);
2051 DPRINT1(
"Could not load font file: %wZ\n", &PathName);
2060 DPRINT1(
"ObReferenceObjectByHandle failed.\n");
2073 DPRINT1(
"Could not map file: %wZ\n", &PathName);
2084 DPRINT1(
"Could not map file: %wZ\n", &PathName);
2094 LoadFont.Characteristics = Characteristics;
2122 RtlInitEmptyUnicodeString(&NewString, pszBuffer,
Length);
2145 RtlInitEmptyUnicodeString(&NewString, pszBuffer,
Length);
2171 pFileName = PathName.
Buffer;
2212 cchFile =
wcslen(pchFile);
2223 ustrPathName.
Buffer = pchFile;
2230 pchFile += cchFile + 1;
2242 ULONG dwIndex, NameLength, ValueSize, dwType;
2251 ValueSize =
sizeof(szValue);
2281 PWSTR pszBuffer, pszFileTitle;
2293 RtlInitEmptyUnicodeString(&PathName, pszBuffer,
Length);
2304 pszFileTitle = PathName.
Buffer;
2308 if (!pszFileTitle || !*pszFileTitle)
2316 for (CurrentEntry = g_FontListHead.
Flink;
2317 CurrentEntry != &g_FontListHead;
2318 CurrentEntry = NextEntry)
2321 NextEntry = CurrentEntry->
Flink;
2323 FontGDI = FontEntry->
Font;
2353 cchFile =
wcslen(pchFile);
2364 ustrPathName.
Buffer = pchFile;
2370 pchFile += cchFile + 1;
2406 &KeyFullInfo,
sizeof(KeyFullInfo), &
Length);
2419 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2425 for (
i = 0;
i < KeyFullInfo.
Values; ++
i)
2429 InfoBuffer, InfoSize, &
Length);
2438 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2443 InfoBuffer, InfoSize, &
Length);
2458 DPRINT1(
"RtlCreateUnicodeString failed\n");
2464 InfoBuffer, InfoSize, &
Length);
2473 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2478 InfoBuffer, InfoSize, &
Length);
2498 L"\\SystemRoot\\Fonts\\%s", pchPath);
2525 return (KeyFullInfo.
Values != 0 && nFontCount != 0);
2546 LoadFont.Characteristics = FR_PRIVATE | FR_NOT_ENUM;
2560 if (EntryCollection)
2570 Ret = EntryCollection->
Handle;
2630 if (CurrentEntry->
Handle == hMMFont)
2632 EntryCollection = CurrentEntry;
2640 if (EntryCollection)
2657 DPRINT(
"IntGdiCleanupPrivateFontsForProcess()\n");
2660 EntryCollection =
NULL;
2673 if (EntryCollection)
2750 if (lf->lfEscapement != lf->lfOrientation)
2843 int Ascent, Descent;
2900 - ((Ascent + Descent)
2902 YScale) + 32) >> 6);
3091 Names->OtmSize = OtmSize;
3108 Otm->otmpFamilyName = (
LPSTR)(pb - (
BYTE*) Otm);
3112 Otm->otmpFaceName = (
LPSTR)(pb - (
BYTE*) Otm);
3116 Otm->otmpStyleName = (
LPSTR)(pb - (
BYTE*) Otm);
3120 Otm->otmpFullName = (
LPSTR)(pb - (
BYTE*) Otm);
3194 if (Size < Cache->OutlineRequiredSize)
3196 DPRINT1(
"Size %u < OutlineRequiredSize %u\n",
Size,
3216 DPRINT1(
"Can't find OS/2 table - not TT font?\n");
3225 DPRINT1(
"Can't find HHEA table - not TT font?\n");
3246#define SCALE_X(value) ((FT_MulFix((value), XScale) + 32) >> 6)
3247#define SCALE_Y(value) ((FT_MulFix((value), YScale) + 32) >> 6)
3304 INT i,
Count, BestIndex, Score, BestScore;
3335 if (
Name.name_id != NameID)
3346 (
Name.string[0] == 0 &&
Name.string[1] == 0))
3370 if (Score > BestScore)
3480 Lf = &
Info->EnumLogFontEx.elfLogFont;
3493 Ntm = &
Info->NewTextMetricEx.ntmTm;
3538 sizeof(
Info->EnumLogFontEx.elfFullName),
3542 StyleW.
Buffer =
Info->EnumLogFontEx.elfStyle;
3583 if (
fs.fsCsb[0] == 0)
3590 case FT_ENCODING_UNICODE:
3591 case FT_ENCODING_APPLE_ROMAN:
3594 case FT_ENCODING_MS_SYMBOL:
3606 if (
fs.fsCsb[0] & fs0)
3618 DPRINT1(
"Unknown elfscript for bit %u\n",
i);
3623 Info->NewTextMetricEx.ntmFontSig =
fs;
3643 FontGDI = CurrentEntry->
Font;
3769 const DWORD *pdw = pv;
3785 DWORD dwHash = pCache->dwHash;
3789 for (CurrentEntry = g_FontCacheListHead.
Flink;
3790 CurrentEntry != &g_FontCacheListHead;
3791 CurrentEntry = CurrentEntry->
Flink)
3794 if (FontEntry->
dwHash == dwHash &&
3796 FontEntry->
Hashed.
Face == pCache->Hashed.Face &&
3807 if (CurrentEntry == &g_FontCacheListHead)
3833 DPRINT1(
"Failure caching glyph.\n");
3841 DPRINT1(
"Failure rendering glyph.\n");
3848 DPRINT1(
"Alloc failure caching glyph.\n");
3855 if (FT_Bitmap_Convert_ReactOS_Hack(GlyphSlot->library, &BitmapGlyph->
bitmap,
3856 &AlignedBitmap, 4,
TRUE))
3858 DPRINT1(
"Conversion failed\n");
3866 BitmapGlyph->
bitmap = AlignedBitmap;
3869 NewEntry->
dwHash = Cache->dwHash;
3870 NewEntry->
Hashed = Cache->Hashed;
3887 int needed = 0,
point = 0, contour, first_pt;
3888 unsigned int pph_start, cpfx;
3891 for (contour = 0; contour <
outline->n_contours; contour++)
3908 needed +=
sizeof(*pph);
3910 while (point <= outline->contours[contour])
3922 }
while (point <= outline->contours[contour] &&
3934 else if (point <= outline->contours[contour] &&
3948 needed +=
sizeof(*ppc) + (cpfx - 1) *
sizeof(
POINTFX);
3951 pph->
cb = needed - pph_start;
3974 int contour,
point = 0, first_pt;
3979 unsigned int needed = 0;
3981 for (contour = 0; contour <
outline->n_contours; contour++)
3991 needed +=
sizeof(*pph);
3993 while (point <= outline->contours[contour])
4020 cubic_control[0].
x >>= 1;
4021 cubic_control[0].
y >>= 1;
4024 cubic_control[3] =
outline->points[first_pt];
4032 cubic_control[3].
x >>= 1;
4033 cubic_control[3].
y >>= 1;
4038 cubic_control[1].
x = (2 *
outline->points[
point].x + 1) / 3;
4039 cubic_control[1].
y = (2 *
outline->points[
point].y + 1) / 3;
4040 cubic_control[2] = cubic_control[1];
4041 cubic_control[1].
x += (cubic_control[0].
x + 1) / 3;
4042 cubic_control[1].
y += (cubic_control[0].
y + 1) / 3;
4043 cubic_control[2].
x += (cubic_control[3].
x + 1) / 3;
4044 cubic_control[2].
y += (cubic_control[3].
y + 1) / 3;
4054 }
while (point <= outline->contours[contour] &&
4060 if (point <= outline->contours[contour] &&
4072 needed +=
sizeof(*ppc) + (cpfx - 1) *
sizeof(
POINTFX);
4075 pph->
cb = needed - pph_start;
4097 LONG Ascent, Descent, Sum, EmHeight;
4098 LONG tmHeight, tmAscent, tmDescent, tmInternalLeading;
4100 lfWidth =
abs(lfWidth);
4105 DPRINT(
"lfHeight and lfWidth are zero.\n");
4121 if (!pOS2 || !pHori)
4126 ERR(
"%s: Failed to request font size.\n",
face->family_name);
4131 tmAscent = WinFNT.
ascent;
4133 *ptmHeight = tmHeight;
4135 *ptmAscent = tmAscent;
4137 *ptmDescent = tmHeight - tmAscent;
4138 if (ptmInternalLeading)
4141 *plfHeight = lfHeight;
4143 *plfWidth = lfWidth;
4156#define FM_SEL_USE_TYPO_METRICS 0x80
4165 Sum = Ascent + Descent;
4173 tmAscent =
FT_MulDiv(lfHeight, Ascent, Sum);
4174 tmDescent =
FT_MulDiv(lfHeight, Descent, Sum);
4175 tmHeight = tmAscent + tmDescent;
4176 tmInternalLeading = tmHeight -
FT_MulDiv(lfHeight,
face->units_per_EM, Sum);
4178 else if (lfHeight < 0)
4191 tmHeight = tmAscent + tmDescent;
4192 tmInternalLeading = tmHeight + lfHeight;
4194#undef FM_SEL_USE_TYPO_METRICS
4196 EmHeight = tmHeight - tmInternalLeading;
4197 EmHeight =
max(EmHeight, 1);
4218 req.
height = (EmHeight << 6);
4224 ERR(
"%s: Failed to request font size.\n",
face->family_name);
4229 *ptmHeight = tmHeight;
4231 *ptmAscent = tmAscent;
4233 *ptmDescent = tmDescent;
4234 if (ptmInternalLeading)
4235 *ptmInternalLeading = tmInternalLeading;
4237 *plfHeight = lfHeight;
4239 *plfWidth = lfWidth;
4251 &FontGDI->tmHeight, &FontGDI->tmAscent,
4252 &FontGDI->tmDescent, &FontGDI->tmInternalLeading,
4253 &FontGDI->lfHeight, &FontGDI->lfWidth);
4266 PLOGFONTW plf = &TextObj->logfont.elfEnumLogfontEx.elfLogFont;
4292 if (glyph < 0x100) glyph += 0xf000;
4331 DPRINT1(
"%S, %p, %p\n", pChain->LogFont.lfFaceName, pChain->pBaseTextObj, pChain->pDefFace);
4333 Head = &pChain->FontLinkList;
4337 DPRINT1(
"FontLink #%d: %p, %d, %S, %p, %p\n",
4383 DPRINT(
"code: 0x%08X, index: 0x%08X, fCodeAsIndex:%d\n",
code,
index, fCodeAsIndex);
4384 pCache->Hashed.Face = *pFace = pChain->pDefFace;
4395 Head = &pChain->FontLinkList;
4409 pCache->Hashed.Face = *pFace =
face;
4413 pChain->LogFont.lfWidth,
4414 pChain->LogFont.lfHeight,
4425 pCache->Hashed.Face = *pFace = pChain->pDefFace;
4442 BOOL bIgnoreRotation)
4469 cjBuf, pvBuf, pmat2);
4471 pdcattr =
dc->pdcattr;
4548 DPRINT1(
"WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index);
4554 if (aveWidth && potm)
4583 DPRINT(
"Advance = %d, lsb = %d, bbx = %d\n",adv, lsb, bbx);
4600 needsTransform =
TRUE;
4614 needsTransform =
TRUE;
4622 DPRINT(
"Rotation Trans!\n");
4625 needsTransform =
TRUE;
4632 DPRINT(
"MAT2 Matrix Trans!\n");
4638 needsTransform =
TRUE;
4643 if (!needsTransform)
4645 DPRINT(
"No Need to be Transformed!\n");
4656 for (xc = 0; xc < 2; xc++)
4658 for (yc = 0; yc < 2; yc++)
4666 if (xc == 0 && yc == 0)
4697 DPRINT(
"CX %d CY %d BBX %u BBY %u GOX %d GOY %d\n",
4706 DPRINT(
"GGO_METRICS Exit!\n");
4723 pitch = ((
width + 31) >> 5) << 2;
4726 if (!pvBuf || !
cjBuf)
break;
4751 ft_bitmap.
pitch = pitch;
4753 ft_bitmap.
buffer = pvBuf;
4780 unsigned int mult,
row, col;
4785 pitch = (
width + 3) / 4 * 4;
4788 if (!pvBuf || !
cjBuf)
break;
4802 for (
x = 0; (
UINT)
x < pitch;
x++)
4804 if (x < ft_face->glyph->bitmap.width)
4805 dst[
x] = (
src[
x / 8] & (1 << ( (7 - (
x % 8))))) ? 0xff : 0;
4818 ft_bitmap.
pitch = pitch;
4820 ft_bitmap.
buffer = pvBuf;
4847 for (col = 0; col <
width; col++,
ptr++)
4849 *
ptr = (((
int)*
ptr) * mult + 128) / 256;
4875 if (!pvBuf || !
cjBuf)
4895 if (needsTransform && pvBuf)
4903 if (!pvBuf || !
cjBuf)
4917 DPRINT(
"ftGdiGetGlyphOutline END and needed %lu\n", needed);
4938 Cache->dwHash =
IntGetHash(&Cache->Hashed,
sizeof(Cache->Hashed) /
sizeof(
DWORD));
4947 DPRINT1(
"WARNING: Failed to load and render glyph! [index: %d]\n", Cache->Hashed.GlyphIndex);
4951 glyph = Cache->Hashed.Face->glyph;
4953 if (Cache->Hashed.Aspect.Emu.Bold)
4956 if (Cache->Hashed.Aspect.Emu.Italic)
4962 DPRINT1(
"Failed to render glyph! [index: %d]\n", Cache->Hashed.GlyphIndex);
4982 INT glyph_index,
i, previous, nTenthsOfDegrees;
4985 BOOL use_kerning, bVerticalWriting;
4986 LONG ascender, descender;
4991 FontGDI =
ObjToGDI(TextObj->Font, FONT);
4999 plf = &TextObj->logfont.elfEnumLogfontEx.elfLogFont;
5007 bVerticalWriting = ((nTenthsOfDegrees == 90 * 10) || (nTenthsOfDegrees == 270 * 10));
5052 if (use_kerning && previous && glyph_index)
5056 TotalWidth64 += delta.
x;
5061 if (((TotalWidth64 + 32) >> 6) <= MaxExtent &&
NULL != Fit)
5067 Dx[
i] = (TotalWidth64 + 32) >> 6;
5070 previous = glyph_index;
5077 if (bVerticalWriting)
5079 Size->cx = ascender + descender;
5080 Size->cy = (TotalWidth64 + 32) >> 6;
5084 Size->cx = (TotalWidth64 + 32) >> 6;
5085 Size->cy = ascender + descender;
5111 pdcattr = Dc->pdcattr;
5147 DPRINT(
"Csb 1=%x 0=%x\n",
fs.fsCsb[1],
fs.fsCsb[0]);
5148 if (
fs.fsCsb[0] == 0)
5154 case FT_ENCODING_UNICODE:
5155 case FT_ENCODING_APPLE_ROMAN:
5158 case FT_ENCODING_MS_SYMBOL:
5185 if (
fs.fsCsb[0] & fs0)
5195 DPRINT1(
"TCI failing on %x\n", fs0);
5209 DWORD num_ranges = 0;
5214 DPRINT1(
"FIXME: No charmap selected! This is a BUG!\n");
5221 if (
face->charmap->encoding == FT_ENCODING_UNICODE)
5224 FT_ULong char_code, char_code_prev;
5228 DPRINT(
"Face encoding FT_ENCODING_UNICODE, number of glyphs %ld, first glyph %u, first char %04lx\n",
5229 face->num_glyphs, glyph_code, char_code);
5236 glyphset->ranges[0].wcLow = (
USHORT)char_code;
5237 glyphset->ranges[0].cGlyphs = 0;
5238 glyphset->cGlyphsSupported = 0;
5244 if (char_code < char_code_prev)
5246 DPRINT1(
"Expected increasing char code from FT_Get_Next_Char\n");
5249 if (char_code - char_code_prev > 1)
5254 glyphset->ranges[num_ranges - 1].wcLow = (
USHORT)char_code;
5255 glyphset->ranges[num_ranges - 1].cGlyphs = 1;
5256 glyphset->cGlyphsSupported++;
5261 glyphset->ranges[num_ranges - 1].cGlyphs++;
5262 glyphset->cGlyphsSupported++;
5264 char_code_prev = char_code;
5269 DPRINT1(
"Encoding %i not supported\n",
face->charmap->encoding);
5271 size =
sizeof(GLYPHSET) +
sizeof(WCRANGE) * (num_ranges - 1);
5274 glyphset->cbThis =
size;
5275 glyphset->cRanges = num_ranges;
5276 glyphset->flAccel = 0;
5313 pdcattr =
dc->pdcattr;
5315 if (
NULL != TextObj)
5340 DPRINT1(
"Can't find OS/2 table - not TT font?\n");
5343 if (!pHori &&
Error)
5345 DPRINT1(
"Can't find HHEA table - not TT font?\n");
5389 (
Table << 8 & 0xFF0000);
5411#define GOT_PENALTY(name, value) Penalty += (value)
5417 const char * style_name)
5583 fNeedScaling =
TRUE;
5592 fNeedScaling =
TRUE;
5638 fNeedScaling =
TRUE;
5747 DPRINT(
"WARNING: Penalty:%ld < 200: RequestedNameW:%ls, "
5748 "ActualNameW:%ls, lfCharSet:%d, lfWeight:%ld, "
5749 "tmCharSet:%d, tmWeight:%ld\n",
5770 UINT OtmSize, OldOtmSize = 0;
5787 FontGDI = CurrentEntry->
Font;
5794 if (OtmSize > OldOtmSize)
5812 OldOtmSize = OtmSize;
5815 if (*MatchPenalty ==
MAXULONG || Penalty < *MatchPenalty)
5817 *FontObj =
GDIToObj(FontGDI, FONT);
5818 *MatchPenalty = Penalty;
5940 DPRINT(
"ZwOpenFile() failed (Status = 0x%lx)\n",
Status);
5948 DPRINT(
"ZwQueryObject() failed (Status = %lx)\n",
Status);
6004 if (
NULL == TextObj)
6023 SubstitutedLogFont = *pLogFont;
6025 DPRINT(
"Font '%S,%u' is substituted by '%S,%u'.\n",
6029 MatchPenalty = 0xFFFFFFFF;
6048 DPRINT1(
"Request font %S not found, no fonts loaded at all\n",
6118 const ULONG MaxFamInfo = 64;
6123 DPRINT(
"IntGdiGetFontResourceInfo: dwType == %lu\n", dwType);
6144 if (!NameInfo1 || !NameInfo2 || !FamInfo)
6160 for (ListEntry = g_FontListHead.
Flink; ListEntry != &g_FontListHead;
6161 ListEntry = ListEntry->
Flink)
6189 if (
Count >= MaxFamInfo)
6199 if (
Count == 0 && dwType != 5)
6235 Size +=
wcslen(FamInfo[
i].EnumLogFontEx.elfLogFont.lfFaceName);
6236 if (FamInfo[
i].EnumLogFontEx.elfStyle[0] &&
6237 _wcsicmp(FamInfo[
i].EnumLogFontEx.elfStyle,
L"Regular") != 0)
6239 Size += 1 +
wcslen(FamInfo[
i].EnumLogFontEx.elfStyle);
6384 Info->dwUnknown = -1;
6401 FT_UInt previous_index = 0, glyph_index = 0;
6411 if (previous_index && glyph_index)
6415 if (pKerningPair && cPairs)
6417 pKerningPair[
i].
wFirst = char_previous;
6418 pKerningPair[
i].
wSecond = char_code;
6421 if (
i == cPairs)
break;
6425 previous_index = glyph_index;
6426 char_previous = char_code;
6447 LONG AvailCount = 0;
6453 InfoCount, &g_FontListHead))
6491 LONG GotCount, AvailCount, SafeInfoCount;
6494 if (UnsafeLogFont ==
NULL || UnsafeInfo ==
NULL || UnsafeInfoCount ==
NULL)
6519 if (SafeInfoCount <= 0)
6542 GotCount =
min(AvailCount, SafeInfoCount);
6543 SafeInfoCount = AvailCount;
6620 (fuOptions & ETO_GLYPH_INDEX));
6621 Cache->Hashed.GlyphIndex = glyph_index;
6628 if (use_kerning && previous && glyph_index)
6642 vec.
x = (Dx[2 *
i + 0] << 6);
6643 vec.
y = (Dx[2 *
i + 1] << 6);
6651 vec.
x = (Dx[
i] << 6);
6659 previous = glyph_index;
6692 LONGLONG X64, Y64, RealXStart64, RealYStart64, DeltaX64, DeltaY64;
6694 RECTL DestRect, MaskRect;
6705 BOOL use_kerning, bResult, DoBreak;
6710 const DWORD del = 0x7f, nbsp = 0xa0;
6733 if (!
dc->dclevel.pSurface)
6740 pdcattr =
dc->pdcattr;
6759 psurf =
dc->dclevel.pSurface;
6784 &
dc->eboBackground.BrushObject);
6785 fuOptions &= ~ETO_OPAQUE;
6796 if (TextObj ==
NULL)
6802 FontObj = TextObj->
Font;
6842 bNoTransform = ((
mat.xy == 0) && (
mat.yx == 0) &&
6843 (
mat.xx == (1 << 16)) && (
mat.yy == (1 << 16)));
6847 vecAscent64.
y = (FontGDI->
tmAscent << 6);
6854#define VALIGN_MASK (TA_TOP | TA_BASELINE | TA_BOTTOM)
6861 RealXStart64 -= vecDescent64.
x;
6862 RealYStart64 += vecDescent64.
y;
6866 RealXStart64 -= vecAscent64.
x;
6867 RealYStart64 += vecAscent64.
y;
6877 fuOptions, bNoTransform, &Chain))
6887 RealXStart64 -= DeltaX64 / 2;
6888 RealYStart64 -= DeltaY64 / 2;
6892 RealXStart64 -= DeltaX64;
6893 RealYStart64 -= DeltaY64;
6899 INT X0 = (RealXStart64 + vecAscent64.
x + 32) >> 6;
6900 INT Y0 = (RealYStart64 - vecAscent64.
y + 32) >> 6;
6901 INT DX = (DeltaX64 >> 6);
6904 INT CY = (vecAscent64.
y - vecDescent64.
y + 32) >> 6;
6909 INT DY = (DeltaY64 >> 6);
6910 INT X1 = ((RealXStart64 + vecDescent64.
x + 32) >> 6);
6911 INT Y1 = ((RealYStart64 - vecDescent64.
y + 32) >> 6);
6915 { X0 +
DX, Y0 + DY },
6916 { X1 +
DX, Y1 + DY },
6953 (fuOptions & ETO_GLYPH_INDEX));
6964 if (use_kerning && previous && glyph_index &&
NULL == Dx)
6971 DPRINT(
"X64, Y64: %I64d, %I64d\n", X64, Y64);
6978 if (ch0 >
L' ' && ch0 !=
del && ch0 != nbsp && glyphSize.
cx == 0)
6980 DPRINT1(
"WARNING: family_name '%s' WChar 0x%04x has a glyphSize.cx of zero\n",
6981 face->family_name, ch0);
6987 (ch0 ==
L' ' || ch0 == nbsp))
6993 glyphSize.
cx = spaceWidth.
cx;
6994 realglyph->
left = 0;
7000 DestRect.
left = ((X64 + 32) >> 6) + realglyph->
left;
7002 DestRect.
top = ((Y64 + 32) >> 6) - realglyph->
top;
7006 if ((glyphSize.
cx != 0) && (glyphSize.
cy != 0))
7018 DPRINT1(
"WARNING: EngCreateBitmap() failed!\n");
7027 DPRINT1(
"WARNING: EngLockSurface() failed!\n");
7060 &
dc->eboText.BrushObject,
7063 DPRINT1(
"Failed to MaskBlt a glyph!\n");
7080 vec.
x = (Dx[2 *
i + 0] << 6);
7081 vec.
y = (Dx[2 *
i + 1] << 6);
7089 vec.
x = (Dx[
i] << 6);
7097 DPRINT(
"New X64, New Y64: %I64d, %I64d\n", X64, Y64);
7099 previous = glyph_index;
7111 DeltaX64 = X64 - RealXStart64;
7112 DeltaY64 = Y64 - RealYStart64;
7114 if (!
face->units_per_EM)
7122 face->underline_position *
face->size->metrics.y_ppem /
face->units_per_EM;
7124 face->underline_thickness *
face->size->metrics.y_ppem /
face->units_per_EM;
7134 vecB64.
y = vecA64.
y + (thickness << 6);
7138 INT X0 = (RealXStart64 - vecA64.
x + 32) >> 6;
7139 INT Y0 = (RealYStart64 + vecA64.
y + 32) >> 6;
7140 INT DX = (DeltaX64 >> 6);
7143 INT CY = (vecB64.
y - vecA64.
y + 32) >> 6;
7148 INT DY = (DeltaY64 >> 6);
7149 INT X1 = X0 + ((vecA64.
x - vecB64.
x + 32) >> 6);
7150 INT Y1 = Y0 + ((vecB64.
y - vecA64.
y + 32) >> 6);
7154 { X0 +
DX, Y0 + DY },
7155 { X1 +
DX, Y1 + DY },
7166 vecA64.
y = -(FontGDI->
tmAscent << 6) / 3;
7168 vecB64.
y = vecA64.
y + (thickness << 6);
7172 INT X0 = (RealXStart64 - vecA64.
x + 32) >> 6;
7173 INT Y0 = (RealYStart64 + vecA64.
y + 32) >> 6;
7174 INT DX = (DeltaX64 >> 6);
7177 INT CY = (vecB64.
y - vecA64.
y + 32) >> 6;
7182 INT DY = (DeltaY64 >> 6);
7183 INT X1 = X0 + ((vecA64.
x - vecB64.
x + 32) >> 6);
7184 INT Y1 = Y0 + ((vecB64.
y - vecA64.
y + 32) >> 6);
7188 { X0 +
DX, Y0 + DY },
7189 { X1 +
DX, Y1 + DY },
7206 if (TextObj !=
NULL)
7253#define STACK_TEXT_BUFFER_SIZE 512
7296 if (
BufSize >
sizeof(LocalBuffer))
7342 SafeRect = *UnsafeRect;
7368 if (
Buffer != LocalBuffer)
7395 UINT i, glyph_index;
7405 pdcattr =
dc->pdcattr;
7411 if (TextObj ==
NULL)
7433 SafeBuffF = SafeBuffer;
7435 SafeBuffI = SafeBuffer;
7437 for (
i = FirstChar;
i < FirstChar+
Count;
i++)
7448 left = (
INT)
face->glyph->metrics.horiBearingX & -64;
7449 right = (
INT)((
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width) + 63) & -64;
7450 adv = (
face->glyph->advance.x + 32) >> 6;
7464 SafeBuffF[
i - FirstChar].
abcfC = (
FLOAT) (adv - lsb - bbx);
7468 SafeBuffI[
i - FirstChar].
abcA = lsb;
7469 SafeBuffI[
i - FirstChar].
abcB = bbx;
7470 SafeBuffI[
i - FirstChar].
abcC = adv - lsb - bbx;
7497 UINT i, glyph_index;
7509 pdcattr =
dc->pdcattr;
7514 if (TextObj ==
NULL)
7540 for (
i = FirstChar;
i < FirstChar+
Count;
i++)
7550 SafeBuffF[
i - FirstChar] = (
FLOAT) ((
face->glyph->advance.x + 32) >> 6);
7552 SafeBuffI[
i - FirstChar] = (
face->glyph->advance.x + 32) >> 6;
7626 if (!pwc && !pgi && !
iMode)
7633 WCHAR DefChar = 0xFFFF;
7644 for (
INT i = 0;
i < cwc;
i++)
NTSTATUS NTAPI MmUnmapViewInSystemSpace(IN PVOID MappedBase)
static _Out_opt_ PULONGLONG Start
#define FILE_DIRECTORY_FILE
static VOID del(LPHIST_ENTRY item)
#define DBG_DEFAULT_CHANNEL(ch)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
FORCEINLINE PMATRIX DC_pmxWorldToDevice(PDC pdc)
static BOOLEAN IntLPtoDP(DC *pdc, PPOINTL ppt, UINT count)
#define STATUS_INVALID_HANDLE
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
VOID FASTCALL DC_vUpdateTextBrush(PDC pdc)
VOID FASTCALL DC_vUpdateBackgroundBrush(PDC pdc)
FORCEINLINE PDC DC_LockDc(HDC hdc)
#define ERROR_NOT_ENOUGH_MEMORY
_In_ PIO_STATUS_BLOCK IoStatusBlock
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
#define NT_SUCCESS(StatCode)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
#define RTL_CONSTANT_STRING(s)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define TT_PLATFORM_MACINTOSH
#define TT_MS_ID_SYMBOL_CS
#define TT_PLATFORM_APPLE_UNICODE
static void cleanup(void)
WCHAR *WINAPI PathFindFileNameW(const WCHAR *path)
BOOL WINAPI PathIsRelativeW(const WCHAR *path)
_ACRTIMP int __cdecl _wtoi(const wchar_t *)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t)
_ACRTIMP __msvcrt_long __cdecl labs(__msvcrt_long)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
static void CharSet(RTF_Info *info)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const WCHAR Cleanup[]
#define GDIToObj(ClipGDI, Type)
#define ObjToGDI(ClipObj, Type)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExInitializePushLock
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
struct _FileName FileName
#define FLOATOBJ_Set1(fo)
#define FLOATOBJ_Equal1(pf)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
BOOL LoadFont(LPWSTR lpCmdLine)
VOID IntDeleteRegFontEntries(_In_ PCWSTR pszFileName, _In_ DWORD dwFlags)
BOOL FASTCALL TextIntGetTextExtentPoint(_In_ PDC dc, _In_ PTEXTOBJ TextObj, _In_reads_(Count) PCWCH String, _In_ INT Count, _In_ ULONG MaxExtent, _Out_ PINT Fit, _Out_writes_to_opt_(Count, *Fit) PINT Dx, _Out_ PSIZE Size, _In_ FLONG fl)
static FT_UInt FASTCALL get_glyph_index_flagged(FT_Face face, FT_ULong code, BOOL fCodeAsIndex)
static BOOLEAN FASTCALL GetFontFamilyInfoForList(const LOGFONTW *LogFont, PFONTFAMILYINFO Info, LPCWSTR NominalName, LONG *pCount, LONG MaxCount, PLIST_ENTRY Head)
static UINT FontLink_Chain_FindGlyph(_Inout_ PFONTLINK_CHAIN pChain, _Out_ PFONT_CACHE_ENTRY pCache, _Inout_ FT_Face *pFace, _In_ UINT code, _In_ BOOL fCodeAsIndex)
DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI Font, DWORD cPairs, LPKERNINGPAIR pKerningPair)
#define ASSERT_FREETYPE_LOCK_NOT_HELD()
static const CHARSETINFO g_FontTci[MAXTCIINDEX]
static WCHAR s_szDefFontLinkFileName[MAX_PATH]
static BOOL IntNeedRequestFontSize(PFONTLINK_CHAIN pChain, FT_Face face, PLIST_ENTRY TargetEntry)
LONG FASTCALL IntGetFontFamilyInfo(HDC Dc, const LOGFONTW *SafeLogFont, PFONTFAMILYINFO SafeInfo, LONG InfoCount)
static PFAST_MUTEX g_FreeTypeLock
VOID FASTCALL IntGdiCleanupMemEntry(PFONT_ENTRY_MEM Head)
static UINT GetFontPenalty(const LOGFONTW *LogFont, const OUTLINETEXTMETRICW *Otm, const char *style_name)
static const UNICODE_STRING DosPathPrefix
static BOOL face_has_symbol_charmap(FT_Face ft_face)
static DWORD IntGetHash(IN LPCVOID pv, IN DWORD cdw)
static BOOL FASTCALL IntGetFullFileName(POBJECT_NAME_INFORMATION NameInfo, ULONG Size, PUNICODE_STRING FileName)
static NTSTATUS FontLink_AddEntry(LPCWSTR lfFaceName, PZZWSTR pszzFontLink)
static INT FASTCALL IntGdiAddFontResourceSingle(_In_ PCUNICODE_STRING FileName, _In_ DWORD Characteristics, _In_ DWORD dwFlags)
static BOOL s_fFontLinkUseAnsi
static void SharedMem_AddRef(PSHARED_MEM Ptr)
BOOL FASTCALL ftGdiGetTextMetricsW(HDC hDC, PTMW_INTERNAL ptmwi)
BOOL FASTCALL IntGdiRemoveFontResource(_In_ PCUNICODE_STRING FileName, _In_ DWORD cFiles, _In_ DWORD dwFlags)
static INT FASTCALL IntGdiLoadFontByIndexFromMemory(PGDI_LOAD_FONT pLoadFont, FT_Long FontIndex)
static BOOL FontLink_PrepareFontInfo(_Inout_ PFONTLINK pFontLink)
static PSHARED_FACE SharedFace_Create(FT_Face Face, PSHARED_MEM Memory)
static VOID FASTCALL IntFontType(PFONTGDI Font)
BOOL APIENTRY GreExtTextOutW(_In_ HDC hDC, _In_ INT XStart, _In_ INT YStart, _In_ UINT fuOptions, _In_opt_ PRECTL lprc, _In_reads_opt_(Count) PCWCH String, _In_ INT Count, _In_opt_ const INT *Dx, _In_ DWORD dwCodePage)
FT_Library g_FreeTypeLibrary
BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING FileName, PVOID pBuffer, DWORD *pdwBytes, DWORD dwType)
static PWCHAR g_ElfScripts[32]
static PSHARED_MEM SharedMem_Create(PBYTE Buffer, ULONG BufferSize, BOOL IsMapping)
static BOOL EqualFamilyInfo(const FONTFAMILYINFO *pInfo1, const FONTFAMILYINFO *pInfo2)
static DWORD s_chFontLinkDefaultChar
BYTE FASTCALL IntCharSetFromCodePage(UINT uCodePage)
static PFONTLINK FontLink_Create(_Inout_ PFONTLINK_CHAIN pChain, _In_ const LOGFONTW *plfBase, _In_ LPCWSTR pszLink)
const MATRIX gmxWorldToPageDefault
UNICODE_STRING g_FontRegPath
VOID FASTCALL IntGdiCleanupPrivateFontsForProcess(VOID)
static void SharedFaceCache_Init(PSHARED_FACE_CACHE Cache)
static unsigned int get_bezier_glyph_outline(FT_Outline *outline, unsigned int buflen, char *buf)
BOOL FASTCALL InitFontSupport(VOID)
static FT_UInt FASTCALL get_glyph_index_symbol(FT_Face ft_face, UINT glyph)
static __inline VOID FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, const LOGFONTW *LogFont, const PLIST_ENTRY Head)
static NTSTATUS FontLink_Chain_FindEntry(_Inout_ PFONTLINK_CHAIN pChain, _Inout_ PLOGFONTW pLF)
static const WCHAR s_szzDefFixedFontLink[]
BOOL FASTCALL IntLoadFontSubstList(PLIST_ENTRY pHead)
static UINT g_FontCacheNumEntries
static WCHAR s_szDefFontLinkFontName[MAX_PATH]
static void FontLink_DeleteEntries(VOID)
BOOL FASTCALL TextIntUpdateSize(_In_ PTEXTOBJ TextObj, _In_ PFONTGDI FontGDI, _In_ BOOL bDoLock)
static BOOL IntGetTextDisposition(_Out_ LONGLONG *pX64, _Out_ LONGLONG *pY64, _In_reads_(Count) PCWCH String, _In_ INT Count, _In_opt_ const INT *Dx, _Inout_ PFONT_CACHE_ENTRY Cache, _In_ UINT fuOptions, _In_ BOOL bNoTransform, _Inout_ PFONTLINK_CHAIN pChain)
VOID FASTCALL IntLoadSystemFonts(VOID)
DWORD FASTCALL ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset)
#define GOT_PENALTY(name, value)
static void SharedFace_AddRef(PSHARED_FACE Ptr)
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs)
static VOID FASTCALL UnlinkFontMemCollection(PFONT_ENTRY_COLL_MEM Collection)
INT FASTCALL IntGdiAddFontResourceEx(_In_ PCUNICODE_STRING FileName, _In_ DWORD cFiles, _In_ DWORD Characteristics, _In_ DWORD dwFlags)
static NTSTATUS FontLink_LoadDefaultCharset(VOID)
struct _FONTLINK_CHAIN FONTLINK_CHAIN
static VOID FontLink_Chain_Dump(_In_ PFONTLINK_CHAIN pChain)
static void FASTCALL FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName, LPCWSTR FullName, PFONTGDI FontGDI)
static FT_Error IntRequestFontSize(_Inout_ PFONTGDI FontGDI, _In_ LONG lfWidth, _In_ LONG lfHeight)
static __inline void FASTCALL IntInitFontNames(FONT_NAMES *Names, PSHARED_FACE SharedFace)
static void RemoveCacheEntries(FT_Face Face)
#define FM_SEL_USE_TYPO_METRICS
static NTSTATUS FontLink_PopulateEntries(VOID)
BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI Font, PREALIZATION_INFO Info)
static FT_Encoding pick_charmap(FT_Face face, int charset)
VOID FASTCALL FreeFontSupport(VOID)
VOID FASTCALL IntEnableFontRendering(BOOL Enable)
#define IntUnLockFreeType()
static BOOL s_fFontLinkUseOem
BOOL APIENTRY GreGetCharWidthW(_In_ HDC hDC, _In_ UINT FirstChar, _In_ UINT Count, _In_reads_opt_(Count) PCWCH Safepwc, _In_ FLONG fl, _Out_writes_bytes_(Count *sizeof(INT)) PVOID Buffer)
struct _FONTLINK_ENTRY * PFONTLINK_ENTRY
static INT FASTCALL IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont, PSHARED_FACE SharedFace, FT_Long FontIndex, INT CharSetIndex)
static NTSTATUS FontLink_Chain_Populate(_Inout_ PFONTLINK_CHAIN pChain)
static NTSTATUS FontLink_LoadSettings(VOID)
static BOOL FontLink_Chain_IsPopulated(const FONTLINK_CHAIN *pChain)
PBYTE FASTCALL IntStoreFontNames(_In_ const FONT_NAMES *Names, _Out_ OUTLINETEXTMETRICW *Otm)
static unsigned int get_native_glyph_outline(FT_Outline *outline, unsigned int buflen, char *buf)
static VOID FASTCALL IntMatrixFromMx(FT_Matrix *pmat, const MATRIX *pmx)
static VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement)
ULONG FASTCALL ftGdiGetGlyphOutline(PDC dc, WCHAR wch, UINT iFormat, LPGLYPHMETRICS pgm, ULONG cjBuf, PVOID pvBuf, const MAT2 *pmat2, BOOL bIgnoreRotation)
static BOOL FASTCALL IntGdiRemoveFontResourceSingle(_In_ PCUNICODE_STRING FileName, _In_ DWORD dwFlags)
struct _FONTLINK_CHAIN * PFONTLINK_CHAIN
static BOOLEAN IntTranslateCharsetInfo(PDWORD Src, LPCHARSETINFO Cs, DWORD Flags)
static VOID IntAddNameFromFamInfo(LPWSTR psz, FONTFAMILYINFO *FamInfo)
static void FASTCALL FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI, TT_OS2 *pOS2, TT_HoriHeader *pHori, FT_WinFNT_HeaderRec *pFNT)
#define IntLockFreeType()
static FT_BitmapGlyph IntFindGlyphCache(IN const FONT_CACHE_ENTRY *pCache)
static FT_BitmapGlyph IntGetBitmapGlyphWithCache(IN OUT PFONT_CACHE_ENTRY Cache, IN FT_GlyphSlot GlyphSlot)
static BOOL IntGetFontDefaultChar(_In_ FT_Face Face, _Out_ PWCHAR pDefChar)
#define STACK_TEXT_BUFFER_SIZE
static __inline void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt)
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
static void SharedFaceCache_Release(PSHARED_FACE_CACHE Cache)
static BOOL g_RenderingEnabled
BOOL FASTCALL IntGdiRemoveFontMemResource(HANDLE hMMFont)
LONG NTAPI NtGdiGetFontFamilyInfo(_In_ HDC Dc, _In_ const LOGFONTW *UnsafeLogFont, _Out_ PFONTFAMILYINFO UnsafeInfo, _Inout_ PLONG UnsafeInfoCount)
UINT FASTCALL IntGetCharSet(INT nIndex, FT_ULong CodePageRange1)
static NTSTATUS FontLink_LoadDefaultFonts(VOID)
#define EMUBOLD_NEEDED(original, request)
static __inline VOID FASTCALL CleanupFontEntry(PFONT_ENTRY FontEntry)
struct _FONTLINK FONTLINK
NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle, PTEXTOBJ pTextObj)
static BOOL SubstituteFontByList(PLIST_ENTRY pHead, PUNICODE_STRING pOutputName, PUNICODE_STRING pInputName, BYTE RequestedCharSet, BYTE CharSetMap[FONTSUBST_FROM_AND_TO])
static FT_Error IntRequestFontSizeEx(_In_ FT_Face face, _In_ LONG lfWidth, _In_ LONG lfHeight, _Out_opt_ PLONG ptmHeight, _Out_opt_ PLONG ptmAscent, _Out_opt_ PLONG ptmDescent, _Out_opt_ PLONG ptmInternalLeading, _Out_opt_ PLONG plfHeight, _Out_opt_ PLONG plfWidth)
static FT_UInt FASTCALL get_glyph_index(FT_Face ft_face, UINT glyph)
static const FT_Matrix identityMat
HANDLE FASTCALL IntGdiAddFontMemResource(PVOID Buffer, DWORD dwSize, PDWORD pNumAdded)
static __inline FT_Fixed FT_FixedFromFIXED(FIXED f)
static BOOL MatchFontName(PSHARED_FACE SharedFace, PUNICODE_STRING Name1, FT_UShort NameID, FT_UShort LangID)
static SIZE_T FASTCALL IntStoreName(_In_ const UNICODE_STRING *pName, _Out_ PBYTE pb)
static BOOLEAN FASTCALL GetFontFamilyInfoForSubstitutes(const LOGFONTW *LogFont, PFONTFAMILYINFO Info, LONG *pCount, LONG MaxCount)
static void SharedFace_Release(PSHARED_FACE Ptr, BOOL bDoLock)
static BOOL MatchFontNames(PSHARED_FACE SharedFace, LPCWSTR lfFaceName)
#define ASSERT_FREETYPE_LOCK_HELD()
INT FASTCALL ftGdiGetTextCharsetInfo(PDC Dc, LPFONTSIGNATURE lpSig, DWORD dwFlags)
static FT_BitmapGlyph IntGetRealGlyph(IN OUT PFONT_CACHE_ENTRY Cache)
static void SharedMem_Release(PSHARED_MEM Ptr)
BOOL APIENTRY NtGdiExtTextOutW(_In_ HDC hDC, _In_ INT XStart, _In_ INT YStart, _In_ UINT fuOptions, _In_opt_ LPCRECT UnsafeRect, _In_reads_opt_(Count) PCWCH UnsafeString, _In_range_(0, 0xFFFF) UINT Count, _In_reads_opt_(_Inexpressible_(cwc)) const INT *UnsafeDx, _In_ DWORD dwCodePage)
BOOL FASTCALL IntLoadFontsInRegistry(VOID)
BOOL FASTCALL IntIsFontRenderingEnabled(VOID)
DWORD FASTCALL ftGdiGetFontData(PFONTGDI FontGdi, DWORD Table, DWORD Offset, PVOID Buffer, DWORD Size)
#define gmxWorldToDeviceDefault
struct FONT_NAMES * LPFONT_NAMES
static NTSTATUS IntGetFontLocalizedName(PUNICODE_STRING pNameW, PSHARED_FACE SharedFace, FT_UShort NameID, FT_UShort LangID)
BOOL APIENTRY GreGetCharABCWidthsW(_In_ HDC hDC, _In_ UINT FirstChar, _In_ UINT Count, _In_reads_opt_(Count) PCWCH Safepwch, _In_ FLONG fl, _Out_writes_bytes_(Count *sizeof(ABC)) PVOID SafeBuffer)
static VOID FontLink_Destroy(_Inout_ PFONTLINK pLink)
struct _FONTLINK * PFONTLINK
static VOID FontLink_Chain_Init(_Out_ PFONTLINK_CHAIN pChain, _Inout_ PTEXTOBJ pTextObj, _In_ FT_Face face)
FT_Render_Mode FASTCALL IntGetFontRenderMode(LOGFONTW *logfont)
static PFONTLINK_ENTRY FontLink_FindEntry(const LOGFONTW *pLogFont)
static BOOL s_fFontLinkUseSymbol
struct _FONTLINK_ENTRY FONTLINK_ENTRY
static PFONTLINK FontLink_Chain_FindLink(PFONTLINK_CHAIN pChain, PLOGFONTW plf)
INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI FontGDI, UINT Size, OUTLINETEXTMETRICW *Otm, BOOL bLocked)
static __inline void FASTCALL IntFreeFontNames(FONT_NAMES *Names)
static void RemoveCachedEntry(PFONT_CACHE_ENTRY Entry)
#define _TMPF_VARIABLE_PITCH
#define FONTLINK_DEFAULT_CHAR
static BOOL SubstituteFontRecurse(PLOGFONTW pLogFont)
static const WCHAR s_szzDefFontLink[]
static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
static VOID FASTCALL CleanupFontEntryEx(PFONT_ENTRY FontEntry, PFONTGDI FontGDI)
BOOL APIENTRY IntExtTextOutW(_In_ PDC dc, _In_ INT XStart, _In_ INT YStart, _In_ UINT fuOptions, _In_opt_ PRECTL lprc, _In_reads_opt_(Count) PCWCH String, _In_ INT Count, _In_opt_ const INT *Dx, _In_ DWORD dwCodePage)
DWORD APIENTRY GreGetGlyphIndicesW(_In_ HDC hdc, _In_reads_opt_(cwc) PCWCH pwc, _In_ INT cwc, _Out_writes_opt_(cwc) PWORD pgi, _In_ DWORD iMode, _In_ BOOL bSubset)
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
#define FT_LOAD_NO_BITMAP
FT_Set_Transform(FT_Face face, FT_Matrix *matrix, FT_Vector *delta)
@ FT_SIZE_REQUEST_TYPE_NOMINAL
FT_Done_Face(FT_Face face)
FT_Get_First_Char(FT_Face face, FT_UInt *agindex)
#define FT_HAS_MULTIPLE_MASTERS(face)
enum FT_Render_Mode_ FT_Render_Mode
#define FT_LOAD_NO_HINTING
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
#define FT_HAS_FIXED_SIZES(face)
#define FT_IS_SCALABLE(face)
#define FT_HAS_VERTICAL(face)
#define FT_IS_FIXED_WIDTH(face)
FT_Request_Size(FT_Face face, FT_Size_Request req)
FT_Get_Next_Char(FT_Face face, FT_ULong char_code, FT_UInt *agindex)
FT_Set_Charmap(FT_Face face, FT_CharMap charmap)
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH
enum FT_Encoding_ FT_Encoding
FT_Vector_Transform(FT_Vector *vector, const FT_Matrix *matrix)
FT_Get_Kerning(FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning)
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_New_Memory_Face(FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface)
FT_MulFix(FT_Long a, FT_Long b)
#define FT_HAS_KERNING(face)
FT_Init_FreeType(FT_Library *alibrary)
@ FileDirectoryInformation
#define FILE_SYNCHRONOUS_IO_NONALERT
_Must_inspect_result_ _In_ PCUNICODE_STRING Name2
_Must_inspect_result_ _Outptr_ PVOID * SectionObject
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
FT_Bitmap_New(FT_Bitmap *abitmap)
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
FT_Done_Glyph(FT_Glyph glyph)
FT_Glyph_To_Bitmap(FT_Glyph *the_glyph, FT_Render_Mode render_mode, FT_Vector *origin, FT_Bool destroy)
FT_Get_Glyph(FT_GlyphSlot slot, FT_Glyph *aglyph)
struct FT_BitmapGlyphRec_ * FT_BitmapGlyph
FT_Matrix_Multiply(const FT_Matrix *a, FT_Matrix *b)
#define ft_glyph_format_bitmap
#define ft_glyph_format_outline
FT_Done_Library(FT_Library library)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
FT_Outline_Get_Bitmap(FT_Library library, FT_Outline *outline, const FT_Bitmap *abitmap)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Get_Sfnt_Name_Count(FT_Face face)
FT_BEGIN_HEADER struct FT_SfntName_ FT_SfntName
FT_Get_Sfnt_Name(FT_Face face, FT_UInt idx, FT_SfntName *aname)
FT_BEGIN_HEADER FT_GlyphSlot_Embolden(FT_GlyphSlot slot)
FT_GlyphSlot_Oblique(FT_GlyphSlot slot)
FT_BEGIN_HEADER typedef FT_Fixed FT_Angle
FT_Vector_Unit(FT_Vector *vec, FT_Angle angle)
FT_Get_WinFNT_Header(FT_Face face, FT_WinFNT_HeaderRec *aheader)
#define FONTSUBST_FROM_AND_TO
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLint GLenum face
GLenum GLuint GLenum GLsizei const GLchar * buf
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_EXECUTE_HANDLER
#define RtlEqualMemory(dst, src, len)
static PWSTR PDWORD pdwBytes
#define MmCopyToCaller(x, y, z)
#define ExFreePoolWithTag(_P, _T)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
#define TT_NAME_ID_FULL_NAME
#define TT_NAME_ID_UNIQUE_ID
#define TT_NAME_ID_FONT_FAMILY
#define TT_NAME_ID_FONT_SUBFAMILY
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI VOID NTAPI RtlGetDefaultCodePage(_Out_ PUSHORT AnsiCodePage, _Out_ PUSHORT OemCodePage)
_In_ BOOLEAN _In_ USHORT Directory
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
#define _Out_writes_to_opt_(s, c)
#define _Out_writes_opt_(s)
#define _In_reads_opt_(s)
#define _Out_writes_bytes_(s)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
@ KeyValueFullInformation
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
#define FILE_LIST_DIRECTORY
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
#define FILE_SHARE_DELETE
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define FILE_GENERIC_READ
struct _KEY_VALUE_FULL_INFORMATION * PKEY_VALUE_FULL_INFORMATION
#define STANDARD_RIGHTS_REQUIRED
_NullNull_terminated_ WCHAR * PZZWSTR
_NullNull_terminated_ CONST WCHAR * PCZZWSTR
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
struct tagFONTFAMILYINFO FONTFAMILYINFO
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
#define STATUS_INTERNAL_ERROR
NTSTRSAFEAPI RtlStringCbCopyW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
NTSTRSAFEAPI RtlStringCchCopyNW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_reads_or_z_(cchToCopy) STRSAFE_LPCWSTR pszSrc, _In_ size_t cchToCopy)
NTSTRSAFEAPI RtlStringCchCopyW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
NTSTRSAFEAPI RtlStringCchCatW(_Inout_updates_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define PATH_IsPathOpen(dclevel)
void * EngAllocMem(int zero, unsigned long size, int tag=0)
static const WCHAR szName[]
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
NTSTATUS NTAPI MmMapViewInSystemSpace(IN PVOID SectionObject, OUT PVOID *MappedBase, IN OUT PSIZE_T ViewSize)
NTSTATUS NTAPI MmCreateSection(OUT PVOID *Section, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize, IN ULONG SectionPageProtection, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL, IN PFILE_OBJECT FileObject OPTIONAL)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
UNICODE_STRING FontNames[FONTSUBST_FROM_AND_TO]
BYTE CharSets[FONTSUBST_FROM_AND_TO]
UNICODE_STRING FamilyNameW
UNICODE_STRING StyleNameW
FT_Short max_advance_width
FT_Size_Request_Type type
PUNICODE_STRING pFileName
PFONT_ENTRY_MEM PrivateEntry
UNICODE_STRING RegValueName
WCHAR lfFaceName[LF_FACESIZE]
FT_ULong ulCodePageRange1
FT_UShort usLastCharIndex
FT_Short ySuperscriptYSize
FT_Short ySuperscriptXSize
FT_Short ySubscriptYOffset
FT_Short ySuperscriptYOffset
FT_Short ySubscriptXOffset
FT_Short yStrikeoutPosition
FT_ULong ulCodePageRange2
FT_Short ySuperscriptXOffset
FT_UShort usFirstCharIndex
FT_Short underlineThickness
FT_Short underlinePosition
WCHAR lfFaceName[LF_FACESIZE]
struct _FONT_ASPECT::@5734::@5735 Emu
FT_BitmapGlyph BitmapGlyph
WCHAR TextFace[LF_FACESIZE]
struct _LIST_ENTRY * Flink
POINT otmptSuperscriptOffset
POINT otmptSuperscriptSize
int otmsStrikeoutPosition
int otmsUnderscorePosition
TEXTMETRICW otmTextMetrics
POINT otmptSubscriptOffset
LIST_ENTRY PrivateMemFontListHead
UINT PrivateMemFontHandleCount
LIST_ENTRY PrivateFontListHead
UNICODE_STRING FontFamily
SHARED_FACE_CACHE UserLanguage
SHARED_FACE_CACHE EnglishUS
struct _PALETTE *const ppal
ENUMLOGFONTEXW elfEnumLogfontEx
WCHAR elfStyle[LF_FACESIZE]
WCHAR elfFullName[LF_FULLFACESIZE]
ENUMLOGFONTEXW EnumLogFontEx
WCHAR lfFaceName[LF_FACESIZE]
FT_Get_PS_Font_Info(FT_Face face, PS_FontInfo afont_info)
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
T1_FIELD_DICT_FONTDICT family_name
T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT underline_position
FT_Get_Sfnt_Table(FT_Face face, FT_Sfnt_Tag tag)
FT_Load_Sfnt_Table(FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_NO_MORE_FILES
WORD WORD PSZ PSZ pszFileName
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ WDFCOLLECTION Collection
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
NTSTATUS IntDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
BOOL APIENTRY IntEngMaskBlt(_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoMask, _In_ CLIPOBJ *pco, _In_ XLATEOBJ *pxloDest, _In_ XLATEOBJ *pxloSource, _In_ RECTL *prclDest, _In_ POINTL *pptlMask, _In_ BRUSHOBJ *pbo, _In_ POINTL *pptlBrushOrg)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
PTEXTOBJ FASTCALL RealizeFontInit(_In_ HFONT hFont)
BOOL FASTCALL PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc, LPCWSTR str, UINT count, const INT *dx)
#define AFRX_WRITE_REGISTRY
#define LFONT_UnlockFont(plfnt)
FORCEINLINE PTEXTOBJ TEXTOBJ_LockText(HFONT hfont)
#define AFRX_DOS_DEVICE_PATH
#define AFRX_ALTERNATIVE_PATH
#define IntLockProcessPrivateFonts(W32Process)
FORCEINLINE VOID TEXTOBJ_UnlockText(PLFONT plfnt)
#define IntUnLockProcessPrivateFonts(W32Process)
#define LFONT_AllocFontWithHandle()
VOID APIENTRY IntEngFillPolygon(IN OUT PDC dc, IN POINTL *pPoints, IN UINT cPoints, IN BRUSHOBJ *BrushObj)
VOID IntSwapEndian(_Inout_ LPVOID pvData, _In_ DWORD Size)
VOID IntUnicodeStringToBuffer(_Out_ LPWSTR pszBuffer, _In_ SIZE_T cbBuffer, _In_ const UNICODE_STRING *pString)
SIZE_T SZZ_GetSize(_In_ PCZZWSTR pszz)
LPCWSTR FASTCALL IntNameFromCharSet(_In_ BYTE CharSet)
BYTE IntCharSetFromLangID(_In_ LANGID LangID)
LONG IntNormalizeAngle(_In_ LONG nTenthsOfDegrees)
VOID FASTCALL IntEngFillBox(IN OUT PDC dc, IN INT X, IN INT Y, IN INT Width, IN INT Height, IN BRUSHOBJ *BrushObj)
static DWORD Utf32FromSurrogatePair(_In_ DWORD ch0, _In_ DWORD ch1)
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
#define FLOATOBJ_DivLong(pf, l)
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
_In_ ULONG_PTR _In_ ULONG iFace
ENGAPI HBITMAP APIENTRY EngCreateBitmap(_In_ SIZEL sizl, _In_ LONG lWidth, _In_ ULONG iFormat, _In_ FLONG fl, _In_opt_ PVOID pvBits)
#define FLOATOBJ_Mul(pf, pf1)
ENGAPI VOID APIENTRY EngGetCurrentCodePage(_Out_ PUSHORT OemCodePage, _Out_ PUSHORT AnsiCodePage)
#define FLOATOBJ_MulLong(pf, l)
#define FLOATOBJ_GetLong(pf)
#define FLOATOBJ_SetFloat(pf, f)
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define FLOATOBJ_SetLong(pf, l)
#define FO_MULTIPLEMASTER
_In_ SIZEL _In_ ULONG iFormat
ENGAPI VOID APIENTRY EngUnlockSurface(_In_ _Post_ptr_invalid_ SURFOBJ *pso)
#define FLOATOBJ_AddLong(pf, l)
struct _FILE_DIRECTORY_INFORMATION * PFILE_DIRECTORY_INFORMATION
#define ERROR_GEN_FAILURE
struct _OUTLINETEXTMETRICW OUTLINETEXTMETRICW
#define PAN_FAMILY_TEXT_DISPLAY
#define PAN_PROP_MONOSPACED
#define ANTIALIASED_QUALITY
#define PAN_SERIFSTYLE_INDEX
#define PAN_SERIF_NORMAL_SANS
struct _RASTERIZER_STATUS RASTERIZER_STATUS
#define PAN_SERIF_OBTUSE_SANS
#define PAN_FAMILY_PICTORIAL
#define TRUETYPE_FONTTYPE
#define PAN_SERIF_TRIANGLE
#define OUT_DEVICE_PRECIS
#define PAN_PROPORTION_INDEX
#define PAN_SERIF_SQUARE_COVE
#define PAN_SERIF_OBTUSE_SQUARE_COVE
#define CHINESEBIG5_CHARSET
#define PAN_SERIF_EXAGGERATED
#define OUT_DEFAULT_PRECIS
#define PAN_SERIF_ROUNDED
#define PAN_FAMILYTYPE_INDEX
#define CLIP_DEFAULT_PRECIS
#define PAN_FAMILY_DECORATIVE
#define PAN_SERIF_PERP_SANS
#define VIETNAMESE_CHARSET
#define PAN_FAMILY_SCRIPT
#define CLEARTYPE_QUALITY
#define PAN_SERIF_OBTUSE_COVE
#define GGI_MARK_NONEXISTING_GLYPHS
#define EASTEUROPE_CHARSET
#define NONANTIALIASED_QUALITY
#define OUT_OUTLINE_PRECIS
#define IS_HIGH_SURROGATE(ch)
#define IS_LOW_SURROGATE(ch)
_In_ int _Inout_ LPRECT lprc
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define ObDereferenceObject
#define RTL_STATIC_LIST_HEAD(x)
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)