#include <win32k.h>
+#include FT_GLYPH_H
+#include FT_TYPE1_TABLES_H
+#include <freetype/tttables.h>
+#include <freetype/fttrigon.h>
+#include <freetype/ftbitmap.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftwinfnt.h>
+
#define NDEBUG
#include <debug.h>
FT_Face Face;
ANSI_STRING AnsiFaceName;
PFONT_ENTRY Entry;
- PSECTION_OBJECT SectionObject;
+ PVOID SectionObject;
ULONG ViewSize = 0;
LARGE_INTEGER SectionSize;
UNICODE_STRING FontRegPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
}
SectionSize.QuadPart = 0LL;
- Status = MmCreateSection((PVOID)&SectionObject, SECTION_ALL_ACCESS,
+ Status = MmCreateSection(&SectionObject, SECTION_ALL_ACCESS,
NULL, &SectionSize, PAGE_READONLY,
SEC_COMMIT, FileHandle, NULL);
if (!NT_SUCCESS(Status))
if (Error == FT_Err_Unknown_File_Format)
DPRINT("Unknown font file format\n");
else
- DPRINT("Error reading font file (error code: %u)\n", Error);
+ DPRINT("Error reading font file (error code: %d)\n", Error);
return 0;
}
FontGDI->face = Face;
DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name);
- DPRINT("Num glyphs: %u\n", Face->num_glyphs);
+ DPRINT("Num glyphs: %d\n", Face->num_glyphs);
/* Add this font resource to the font table */
wcscpy(Info->EnumLogFontEx.elfScript, ElfScripts[i]);
else
{
- DPRINT1("Unknown elfscript for bit %d\n", i);
+ DPRINT1("Unknown elfscript for bit %u\n", i);
}
}
}
FT_CharMap found = 0, charmap;
XFORM xForm;
- DPRINT("%d, %08x, %p, %08lx, %p, %p\n", wch, iFormat, pgm,
+ DPRINT("%u, %08x, %p, %08lx, %p, %p\n", wch, iFormat, pgm,
cjBuf, pvBuf, pmat2);
pdcattr = dc->pdcattr;
gm.gmptGlyphOrigin.x = left >> 6;
gm.gmptGlyphOrigin.y = top >> 6;
- DPRINT("CX %d CY %d BBX %d BBY %d GOX %d GOY %d\n",
+ DPRINT("CX %d CY %d BBX %u BBY %u GOX %d GOY %d\n",
gm.gmCellIncX, gm.gmCellIncY,
gm.gmBlackBoxX, gm.gmBlackBoxY,
gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y);
}
default:
- DPRINT1("Unsupported format %d\n", iFormat);
+ DPRINT1("Unsupported format %u\n", iFormat);
return GDI_ERROR;
}
- DPRINT("ftGdiGetGlyphOutline END and needed %d\n", needed);
+ DPRINT("ftGdiGetGlyphOutline END and needed %lu\n", needed);
return needed;
}
dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
if (error)
{
- DPRINT1("Error in setting pixel sizes: %u\n", error);
+ DPRINT1("Error in setting pixel sizes: %d\n", error);
}
/* Get the DC's world-to-device transformation matrix */
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
if (error)
{
- DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("WARNING: Failed to load and render glyph! [index: %d]\n", glyph_index);
break;
}
RenderMode);
if (!realglyph)
{
- DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index);
break;
}
}
}
}
Exit:
- DPRINT("CharSet %d CodePage %d\n",csi.ciCharset, csi.ciACP);
+ DPRINT("CharSet %u CodePage %u\n", csi.ciCharset, csi.ciACP);
return (MAKELONG(csi.ciACP, csi.ciCharset));
}
dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
if (error)
{
- DPRINT1("Error in setting pixel sizes: %u\n", error);
+ DPRINT1("Error in setting pixel sizes: %d\n", error);
IntUnLockFreeType;
goto fail;
}
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
if (error)
{
- DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("WARNING: Failed to load and render glyph! [index: %d]\n", glyph_index);
}
glyph = face->glyph;
RenderMode);
if (!realglyph)
{
- DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index);
IntUnLockFreeType;
goto fail;
}
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
if (error)
{
- DPRINT1("Failed to load and render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("Failed to load and render glyph! [index: %d]\n", glyph_index);
IntUnLockFreeType;
goto fail2;
}
RenderMode);
if (!realglyph)
{
- DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index);
+ DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index);
IntUnLockFreeType;
goto fail2;
}
FT_Get_Kerning(face, previous, glyph_index, 0, &delta);
TextLeft += delta.x;
}
- DPRINT("TextLeft: %d\n", TextLeft);
- DPRINT("TextTop: %d\n", TextTop);
+ DPRINT("TextLeft: %I64d\n", TextLeft);
+ DPRINT("TextTop: %lu\n", TextTop);
DPRINT("Advance: %d\n", realglyph->root.advance.x);
if (fuOptions & ETO_OPAQUE)
if (NULL == Dx)
{
TextLeft += realglyph->root.advance.x >> 10;
- DPRINT("New TextLeft: %d\n", TextLeft);
+ DPRINT("New TextLeft: %I64d\n", TextLeft);
}
else
{
TextLeft += Dx[i<<DxShift] << 6;
- DPRINT("New TextLeft2: %d\n", TextLeft);
+ DPRINT("New TextLeft2: %I64d\n", TextLeft);
}
if (DxShift)