Author: jimtabor Date: Mon Jan 4 21:48:31 2010 New Revision: 44933
URL: http://svn.reactos.org/svn/reactos?rev=44933&view=rev Log: - Revert changes in font.
Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] Mon Jan 4 21:48:31 2010 @@ -75,19 +75,7 @@ return Count; }
-/* - - It is recommended that an application use the GetFontLanguageInfo function - to determine whether the GCP_DIACRITIC, GCP_DBCS, GCP_USEKERNING, GCP_LIGATE, - GCP_REORDER, GCP_GLYPHSHAPE, and GCP_KASHIDA values are valid for the - currently selected font. If not valid, GetCharacterPlacement ignores the - value. - - M$ must use a preset "compiled in" support for each language based releases. - ReactOS uses FreeType, this will need to be supported. ATM this is hard coded - for GCPCLASS_LATIN! - - */ + DWORD FASTCALL GreGetCharacterPlacementW( @@ -98,14 +86,7 @@ LPGCP_RESULTSW pgcpw, DWORD dwFlags) { - GCP_RESULTSW gcpwSave; - UINT i, nSet, cSet; -// INT *lpDx, *tmpDxCaretPos; - INT *tmpDxCaretPos; - LONG Cx; SIZE Size = {0,0}; - - DPRINT1("GreGCPW Start\n");
if (!pgcpw) { @@ -113,170 +94,8 @@ return MAKELONG(Size.cx, Size.cy); return 0; } - - RtlCopyMemory(&gcpwSave, pgcpw, sizeof(GCP_RESULTSW)); - - cSet = nSet = nCount; - - if ( nCount > gcpwSave.nGlyphs ) cSet = gcpwSave.nGlyphs; - - /* GCP_JUSTIFY may only be used in conjunction with GCP_MAXEXTENT. */ - if ( dwFlags & GCP_JUSTIFY) dwFlags |= GCP_MAXEXTENT; - - if ( !gcpwSave.lpDx && gcpwSave.lpCaretPos ) - tmpDxCaretPos = gcpwSave.lpCaretPos; - else - tmpDxCaretPos = gcpwSave.lpDx; - - if ( !GreGetTextExtentExW( hdc, - pwsz, - cSet, - nMaxExtent, - ((dwFlags & GCP_MAXEXTENT) ? (PULONG) &cSet : NULL), - (PULONG) tmpDxCaretPos, - &Size, - 0) ) - { - return 0; - } - - nSet = cSet; - - if ( tmpDxCaretPos && nSet > 0) - { -// lpDx = tmpDxCaretPos + 4 * nSet - 4; -// lpDx = tmpDxCaretPos[nSet - 1]; -/* while ( lpDx > tmpDxCaretPos ) - { - *lpDx -= *lpDx - 4; - lpDx -= 4; - }*/ - for (i = (nSet - 1); i > 0; i--) - { - tmpDxCaretPos[i] -= tmpDxCaretPos[i - 1]; - } - } - - if ( !(dwFlags & GCP_MAXEXTENT) || nSet ) - { - if ( (dwFlags & GCP_USEKERNING) && - ( gcpwSave.lpDx || - gcpwSave.lpCaretPos ) && - nSet >= 2 ) - { - DWORD Count; - LPKERNINGPAIR pKP; - - Count = GreGetKerningPairs( hdc, 0, NULL); - if (Count) - { - pKP = ExAllocatePoolWithTag(PagedPool, Count * sizeof(KERNINGPAIR), GDITAG_TEXT); - if (pKP) - { - if ( GreGetKerningPairs( hdc, Count, pKP) != Count) - { - ExFreePoolWithTag( pKP, GDITAG_TEXT); - return 0; - } - - if ( (ULONG_PTR)(pKP) < ((ULONG_PTR)(pKP) + (ULONG_PTR)(Count * sizeof(KERNINGPAIR))) ) - { - DPRINT1("We Need to Do Something HERE!\n"); - } - - ExFreePoolWithTag( pKP, GDITAG_TEXT); - - if ( dwFlags & GCP_MAXEXTENT ) - { -// Cx = Size.cx; - if ( Size.cx > nMaxExtent ) - { -// lpDx = tmpDxCaretPos + 4 * nSet - 4; -// lpDx = tmpDxCaretPos[nSet - 1]; -/* - while ( 1 ) - { - if ( !nSet ) break; - - Cx -= *lpDx; - --nSet; - lpDx -= 4; - - Size.cx = Cx; - - if ( Cx <= nMaxExtent ) break; - }*/ - for (Cx = Size.cx; nSet > 0; nSet--) - { - Cx -= tmpDxCaretPos[nSet - 1]; - Size.cx = Cx; - if ( Cx <= nMaxExtent ) break; - } - } - if ( !nSet ) - { - pgcpw->nGlyphs = 0; - pgcpw->nMaxFit = 0; - return 0; - } - } - } - } - } - - if ( (dwFlags & GCP_JUSTIFY) && - ( gcpwSave.lpDx || - gcpwSave.lpCaretPos ) && - nSet ) - { - DPRINT1("We Need to Do Something HERE 2!\n"); - } - - if ( gcpwSave.lpDx && gcpwSave.lpCaretPos ) - RtlCopyMemory( gcpwSave.lpCaretPos, gcpwSave.lpDx, nSet * sizeof(LONG)); - - if ( gcpwSave.lpCaretPos ) - { - int pos = 0; - i = 0; - if ( nSet > 0 ) - { - do - { - Cx = gcpwSave.lpCaretPos[i]; - gcpwSave.lpCaretPos[i] = pos; - pos += Cx; - ++i; - } - while ( i < nSet ); - } - } - - if ( gcpwSave.lpOutString ) - RtlCopyMemory(gcpwSave.lpOutString, pwsz, nSet * sizeof(WCHAR)); - - if ( gcpwSave.lpClass ) - RtlFillMemory(gcpwSave.lpClass, nSet, GCPCLASS_LATIN); - - if ( gcpwSave.lpOrder ) - { - for (i = 0; i < nSet; i++) - gcpwSave.lpOrder[i] = i; - } - - if ( gcpwSave.lpGlyphs ) - { - if ( GreGetGlyphIndicesW( hdc, pwsz, nSet, gcpwSave.lpGlyphs, 0, 0) == GDI_ERROR ) - { - nSet = 0; - Size.cx = 0; - Size.cy = 0; - } - } - pgcpw->nGlyphs = nSet; - pgcpw->nMaxFit = nSet; - } - return MAKELONG(Size.cx, Size.cy); + UNIMPLEMENTED; + return 0; }
INT @@ -494,12 +313,8 @@ IN OUT LPGCP_RESULTSW pgcpw, IN DWORD dwFlags) { - return GreGetCharacterPlacementW( hdc, - pwsz, - nCount, - nMaxExtent, - pgcpw, - dwFlags); + UNIMPLEMENTED; + return 0; }
DWORD