From 7819ce61b51f53e0819ee2f335bfee5ff82a5562 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Tue, 31 Jul 2012 08:50:06 -0500 Subject: [PATCH] usp10: Use cached values in GPOS functions. --- dlls/usp10/shape.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 1ef6039cd0d..3d6b3030550 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -3285,9 +3285,6 @@ void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps const TEXTRANGE_PROPERTIES *rpRangeProperties; int i; INT dirL; - LPOUTLINETEXTMETRICW lpotm; - LOGFONTW lf; - HFONT hfont; rpRangeProperties = &ShapingData[psa->eScript].defaultGPOSTextRange; @@ -3296,15 +3293,9 @@ void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps load_ot_tables(hdc, psc); - if (!psc->GPOS_Table) + if (!psc->GPOS_Table || !psc->otm) return; - i = GetOutlineTextMetricsW( hdc, 0, NULL); - lpotm = HeapAlloc(GetProcessHeap(),0,i); - GetOutlineTextMetricsW( hdc, i, lpotm); - hfont = GetCurrentObject(hdc, OBJ_FONT); - GetObjectW(hfont, sizeof(lf), &lf); - if (!psa->fLogicalOrder && psa->fRTL) dirL = -1; else @@ -3320,7 +3311,7 @@ void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps if (!feature) continue; - GPOS_apply_feature(lpotm, &lf, piAdvance, psc->GPOS_Table, feature, pwGlyphs, dirL, cGlyphs, pGoffset); + GPOS_apply_feature(psc->otm, &psc->lf, piAdvance, psc->GPOS_Table, feature, pwGlyphs, dirL, cGlyphs, pGoffset); } } }