15#include FT_TYPE1_TABLES_H
16#include FT_TRUETYPE_TABLES_H
17#include FT_TRUETYPE_TAGS_H
18#include FT_TRIGONOMETRY_H
22#include FT_SFNT_NAMES_H
23#include FT_SYNTHESIS_H
24#include FT_TRUETYPE_IDS_H
26#ifndef FT_INTERNAL_INTERNAL_H
27 #define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
28 #include FT_INTERNAL_INTERNAL_H
30#include FT_INTERNAL_TRUETYPE_TYPES_H
62#define FONTLINK_DEFAULT_CHAR 0x30FB
71#define MAX_FONTLINK_CACHE 128
95 DWORD cbData, dwValue;
102 L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink",
107 cbData =
sizeof(dwValue);
129 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\FontAssoc\\Associated DefaultFonts",
134 cbData =
sizeof(szValue);
142 cbData =
sizeof(szValue);
167 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\FontAssoc\\Associated Charset",
172 cbData =
sizeof(szValue);
180 cbData =
sizeof(szValue);
188 cbData =
sizeof(szValue);
223 if (pChain->pszzFontLink)
263 ASSERT(pNewHead != pOldHead);
288 pCache->
LogFont = pChain->LogFont;
289 pCache->
Chain = *pChain;
328#define HIGH_SURROGATE_MIN 0xD800U
329#define HIGH_SURROGATE_MAX 0xDBFFU
330#define LOW_SURROGATE_MIN 0xDC00U
331#define LOW_SURROGATE_MAX 0xDFFFU
333#define IS_HIGH_SURROGATE(ch0) (HIGH_SURROGATE_MIN <= (ch0) && (ch0) <= HIGH_SURROGATE_MAX)
334#define IS_LOW_SURROGATE(ch1) (LOW_SURROGATE_MIN <= (ch1) && (ch1) <= LOW_SURROGATE_MAX)
343#ifndef _TMPF_VARIABLE_PITCH
344 #define _TMPF_VARIABLE_PITCH TMPF_FIXED_PITCH
348#define EMUBOLD_NEEDED(original, request) \
349 (((request) != FW_DONTCARE) && ((request) - (original) >= FW_BOLD - FW_MEDIUM))
357#define gmxWorldToDeviceDefault gmxWorldToPageDefault
363 RTL_CONSTANT_STRING(
L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
373#define ASSERT_FREETYPE_LOCK_HELD() \
374 ASSERT(g_FreeTypeLock->Owner == KeGetCurrentThread())
376#define ASSERT_FREETYPE_LOCK_NOT_HELD() \
377 ASSERT(g_FreeTypeLock->Owner != KeGetCurrentThread())
379#define IntLockFreeType() \
381 ASSERT_FREETYPE_LOCK_NOT_HELD(); \
382 ExEnterCriticalRegionAndAcquireFastMutexUnsafe(g_FreeTypeLock); \
385#define IntUnLockFreeType() \
387 ASSERT_FREETYPE_LOCK_HELD(); \
388 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(g_FreeTypeLock); \
391#define MAX_FONT_CACHE 256
423#define MAXTCIINDEX 32
514 if (pFontLink->bIgnore)
517 if (pFontLink->SharedFace)
534 pFontLink->bIgnore =
TRUE;
538 pFontGDI =
ObjToGDI(pFontObj, FONT);
546 pFontLink->bIgnore =
TRUE;
567 Cache->OutlineRequiredSize = 0;
601 Ptr->IsMapping = IsMapping;
602 DPRINT(
"Creating SharedMem for %p (%i, %p)\n",
Buffer, IsMapping,
Ptr);
635 for (CurrentEntry = g_FontCacheListHead.
Flink;
636 CurrentEntry != &g_FontCacheListHead;
637 CurrentEntry = NextEntry)
640 NextEntry = CurrentEntry->
Flink;
654 if (
Ptr->RefCount <= 0)
658 if (
Ptr->RefCount == 0)
660 DPRINT(
"Releasing SharedMem for %p (%i, %p)\n",
Ptr->Buffer,
Ptr->IsMapping,
Ptr);
682 if (
Ptr->RefCount <= 0)
686 if (
Ptr->RefCount == 0)
688 DPRINT(
"Releasing SharedFace for %s\n",
Ptr->Face->family_name ?
Ptr->Face->family_name :
"<NULL>");
730 pt->x.fract = (
vec->
x & 0x3f) << 10;
731 pt->x.fract |= ((
pt->x.fract >> 6) | (
pt->x.fract >> 12));
733 pt->y.fract = (
vec->
y & 0x3f) << 10;
734 pt->y.fract |= ((
pt->y.fract >> 6) | (
pt->y.fract >> 12));
751 const char *style_name;
770 style_name =
"<invalid>";
773 DPRINT(
"family_name '%s', style_name '%s', FaceName '%wZ', StyleName '%wZ', FontGDI %p, "
774 "FontObj %p, iUnique %lu, SharedFace %p, Face %p, CharSet %u, Filename '%S'\n",
793 DPRINT(
"## DumpFontList(%p)\n", Head);
798 DumpFontEntry(CurrentEntry);
804 DPRINT(
"%wZ,%u -> %wZ,%u\n",
817 DPRINT(
"## DumpFontSubstList\n");
819 for (pListEntry = pHead->
Flink;
821 pListEntry = pListEntry->
Flink)
824 DumpFontSubstEntry(pSubstEntry);
828VOID DumpPrivateFontList(
BOOL bDoLock)
850VOID DumpGlobalFontList(
BOOL bDoLock)
855 DumpFontList(&g_FontListHead);
863 DumpGlobalFontList(bDoLock);
864 DumpPrivateFontList(bDoLock);
881 BYTE InfoBuffer[128];
890 L"Microsoft\\Windows NT\\CurrentVersion\\"
906 &KeyFullInfo,
sizeof(KeyFullInfo), &
Length);
919 InfoBuffer,
sizeof(InfoBuffer), &
Length);
933 DPRINT(
"RtlCreateUnicodeString failed\n");
939 InfoBuffer,
sizeof(InfoBuffer), &
Length);
955 DPRINT(
"RtlCreateUnicodeString failed\n");
997 DPRINT(
"ExAllocatePoolWithTag failed\n");
1036 DPRINT1(
"FT_Init_FreeType failed with error code 0x%x\n", ulError);
1042 DPRINT1(
"Fonts registry is empty.\n");
1073 pHead = &g_FontCacheListHead;
1082 pHead = &g_FontSubstListHead;
1091 pHead = &g_FontListHead;
1111 nTenthsOfDegrees %= 360 * 10;
1112 if (nTenthsOfDegrees >= 0)
1113 return nTenthsOfDegrees;
1114 return nTenthsOfDegrees + 360 * 10;
1123 pmat->
xx = vecAngle.
x;
1124 pmat->
xy = -vecAngle.
y;
1125 pmat->
yx = -pmat->
xy;
1126 pmat->
yy = pmat->
xx;
1162 BYTE RequestedCharSet,
1173 for (pListEntry = pHead->
Flink;
1174 pListEntry != pHead;
1175 pListEntry = pListEntry->
Flink)
1260 UINT RecurseCount = 5;
1271 while (RecurseCount-- > 0)
1274 &OutputNameW, &InputNameW,
1300 pChain->pBaseTextObj = pTextObj;
1301 pChain->pDefFace =
face;
1307 L"tahoma.ttf,Tahoma\0"
1308 L"msgothic.ttc,MS UI Gothic\0"
1309 L"mingliu.ttc,PMingLiU\0"
1310 L"simsun.ttc,SimSun\0"
1311 L"gulim.ttc,Gulim\0"
1315 L"cour.ttf,Courier New\0"
1316 L"msgothic.ttc,MS Gothic\0"
1317 L"mingliu.ttc,MingLiU\0"
1318 L"simsun.ttc,NSimSun\0"
1319 L"gulim.ttc,GulimChe\0"
1330 WCHAR szzFontLink[512];
1334 ASSERT(pLF->lfFaceName[0]);
1338 L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink",
1344 cbData =
sizeof(szzFontLink);
1351 cbData =
sizeof(szzFontLink);
1358 if (cbData >= 2 *
sizeof(
WCHAR))
1360 FontLinkSize = cbData;
1371 pszzFontLink =
NULL;
1408 pChain->pszzFontLink = pszzFontLink;
1479 PTEXTOBJ pTextObj = pChain->pBaseTextObj;
1506 default: bFixCharSet =
TRUE;
break;
1516 *pChain = pLinkCache->
Chain;
1522 pChain->LogFont = lfBase;
1529 pszLink = pChain->pszzFontLink;
1532 DPRINT(
"pszLink: '%S'\n", pszLink);
1536 pszLink +=
wcslen(pszLink) + 1;
1545 DPRINT(
"szEntry: '%S'\n", szEntry);
1567 BYTE *DirInfoBuffer;
1609 if (DirInfoBuffer ==
NULL)
1627 Status = ZwQueryDirectoryFile(
1678 bRestartScan =
FALSE;
1694 if (CodePageRange1 == 0)
1699 for (BitIndex = 0; BitIndex <
MAXTCIINDEX; ++BitIndex)
1701 if (CodePageRange1 & (1 << BitIndex))
1704 if ((nIndex >= 0) && (nCount == (
UINT)nIndex))
1716#define PX2PT(pixels) FT_MulDiv((pixels), 72, 96)
1740 if (SharedFace ==
NULL && CharSetIndex == -1)
1748 ((FontIndex != -1) ? FontIndex : 0),
1764 if (
Error == FT_Err_Unknown_File_Format)
1765 DPRINT1(
"Unknown font file format\n");
1767 DPRINT1(
"Error reading font (error code: %d)\n",
Error);
1773 Face = SharedFace->
Face;
1921 if (pOS2 && os2_version >= 1)
1928 for (BitIndex = 0; BitIndex <
MAXTCIINDEX; ++BitIndex)
1930 if (os2_ulCodePageRange1 & (1 << BitIndex))
1935 if ((CharSetIndex == -1 && CharSetCount == 0) ||
1936 CharSetIndex == CharSetCount)
1961 DPRINT(
"Font loaded: %s (%s)\n",
1968 Entry->Font = FontGDI;
1969 Entry->NotEnum = (Characteristics & FR_NOT_ENUM);
1972 if (Characteristics & FR_PRIVATE)
1987 if (FontIndex == -1)
2004 if (CharSetIndex == -1)
2009 if (
Entry->StyleName.Length)
2010 NameLength +=
Entry->StyleName.Length +
sizeof(
WCHAR);
2038 *pValueName = NewString;
2040 if (
Entry->StyleName.Length)
2046 for (
i = 1;
i < CharSetCount; ++
i)
2080 default:
return L"Unknown";
2119 RtlInitEmptyUnicodeString(&PathName, pszBuffer,
Length);
2142 DPRINT1(
"Could not load font file: %wZ\n", &PathName);
2151 DPRINT1(
"ObReferenceObjectByHandle failed.\n");
2164 DPRINT1(
"Could not map file: %wZ\n", &PathName);
2175 DPRINT1(
"Could not map file: %wZ\n", &PathName);
2184 LoadFont.Characteristics = Characteristics;
2214 RtlInitEmptyUnicodeString(&NewString, pszBuffer,
Length);
2237 RtlInitEmptyUnicodeString(&NewString, pszBuffer,
Length);
2263 pFileName = PathName.
Buffer;
2298 if (!lpszPath || !*lpszPath)
2300 if (*lpszPath ==
L'\\' || (*lpszPath && lpszPath[1] ==
L':'))
2335 &KeyFullInfo,
sizeof(KeyFullInfo), &
Length);
2348 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2354 for (
i = 0;
i < KeyFullInfo.
Values; ++
i)
2358 InfoBuffer, InfoSize, &
Length);
2367 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2372 InfoBuffer, InfoSize, &
Length);
2387 DPRINT1(
"RtlCreateUnicodeString failed\n");
2393 InfoBuffer, InfoSize, &
Length);
2402 DPRINT1(
"ExAllocatePoolWithTag failed\n");
2407 InfoBuffer, InfoSize, &
Length);
2427 L"\\SystemRoot\\Fonts\\%s", pchPath);
2454 return (KeyFullInfo.
Values != 0 && nFontCount != 0);
2475 LoadFont.Characteristics = FR_PRIVATE | FR_NOT_ENUM;
2491 if (EntryCollection)
2501 Ret = EntryCollection->
Handle;
2563 if (CurrentEntry->
Handle == hMMFont)
2565 EntryCollection = CurrentEntry;
2573 if (EntryCollection)
2590 DPRINT(
"IntGdiCleanupPrivateFontsForProcess()\n");
2593 EntryCollection =
NULL;
2606 if (EntryCollection)
2684 if (lf->lfEscapement != lf->lfOrientation)
2778 int Ascent, Descent;
2835 - ((Ascent + Descent)
2837 YScale) + 32) >> 6);
3026 Names->OtmSize = OtmSize;
3106 if (
Size == 0 &&
Cache->OutlineRequiredSize > 0)
3109 return Cache->OutlineRequiredSize;
3124 return Cache->OutlineRequiredSize;
3129 if (Size < Cache->OutlineRequiredSize)
3131 DPRINT1(
"Size %u < OutlineRequiredSize %u\n",
Size,
3132 Cache->OutlineRequiredSize);
3151 DPRINT1(
"Can't find OS/2 table - not TT font?\n");
3160 DPRINT1(
"Can't find HHEA table - not TT font?\n");
3181#define SCALE_X(value) ((FT_MulFix((value), XScale) + 32) >> 6)
3182#define SCALE_Y(value) ((FT_MulFix((value), YScale) + 32) >> 6)
3231 return Cache->OutlineRequiredSize;
3298 INT i,
Count, BestIndex, Score, BestScore;
3339 if (
Name.name_id != NameID)
3352 (
Name.string[0] == 0 &&
Name.string[1] == 0))
3376 if (Score > BestScore)
3435 if (!
Cache->FontFamily.Buffer)
3441 if (!
Cache->FullName.Buffer)
3486 Lf = &
Info->EnumLogFontEx.elfLogFont;
3499 Ntm = &
Info->NewTextMetricEx.ntmTm;
3544 sizeof(
Info->EnumLogFontEx.elfFullName),
3548 StyleW.
Buffer =
Info->EnumLogFontEx.elfStyle;
3589 if (
fs.fsCsb[0] == 0)
3596 case FT_ENCODING_UNICODE:
3597 case FT_ENCODING_APPLE_ROMAN:
3600 case FT_ENCODING_MS_SYMBOL:
3612 if (
fs.fsCsb[0] & fs0)
3624 DPRINT1(
"Unknown elfscript for bit %u\n",
i);
3629 Info->NewTextMetricEx.ntmFontSig =
fs;
3649 FontGDI = CurrentEntry->
Font;
3776 const DWORD *pdw = pv;
3792 DWORD dwHash = pCache->dwHash;
3796 for (CurrentEntry = g_FontCacheListHead.
Flink;
3797 CurrentEntry != &g_FontCacheListHead;
3798 CurrentEntry = CurrentEntry->
Flink)
3801 if (FontEntry->
dwHash == dwHash &&
3803 FontEntry->
Hashed.
Face == pCache->Hashed.Face &&
3814 if (CurrentEntry == &g_FontCacheListHead)
3840 DPRINT1(
"Failure caching glyph.\n");
3848 DPRINT1(
"Failure rendering glyph.\n");
3855 DPRINT1(
"Alloc failure caching glyph.\n");
3864 DPRINT1(
"Conversion failed\n");
3872 BitmapGlyph->
bitmap = AlignedBitmap;
3893 int needed = 0,
point = 0, contour, first_pt;
3894 unsigned int pph_start, cpfx;
3897 for (contour = 0; contour <
outline->n_contours; contour++)
3914 needed +=
sizeof(*pph);
3916 while (point <= outline->contours[contour])
3928 }
while (point <= outline->contours[contour] &&
3940 else if (point <= outline->contours[contour] &&
3954 needed +=
sizeof(*ppc) + (cpfx - 1) *
sizeof(
POINTFX);
3957 pph->
cb = needed - pph_start;
3980 int contour,
point = 0, first_pt;
3985 unsigned int needed = 0;
3987 for (contour = 0; contour <
outline->n_contours; contour++)
3997 needed +=
sizeof(*pph);
3999 while (point <= outline->contours[contour])
4026 cubic_control[0].
x >>= 1;
4027 cubic_control[0].
y >>= 1;
4030 cubic_control[3] =
outline->points[first_pt];
4038 cubic_control[3].
x >>= 1;
4039 cubic_control[3].
y >>= 1;
4044 cubic_control[1].
x = (2 *
outline->points[
point].x + 1) / 3;
4045 cubic_control[1].
y = (2 *
outline->points[
point].y + 1) / 3;
4046 cubic_control[2] = cubic_control[1];
4047 cubic_control[1].
x += (cubic_control[0].
x + 1) / 3;
4048 cubic_control[1].
y += (cubic_control[0].
y + 1) / 3;
4049 cubic_control[2].
x += (cubic_control[3].
x + 1) / 3;
4050 cubic_control[2].
y += (cubic_control[3].
y + 1) / 3;
4060 }
while (point <= outline->contours[contour] &&
4066 if (point <= outline->contours[contour] &&
4078 needed +=
sizeof(*ppc) + (cpfx - 1) *
sizeof(
POINTFX);
4081 pph->
cb = needed - pph_start;
4095 LONG Ascent, Descent, Sum, EmHeight, Width64;
4097 lfWidth =
abs(lfWidth);
4102 DPRINT(
"lfHeight and lfWidth are zero.\n");
4125 if (!pOS2 || !pHori)
4130 DPRINT1(
"%s: Failed to request font size.\n",
face->family_name);
4154#define FM_SEL_USE_TYPO_METRICS 0x80
4163 Sum = Ascent + Descent;
4176 else if (lfHeight < 0)
4192#undef FM_SEL_USE_TYPO_METRICS
4199 EmHeight =
max(EmHeight, 1);
4212 Width64 = (
FT_MulDiv(lfWidth, 96 * 5, 72 * 3) << 6);
4218 req.
width = Width64;
4219 req.
height = (EmHeight << 6);
4243 DPRINT(
"WARNING: No charmap selected!\n");
4244 DPRINT(
"This font face has %d charmaps\n",
face->num_charmaps);
4247 for (
n = 0;
n <
face->num_charmaps;
n++)
4249 charmap =
face->charmaps[
n];
4250 if (charmap->
encoding == FT_ENCODING_UNICODE)
4258 for (
n = 0;
n <
face->num_charmaps;
n++)
4260 charmap =
face->charmaps[
n];
4270 for (
n = 0;
n <
face->num_charmaps;
n++)
4272 charmap =
face->charmaps[
n];
4273 if (charmap->
encoding == FT_ENCODING_MS_SYMBOL)
4280 if (!found &&
face->num_charmaps > 0)
4282 found =
face->charmaps[0];
4286 DPRINT1(
"WARNING: Could not find desired charmap!\n");
4294 DPRINT1(
"WARNING: Could not set the charmap!\n");
4320 if (glyph < 0x100) glyph += 0xf000;
4359 DPRINT1(
"%S, %p, %p\n", pChain->LogFont.lfFaceName, pChain->pBaseTextObj, pChain->pDefFace);
4361 Head = &pChain->FontLinkList;
4365 DPRINT1(
"FontLink #%d: %p, %d, %S, %p, %p\n",
4392 DPRINT(
"code: 0x%08X, index: 0x%08X, fCodeAsIndex:%d\n",
code,
index, fCodeAsIndex);
4393 pCache->Hashed.Face = *pFace = pChain->pDefFace;
4404 Head = &pChain->FontLinkList;
4418 pCache->Hashed.Face = *pFace =
face;
4427 pCache->Hashed.Face = *pFace = pChain->pDefFace;
4444 BOOL bIgnoreRotation)
4471 cjBuf, pvBuf, pmat2);
4473 pdcattr =
dc->pdcattr;
4535 DPRINT1(
"WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index);
4543 if (aveWidth && potm)
4572 DPRINT(
"Advance = %d, lsb = %d, bbx = %d\n",adv, lsb, bbx);
4589 needsTransform =
TRUE;
4603 needsTransform =
TRUE;
4611 DPRINT(
"Rotation Trans!\n");
4614 needsTransform =
TRUE;
4621 DPRINT(
"MAT2 Matrix Trans!\n");
4627 needsTransform =
TRUE;
4632 if (!needsTransform)
4634 DPRINT(
"No Need to be Transformed!\n");
4645 for (xc = 0; xc < 2; xc++)
4647 for (yc = 0; yc < 2; yc++)
4655 if (xc == 0 && yc == 0)
4686 DPRINT(
"CX %d CY %d BBX %u BBY %u GOX %d GOY %d\n",
4695 DPRINT(
"GGO_METRICS Exit!\n");
4712 pitch = ((
width + 31) >> 5) << 2;
4715 if (!pvBuf || !
cjBuf)
break;
4740 ft_bitmap.
pitch = pitch;
4742 ft_bitmap.
buffer = pvBuf;
4769 unsigned int mult,
row, col;
4774 pitch = (
width + 3) / 4 * 4;
4777 if (!pvBuf || !
cjBuf)
break;
4791 for (
x = 0; (
UINT)
x < pitch;
x++)
4793 if (x < ft_face->glyph->bitmap.width)
4794 dst[
x] = (
src[
x / 8] & (1 << ( (7 - (
x % 8))))) ? 0xff : 0;
4807 ft_bitmap.
pitch = pitch;
4809 ft_bitmap.
buffer = pvBuf;
4836 for (col = 0; col <
width; col++,
ptr++)
4838 *
ptr = (((
int)*
ptr) * mult + 128) / 256;
4864 if (!pvBuf || !
cjBuf)
4884 if (needsTransform && pvBuf)
4892 if (!pvBuf || !
cjBuf)
4906 DPRINT(
"ftGdiGetGlyphOutline END and needed %lu\n", needed);
4936 DPRINT1(
"WARNING: Failed to load and render glyph! [index: %d]\n",
Cache->Hashed.GlyphIndex);
4940 glyph =
Cache->Hashed.Face->glyph;
4942 if (
Cache->Hashed.Aspect.Emu.Bold)
4945 if (
Cache->Hashed.Aspect.Emu.Italic)
4951 DPRINT1(
"Failed to render glyph! [index: %d]\n",
Cache->Hashed.GlyphIndex);
4970 INT glyph_index,
i, previous, nTenthsOfDegrees;
4973 BOOL use_kerning, bVerticalWriting;
4974 LONG ascender, descender;
4995 bVerticalWriting = ((nTenthsOfDegrees == 90 * 10) || (nTenthsOfDegrees == 270 * 10));
5029 Cache.Hashed.GlyphIndex = glyph_index;
5036 if (use_kerning && previous && glyph_index)
5040 TotalWidth64 += delta.
x;
5045 if (((TotalWidth64 + 32) >> 6) <= MaxExtent &&
NULL != Fit)
5051 Dx[
i] = (TotalWidth64 + 32) >> 6;
5054 previous = glyph_index;
5061 if (bVerticalWriting)
5063 Size->cx = ascender + descender;
5064 Size->cy = (TotalWidth64 + 32) >> 6;
5068 Size->cx = (TotalWidth64 + 32) >> 6;
5069 Size->cy = ascender + descender;
5098 pdcattr = Dc->pdcattr;
5134 DPRINT(
"Csb 1=%x 0=%x\n",
fs.fsCsb[1],
fs.fsCsb[0]);
5135 if (
fs.fsCsb[0] == 0)
5141 case FT_ENCODING_UNICODE:
5142 case FT_ENCODING_APPLE_ROMAN:
5145 case FT_ENCODING_MS_SYMBOL:
5172 if (
fs.fsCsb[0] & fs0)
5182 DPRINT1(
"TCI failing on %x\n", fs0);
5196 DWORD num_ranges = 0;
5201 DPRINT1(
"FIXME: No charmap selected! This is a BUG!\n");
5205 if (
face->charmap->encoding == FT_ENCODING_UNICODE)
5208 FT_ULong char_code, char_code_prev;
5212 DPRINT(
"Face encoding FT_ENCODING_UNICODE, number of glyphs %ld, first glyph %u, first char %04lx\n",
5213 face->num_glyphs, glyph_code, char_code);
5215 if (!glyph_code)
return 0;
5219 glyphset->ranges[0].wcLow = (
USHORT)char_code;
5220 glyphset->ranges[0].cGlyphs = 0;
5221 glyphset->cGlyphsSupported = 0;
5227 if (char_code < char_code_prev)
5229 DPRINT1(
"Expected increasing char code from FT_Get_Next_Char\n");
5232 if (char_code - char_code_prev > 1)
5237 glyphset->ranges[num_ranges - 1].wcLow = (
USHORT)char_code;
5238 glyphset->ranges[num_ranges - 1].cGlyphs = 1;
5239 glyphset->cGlyphsSupported++;
5244 glyphset->ranges[num_ranges - 1].cGlyphs++;
5245 glyphset->cGlyphsSupported++;
5247 char_code_prev = char_code;
5252 DPRINT1(
"Encoding %i not supported\n",
face->charmap->encoding);
5254 size =
sizeof(GLYPHSET) +
sizeof(WCRANGE) * (num_ranges - 1);
5257 glyphset->cbThis =
size;
5258 glyphset->cRanges = num_ranges;
5259 glyphset->flAccel = 0;
5295 pdcattr =
dc->pdcattr;
5297 if (
NULL != TextObj)
5324 DPRINT1(
"Can't find OS/2 table - not TT font?\n");
5331 DPRINT1(
"Can't find HHEA table - not TT font?\n");
5380 (
Table << 8 & 0xFF0000);
5402#define GOT_PENALTY(name, value) Penalty += (value)
5408 const char * style_name)
5574 fNeedScaling =
TRUE;
5583 fNeedScaling =
TRUE;
5629 fNeedScaling =
TRUE;
5738 DPRINT(
"WARNING: Penalty:%ld < 200: RequestedNameW:%ls, "
5739 "ActualNameW:%ls, lfCharSet:%d, lfWeight:%ld, "
5740 "tmCharSet:%d, tmWeight:%ld\n",
5761 UINT OtmSize, OldOtmSize = 0;
5778 FontGDI = CurrentEntry->
Font;
5785 if (OtmSize > OldOtmSize)
5803 OldOtmSize = OtmSize;
5806 if (*MatchPenalty ==
MAXULONG || Penalty < *MatchPenalty)
5808 *FontObj =
GDIToObj(FontGDI, FONT);
5809 *MatchPenalty = Penalty;
5918 if (
NULL == TextObj)
5937 SubstitutedLogFont = *pLogFont;
5942 MatchPenalty = 0xFFFFFFFF;
5961 DPRINT1(
"Request font %S not found, no fonts loaded at all\n",
6045 DPRINT(
"ZwOpenFile() failed (Status = 0x%lx)\n",
Status);
6053 DPRINT(
"ZwQueryObject() failed (Status = %lx)\n",
Status);
6109 const ULONG MaxFamInfo = 64;
6114 DPRINT(
"IntGdiGetFontResourceInfo: dwType == %lu\n", dwType);
6135 if (!NameInfo1 || !NameInfo2 || !FamInfo)
6151 for (ListEntry = g_FontListHead.
Flink; ListEntry != &g_FontListHead;
6152 ListEntry = ListEntry->
Flink)
6180 if (
Count >= MaxFamInfo)
6190 if (
Count == 0 && dwType != 5)
6226 Size +=
wcslen(FamInfo[
i].EnumLogFontEx.elfLogFont.lfFaceName);
6227 if (FamInfo[
i].EnumLogFontEx.elfStyle[0] &&
6228 _wcsicmp(FamInfo[
i].EnumLogFontEx.elfStyle,
L"Regular") != 0)
6230 Size += 1 +
wcslen(FamInfo[
i].EnumLogFontEx.elfStyle);
6375 Info->dwUnknown = -1;
6392 FT_UInt previous_index = 0, glyph_index = 0;
6402 if (previous_index && glyph_index)
6406 if (pKerningPair && cPairs)
6408 pKerningPair[
i].
wFirst = char_previous;
6409 pKerningPair[
i].
wSecond = char_code;
6412 if (
i == cPairs)
break;
6416 previous_index = glyph_index;
6417 char_previous = char_code;
6438 LONG AvailCount = 0;
6444 InfoCount, &g_FontListHead))
6481 LONG GotCount, AvailCount, SafeInfoCount;
6484 if (UnsafeLogFont ==
NULL || UnsafeInfo ==
NULL || UnsafeInfoCount ==
NULL)
6509 if (SafeInfoCount <= 0)
6532 GotCount =
min(AvailCount, SafeInfoCount);
6533 SafeInfoCount = AvailCount;
6627 (fuOptions & ETO_GLYPH_INDEX));
6628 Cache->Hashed.GlyphIndex = glyph_index;
6635 if (use_kerning && previous && glyph_index)
6649 vec.
x = (Dx[2 *
i + 0] << 6);
6650 vec.
y = (Dx[2 *
i + 1] << 6);
6658 vec.
x = (Dx[
i] << 6);
6666 previous = glyph_index;
6689 Rect.left =
Rect.right = pPoints[0].x;
6690 Rect.top =
Rect.bottom = pPoints[0].y;
6691 for (
i = 1;
i < cPoints; ++
i)
6696 else if (
Rect.right <
x)
6702 else if (
Rect.bottom <
y)
6776 SURFOBJ *SurfObj, *SourceGlyphSurf;
6781 LONGLONG X64, Y64, RealXStart64, RealYStart64, DeltaX64, DeltaY64;
6783 RECTL DestRect, MaskRect;
6794 BOOL use_kerning, bResult, DoBreak;
6799 const DWORD del = 0x7f, nbsp = 0xa0;
6822 if (!
dc->dclevel.pSurface)
6829 pdcattr =
dc->pdcattr;
6848 psurf =
dc->dclevel.pSurface;
6873 &
dc->eboBackground.BrushObject);
6874 fuOptions &= ~ETO_OPAQUE;
6885 if (TextObj ==
NULL)
6891 FontObj = TextObj->
Font;
6931 bNoTransform = ((
mat.xy == 0) && (
mat.yx == 0) &&
6932 (
mat.xx == (1 << 16)) && (
mat.yy == (1 << 16)));
6936 vecAscent64.
y = (FontGDI->
tmAscent << 6);
6943#define VALIGN_MASK (TA_TOP | TA_BASELINE | TA_BOTTOM)
6950 RealXStart64 -= vecDescent64.
x;
6951 RealYStart64 += vecDescent64.
y;
6955 RealXStart64 -= vecAscent64.
x;
6956 RealYStart64 += vecAscent64.
y;
6966 fuOptions, bNoTransform, &Chain))
6977 RealXStart64 -= DeltaX64 / 2;
6978 RealYStart64 -= DeltaY64 / 2;
6982 RealXStart64 -= DeltaX64;
6983 RealYStart64 -= DeltaY64;
6989 INT X0 = (RealXStart64 + vecAscent64.
x + 32) >> 6;
6990 INT Y0 = (RealYStart64 - vecAscent64.
y + 32) >> 6;
6991 INT DX = (DeltaX64 >> 6);
6992 if (
Cache.Hashed.matTransform.xy == 0 &&
Cache.Hashed.matTransform.yx == 0)
6994 INT CY = (vecAscent64.
y - vecDescent64.
y + 32) >> 6;
6999 INT DY = (DeltaY64 >> 6);
7000 INT X1 = ((RealXStart64 + vecDescent64.
x + 32) >> 6);
7001 INT Y1 = ((RealYStart64 - vecDescent64.
y + 32) >> 6);
7005 { X0 +
DX, Y0 + DY },
7006 { X1 +
DX, Y1 + DY },
7043 (fuOptions & ETO_GLYPH_INDEX));
7044 Cache.Hashed.GlyphIndex = glyph_index;
7054 if (use_kerning && previous && glyph_index &&
NULL == Dx)
7061 DPRINT(
"X64, Y64: %I64d, %I64d\n", X64, Y64);
7068 if (ch0 >
L' ' && ch0 !=
del && ch0 != nbsp && bitSize.
cx == 0)
7069 DPRINT1(
"WARNING: WChar 0x%04x has a bitSize.cx of zero\n", ch0);
7074 (ch0 ==
L' ' || ch0 == nbsp))
7080 bitSize.
cx = spaceWidth.
cx;
7081 realglyph->
left = 0;
7087 DestRect.
left = ((X64 + 32) >> 6) + realglyph->
left;
7089 DestRect.
top = ((Y64 + 32) >> 6) - realglyph->
top;
7093 if ((bitSize.
cx != 0) && (bitSize.
cy != 0))
7105 DPRINT1(
"WARNING: EngCreateBitmap() failed!\n");
7111 if (!SourceGlyphSurf)
7114 DPRINT1(
"WARNING: EngLockSurface() failed!\n");
7147 &
dc->eboText.BrushObject,
7150 DPRINT1(
"Failed to MaskBlt a glyph!\n");
7167 vec.
x = (Dx[2 *
i + 0] << 6);
7168 vec.
y = (Dx[2 *
i + 1] << 6);
7176 vec.
x = (Dx[
i] << 6);
7184 DPRINT(
"New X64, New Y64: %I64d, %I64d\n", X64, Y64);
7186 previous = glyph_index;
7198 DeltaX64 = X64 - RealXStart64;
7199 DeltaY64 = Y64 - RealYStart64;
7201 if (!
face->units_per_EM)
7209 face->underline_position *
face->size->metrics.y_ppem /
face->units_per_EM;
7211 face->underline_thickness *
face->size->metrics.y_ppem /
face->units_per_EM;
7221 vecB64.
y = vecA64.
y + (thickness << 6);
7225 INT X0 = (RealXStart64 - vecA64.
x + 32) >> 6;
7226 INT Y0 = (RealYStart64 + vecA64.
y + 32) >> 6;
7227 INT DX = (DeltaX64 >> 6);
7228 if (
Cache.Hashed.matTransform.xy == 0 &&
Cache.Hashed.matTransform.yx == 0)
7230 INT CY = (vecB64.
y - vecA64.
y + 32) >> 6;
7235 INT DY = (DeltaY64 >> 6);
7236 INT X1 = X0 + ((vecA64.
x - vecB64.
x + 32) >> 6);
7237 INT Y1 = Y0 + ((vecB64.
y - vecA64.
y + 32) >> 6);
7241 { X0 +
DX, Y0 + DY },
7242 { X1 +
DX, Y1 + DY },
7253 vecA64.
y = -(FontGDI->
tmAscent << 6) / 3;
7255 vecB64.
y = vecA64.
y + (thickness << 6);
7259 INT X0 = (RealXStart64 - vecA64.
x + 32) >> 6;
7260 INT Y0 = (RealYStart64 + vecA64.
y + 32) >> 6;
7261 INT DX = (DeltaX64 >> 6);
7262 if (
Cache.Hashed.matTransform.xy == 0 &&
Cache.Hashed.matTransform.yx == 0)
7264 INT CY = (vecB64.
y - vecA64.
y + 32) >> 6;
7269 INT DY = (DeltaY64 >> 6);
7270 INT X1 = X0 + ((vecA64.
x - vecB64.
x + 32) >> 6);
7271 INT Y1 = Y0 + ((vecB64.
y - vecA64.
y + 32) >> 6);
7275 { X0 +
DX, Y0 + DY },
7276 { X1 +
DX, Y1 + DY },
7295 if (TextObj !=
NULL)
7342#define STACK_TEXT_BUFFER_SIZE 512
7385 if (
BufSize >
sizeof(LocalBuffer))
7431 SafeRect = *UnsafeRect;
7457 if (
Buffer != LocalBuffer)
7534 if (SafeBuff ==
NULL)
7555 pdcattr =
dc->pdcattr;
7561 if (TextObj ==
NULL)
7579 charmap =
face->charmaps[
i];
7589 DPRINT1(
"WARNING: Could not find desired charmap!\n");
7611 for (
i = FirstChar;
i < FirstChar+
Count;
i++)
7625 left = (
INT)
face->glyph->metrics.horiBearingX & -64;
7626 right = (
INT)((
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width) + 63) & -64;
7627 adv = (
face->glyph->advance.x + 32) >> 6;
7641 SafeBuffF[
i - FirstChar].
abcfC = (
FLOAT) (adv - lsb - bbx);
7645 SafeBuff[
i - FirstChar].
abcA = lsb;
7646 SafeBuff[
i - FirstChar].
abcB = bbx;
7647 SafeBuff[
i - FirstChar].
abcC = adv - lsb - bbx;
7665 DPRINT(
"NtGdiGetCharABCWidths Worked!\n");
7726 if (!
fl) SafeBuffF = (
PFLOAT) SafeBuff;
7727 if (SafeBuff ==
NULL)
7746 pdcattr =
dc->pdcattr;
7751 if (TextObj ==
NULL)
7768 charmap =
face->charmaps[
i];
7778 DPRINT1(
"WARNING: Could not find desired charmap!\n");
7800 for (
i = FirstChar;
i < FirstChar+
Count;
i++)
7812 SafeBuffF[
i - FirstChar] = (
FLOAT) ((
face->glyph->advance.x + 32) >> 6);
7814 SafeBuff[
i - FirstChar] = (
face->glyph->advance.x + 32) >> 6;
7853 WCHAR DefChar = 0xffff;
7868 if (!UnSafepwc && !UnSafepgi && cwc > 0)
7870 DPRINT1(
"!UnSafepwc && !UnSafepgi && cwc > 0\n");
7874 if (!UnSafepwc != !UnSafepgi)
7876 DPRINT1(
"UnSafepwc == %p, UnSafepgi = %p\n", UnSafepwc, UnSafepgi);
7887 pdcattr =
dc->pdcattr;
7901 if (!UnSafepwc && !UnSafepgi)
7916 DPRINT1(
"ExAllocatePoolWithTag\n");
7961 pwcSize = cwc *
sizeof(
WCHAR);
7989 for (
i = 0;
i < cwc;
i++)
8015 if (Safepwc !=
NULL)
NTSTATUS NTAPI MmUnmapViewInSystemSpace(IN PVOID MappedBase)
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define FILE_DIRECTORY_FILE
static VOID del(LPHIST_ENTRY item)
__inline USHORT Length(VOID)
__inline PWCHAR Buffer(VOID)
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)
#define ASSERT_DC_PREPARED(pdc)
FORCEINLINE PDC DC_LockDc(HDC hdc)
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define TT_MS_ID_SYMBOL_CS
#define TT_PLATFORM_APPLE_UNICODE
static void cleanup(void)
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 RemoveTailList(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExInitializePushLock
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
struct _FileName FileName
static const FLOATOBJ gef1
#define FLOATOBJ_Set1(fo)
#define FLOATOBJ_Equal1(pf)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
BOOL LoadFont(LPWSTR lpCmdLine)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiGetGlyphIndicesW(_In_ HDC hdc, _In_reads_opt_(cwc) LPCWSTR pwc, _In_ INT cwc, _Out_writes_opt_(cwc) LPWORD pgi, _In_ DWORD iMode)
BOOL FASTCALL TextIntUpdateSize(PDC dc, PTEXTOBJ TextObj, PFONTGDI FontGDI, BOOL bDoLock)
VOID APIENTRY IntEngFillPolygon(IN OUT PDC dc, IN POINTL *pPoints, IN UINT cPoints, IN BRUSHOBJ *BrushObj)
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 VOID FontLink_Chain_Free(_Inout_ PFONTLINK_CHAIN pChain)
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 BOOL face_has_symbol_charmap(FT_Face ft_face)
#define IS_HIGH_SURROGATE(ch0)
static DWORD IntGetHash(IN LPCVOID pv, IN DWORD cdw)
static BOOL FASTCALL IntGetFullFileName(POBJECT_NAME_INFORMATION NameInfo, ULONG Size, PUNICODE_STRING FileName)
static FT_Error IntRequestFontSize(PDC dc, PFONTGDI FontGDI, LONG lfWidth, LONG lfHeight)
static BOOL s_fFontLinkUseAnsi
static void SharedMem_AddRef(PSHARED_MEM Ptr)
BOOL FASTCALL ftGdiGetTextMetricsW(HDC hDC, PTMW_INTERNAL ptmwi)
static NTSTATUS DuplicateUnicodeString(PUNICODE_STRING Source, PUNICODE_STRING Destination)
static BOOL FontLink_PrepareFontInfo(_Inout_ PFONTLINK pFontLink)
static PSHARED_FACE SharedFace_Create(FT_Face Face, PSHARED_MEM Memory)
static VOID FASTCALL IntFontType(PFONTGDI Font)
FT_Library g_FreeTypeLibrary
BOOL FASTCALL TextIntGetTextExtentPoint(PDC dc, PTEXTOBJ TextObj, LPCWSTR String, INT Count, ULONG MaxExtent, LPINT Fit, LPINT Dx, LPSIZE Size, FLONG fl)
BOOL APIENTRY GreExtTextOutW(IN HDC hDC, IN INT XStart, IN INT YStart, IN UINT fuOptions, IN OPTIONAL PRECTL lprc, IN LPCWSTR String, IN INT Count, IN OPTIONAL LPINT Dx, IN DWORD dwCodePage)
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)
ULONG FASTCALL ftGdiGetGlyphOutline(PDC dc, WCHAR wch, UINT iFormat, LPGLYPHMETRICS pgm, ULONG cjBuf, PVOID pvBuf, LPMAT2 pmat2, BOOL bIgnoreRotation)
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)
static __inline SIZE_T FASTCALL IntStoreName(const UNICODE_STRING *pName, BYTE *pb)
const MATRIX gmxWorldToPageDefault
static UNICODE_STRING g_FontRegPath
BOOL APIENTRY NtGdiGetCharABCWidthsW(IN HDC hDC, IN UINT FirstChar, IN ULONG Count, IN OPTIONAL PWCHAR UnSafepwch, IN FLONG fl, OUT PVOID Buffer)
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 const WCHAR s_szzDefFixedFontLink[]
BOOL FASTCALL IntLoadFontSubstList(PLIST_ENTRY pHead)
static UINT g_FontCacheNumEntries
static WCHAR s_szDefFontLinkFontName[MAX_PATH]
static LPCWSTR FASTCALL NameFromCharSet(BYTE CharSet)
BOOL APIENTRY IntExtTextOutW(IN PDC dc, IN INT XStart, IN INT YStart, IN UINT fuOptions, IN OPTIONAL PRECTL lprc, IN LPCWSTR String, IN INT Count, IN OPTIONAL LPINT Dx, IN DWORD dwCodePage)
BOOL APIENTRY NtGdiExtTextOutW(IN HDC hDC, IN INT XStart, IN INT YStart, IN UINT fuOptions, IN OPTIONAL LPRECT UnsafeRect, IN LPWSTR UnsafeString, IN INT Count, IN OPTIONAL LPINT UnsafeDx, IN DWORD dwCodePage)
VOID FASTCALL IntLoadSystemFonts(VOID)
DWORD FASTCALL ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset)
#define GOT_PENALTY(name, value)
static void SharedFace_AddRef(PSHARED_FACE Ptr)
#define LOW_SURROGATE_MIN
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs)
static VOID FASTCALL UnlinkFontMemCollection(PFONT_ENTRY_COLL_MEM Collection)
static NTSTATUS FontLink_LoadDefaultCharset(VOID)
struct _FONTLINK_CHAIN FONTLINK_CHAIN
static DWORD Utf32FromSurrogatePair(DWORD ch0, DWORD ch1)
static VOID FontLink_Chain_Dump(_In_ PFONTLINK_CHAIN pChain)
static void FASTCALL FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName, LPCWSTR FullName, PFONTGDI FontGDI)
static void SharedFace_Release(PSHARED_FACE Ptr)
static void SwapEndian(LPVOID pvData, DWORD Size)
static __inline void FASTCALL IntInitFontNames(FONT_NAMES *Names, PSHARED_FACE SharedFace)
static void RemoveCacheEntries(FT_Face Face)
LONG NTAPI NtGdiGetFontFamilyInfo(HDC Dc, const LOGFONTW *UnsafeLogFont, PFONTFAMILYINFO UnsafeInfo, LPLONG UnsafeInfoCount)
#define FM_SEL_USE_TYPO_METRICS
#define IS_LOW_SURROGATE(ch1)
BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI Font, PREALIZATION_INFO Info)
static NTSTATUS FontLink_Chain_LoadReg(_Inout_ PFONTLINK_CHAIN pChain, _Inout_ PLOGFONTW pLF)
VOID FASTCALL FreeFontSupport(VOID)
VOID FASTCALL IntEnableFontRendering(BOOL Enable)
#define IntUnLockFreeType()
static BOOL s_fFontLinkUseOem
static VOID IntUnicodeStringToBuffer(LPWSTR pszBuffer, SIZE_T cbBuffer, const UNICODE_STRING *pString)
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)
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)
static VOID FontLink_CleanupCache(VOID)
static __inline BYTE *FASTCALL IntStoreFontNames(const FONT_NAMES *Names, OUTLINETEXTMETRICW *Otm)
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)
BOOL APIENTRY NtGdiGetCharWidthW(IN HDC hDC, IN UINT FirstChar, IN UINT Count, IN OPTIONAL PWCHAR UnSafepwc, IN FLONG fl, OUT PVOID Buffer)
INT FASTCALL IntGdiAddFontResourceEx(PUNICODE_STRING FileName, DWORD Characteristics, DWORD dwFlags)
static FT_BitmapGlyph IntGetBitmapGlyphWithCache(IN OUT PFONT_CACHE_ENTRY Cache, IN FT_GlyphSlot GlyphSlot)
#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)
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
static VOID FontLink_AddCache(_In_ PFONTLINK_CACHE pCache)
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_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 LONG ScaleLong(LONG lValue, PFLOATOBJ pef)
static __inline FT_Fixed FT_FixedFromFIXED(FIXED f)
INT FASTCALL IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
static BOOL MatchFontName(PSHARED_FACE SharedFace, PUNICODE_STRING Name1, FT_UShort NameID, FT_UShort LangID)
static SIZE_T SZZ_GetSize(_In_ PCZZWSTR pszz)
static BOOLEAN FASTCALL GetFontFamilyInfoForSubstitutes(const LOGFONTW *LogFont, PFONTFAMILYINFO Info, LONG *pCount, LONG MaxCount)
struct _FONTLINK_CACHE FONTLINK_CACHE
static BOOL MatchFontNames(PSHARED_FACE SharedFace, LPCWSTR lfFaceName)
#define ASSERT_FREETYPE_LOCK_HELD()
static LONG IntNormalizeAngle(LONG nTenthsOfDegrees)
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 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
#define HIGH_SURROGATE_MIN
static VOID FontLink_Chain_Finish(_Inout_ PFONTLINK_CHAIN pChain)
static NTSTATUS IntGetFontLocalizedName(PUNICODE_STRING pNameW, PSHARED_FACE SharedFace, FT_UShort NameID, FT_UShort LangID)
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 BOOL IntGetTextDisposition(OUT LONGLONG *pX64, OUT LONGLONG *pY64, IN LPCWSTR String, IN INT Count, IN OPTIONAL LPINT Dx, IN OUT PFONT_CACHE_ENTRY Cache, IN UINT fuOptions, IN BOOL bNoTransform, IN OUT PFONTLINK_CHAIN pChain)
static BOOL s_fFontLinkUseSymbol
static VOID IntRebaseList(_Inout_ PLIST_ENTRY pNewHead, _Inout_ PLIST_ENTRY pOldHead)
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
static PFONTLINK_CACHE FontLink_FindCache(_In_ const LOGFONTW *pLogFont)
#define FONTLINK_DEFAULT_CHAR
static BOOL SubstituteFontRecurse(PLOGFONTW pLogFont)
VOID FASTCALL IntEngFillBox(IN OUT PDC dc, IN INT X, IN INT Y, IN INT Width, IN INT Height, IN BRUSHOBJ *BrushObj)
static LONG g_nFontLinkCacheCount
static const WCHAR s_szzDefFontLink[]
#define MAX_FONTLINK_CACHE
static BYTE CharSetFromLangID(LANGID LangID)
struct _FONTLINK_CACHE * PFONTLINK_CACHE
static VOID FASTCALL CleanupFontEntryEx(PFONT_ENTRY FontEntry, PFONTGDI FontGDI)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
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_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
@ 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
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_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
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 GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLint GLenum face
GLboolean GLboolean GLboolean b
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
_Check_return_ long __cdecl labs(_In_ long x)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
struct _FILE_DIRECTORY_INFORMATION * PFILE_DIRECTORY_INFORMATION
#define EXCEPTION_EXECUTE_HANDLER
#define ROP4_FROM_INDEX(index)
#define RtlEqualMemory(dst, src, len)
static PWSTR PDWORD pdwBytes
#define MmCopyToCaller(x, y, z)
#define ExFreePoolWithTag(_P, _T)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
static DWORD DWORD void LPSTR DWORD cch
#define TT_NAME_ID_FULL_NAME
#define TT_NAME_ID_UNIQUE_ID
static LPCSTR INT LPWORD pgi
#define TT_NAME_ID_FONT_FAMILY
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define TT_NAME_ID_FONT_SUBFAMILY
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_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 PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI VOID NTAPI RtlGetDefaultCodePage(_Out_ PUSHORT AnsiCodePage, _Out_ PUSHORT OemCodePage)
#define _Out_writes_opt_(s)
#define _In_reads_opt_(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)
BOOL FASTCALL IntFillPolygon(PDC dc, SURFACE *psurf, BRUSHOBJ *BrushObj, CONST PPOINT Points, int Count, RECTL DestRect, POINTL *BrushOrigin)
#define PATH_IsPathOpen(dclevel)
void * EngAllocMem(int zero, unsigned long size, int tag=0)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define SUBLANG_CHINESE_TRADITIONAL
#define SUBLANG_CHINESE_SIMPLIFIED
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
PULONG MinorVersion OPTIONAL
base for all directory entries
base of all file and directory entries
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
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
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)
struct TT_FaceRec_ * TT_Face
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_NO_MORE_FILES
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
_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
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_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
BOOL APIENTRY IntEngBitBlt(SURFOBJ *psoTrg, SURFOBJ *psoSrc, SURFOBJ *psoMask, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
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(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()
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define FLOATOBJ_Equal(pf, pf1)
#define FLOATOBJ_DivLong(pf, l)
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
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)
_In_ ULONG _In_opt_ PVOID pvData
#define FLOATOBJ_AddLong(pf, l)
struct _OUTLINETEXTMETRICW OUTLINETEXTMETRICW
struct _ABCFLOAT * LPABCFLOAT
#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
_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
_Must_inspect_result_ _In_ ULONG Flags
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)