Author: tkreuzer
Date: Tue May 17 14:02:44 2011
New Revision: 51810
URL:
http://svn.reactos.org/svn/reactos?rev=51810&view=rev
Log:
[GDI FONT DRIVER]
- Fix buffer size for EngMultiByteToUnicodeN
- Fix calculation of the checksum for the 'head' true type table
Modified:
branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/font.c
branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/todo.txt
branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/tttables.c
Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/font.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/font.c [iso-8859-1] Tue May
17 14:02:44 2011
@@ -225,19 +225,19 @@
/* Convert names to unicode */
EngMultiByteToUnicodeN(pifiex->awcFamilyName,
- LF_FACESIZE,
+ sizeof(pifiex->awcFamilyName),
NULL,
ftface->family_name,
strnlen(ftface->family_name, MAX_PATH));
EngMultiByteToUnicodeN(pifiex->awcStyleName,
- LF_FACESIZE,
+ sizeof(pifiex->awcStyleName),
NULL,
ftface->style_name,
strnlen(ftface->style_name, MAX_PATH));
EngMultiByteToUnicodeN(pifiex->awcFaceName,
- LF_FACESIZE,
+ sizeof(pifiex->awcFaceName),
NULL,
ftface->family_name,
strnlen(ftface->family_name, MAX_PATH));
@@ -249,7 +249,7 @@
pifiex->awcUniqueName[2] = L'0' + (LOWORD(pface->ulFontRevision) / 100)
% 10;
pifiex->awcUniqueName[3] = L'0' + (LOWORD(pface->ulFontRevision) / 10)
% 10;
pifiex->awcUniqueName[4] = L'0' + LOWORD(pface->ulFontRevision) % 10;
- EngMultiByteToUnicodeN(pifiex->awcUniqueName+6, 4, NULL, pifi->achVendId, 4);
+ EngMultiByteToUnicodeN(pifiex->awcUniqueName+6, 8, NULL, pifi->achVendId, 4);
//__debugbreak();
return TRUE;
Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/todo.txt
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/todo.txt [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/todo.txt [iso-8859-1] Tue May
17 14:02:44 2011
@@ -15,7 +15,6 @@
- FtfdQueryFontCaps: 100% done
- FtfdQueryTrueTypeTable: 100% done
- FtfdGetTrueTypeFile: 100% done
-
- FtfdQueryFontData: 10%, depends on FtfdLoadGlyph
- QFD_MAXEXTENTS: dependes on FtfdQueryMaxExtents
- QFD_GLYPHANDBITMAP: depends on FtfdQueryGlyphData, FtfdQueryGlyphBits
@@ -33,11 +32,20 @@
-------------------
- FtfdInitIfiMetrics: 80% done
- handle other font types than TTF/OTF
- - fix fwdLowestPPEm, fwdMacLineGap, ptlBaseline, ptlAspect, ptlCaret
- - cKerningPairs from atmfd is bigger, ulPanoseCulture
- - check fwdMacAscender, fwdMacDescender
- - Check jWinPitchandFamily (from OS/2 table, Apolonia: 0,0->0x12)
- - fix fwdUnderscorePosition
+ - dpwszFamilyName, dpwszStyleName, dpwszFaceName: locale
+ - dpwszUniqueName: get from 'name' table
+ - dpFontSim: implement
+ - dpCharSets: implement
+ - fwdMacLineGap: implement
+ - fwdMaxCharInc: check/fix
+ - fwdCapHeight: check/fix
+ - fwdUnderscorePosition: fix
+ - chFirstChar, chLastChar, chDefaultChar, chBreakChar: fix
+ - wcDefaultChar, wcBreakChar: fix
+ - ptlBaseline: fix
+ - ptlAspect: fix
+ - ptlCaret: fix
+ - jWinPitchandFamily: check, improve (Apolonia: 0,0->0x12)
- FtfdInitGlyphSet: 100% done
- FtfdInitKerningPairs: 90% done
@@ -55,12 +63,17 @@
- handle vertical layout
- handle ptqD for rotation / skewing
-- FtfdQueryGlyphBits: 50% depends on FtfdCopyBitmap4Bpp and FtfdCopyBitmap1Bpp
- - handle 1bpp bitmaps
+- FtfdQueryGlyphBits: 90% depends on FtfdCopyBitmap4Bpp and FtfdCopyBitmap1Bpp
- FtfdQueryGlyphOutline: unimplemented
- FtfdCopyBitmap4Bpp: 90 %
- add rounding
- Could need optimization
-- FtfdCopyBitmap1Bpp: unimplemented
+- FtfdCopyBitmap1Bpp: 90 %
+ - Can we use full memcpy?
+When replacing the original ttf driver
+-----------------------------------------------
+- Horizontal metrics are broken
+- Marlett symbols are wrong
+
Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/tttables.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/tttables.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/tttables.c [iso-8859-1] Tue
May 17 14:02:44 2011
@@ -121,8 +121,18 @@
return NULL;
}
- /* Check the table's checksum */
+ /* Calculate the table's checksum */
ulCheckSum = CalcTableChecksum((PUCHAR)pvView + ulOffset, ulLength);
+
+ /* Special fixup for 'head' table */
+ if (ulTag == 'daeh')
+ {
+ /* Substract checkSumAdjustment value */
+ PULONG pulAdjust = (PULONG)((PUCHAR)pvView + ulOffset + 8);
+ ulCheckSum -= GETD(pulAdjust);
+ }
+
+ /* Check for failure */
if (ulCheckSum != GETD(&pFontHeader->aTableEntries[i].ulCheckSum))
{
WARN("Checksum mitmatch! %ld, %ld \n", ulOffset, ulLength);