winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2012
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
541 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Store font style provided in LOGFONT data.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 09ba9bdb0addc7ff1d24521724d0ecaedf300e4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09ba9bdb0addc7ff1d2452172…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 13 07:46:43 2012 +0400 dwrite: Store font style provided in LOGFONT data. --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 15 ++++++-- dlls/dwrite/gdiinterop.c | 4 +- dlls/dwrite/tests/font.c | 76 ++++++++++++++++++++++++++++++++++++++++- include/dwrite.idl | 14 ++++++++ 5 files changed, 102 insertions(+), 9 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index c52b93a..c3c7cb1 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -27,4 +27,4 @@ static inline BOOL heap_free(void *mem) } extern HRESULT create_gdiinterop(IDWriteGdiInterop**) DECLSPEC_HIDDEN; -extern HRESULT create_font(IDWriteFont**) DECLSPEC_HIDDEN; +extern HRESULT create_font_from_logfont(const LOGFONTW*, IDWriteFont**) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 29dd63c..e73ef44 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -30,6 +30,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); struct dwrite_font { IDWriteFont IDWriteFont_iface; LONG ref; + + DWRITE_FONT_STYLE style; }; static inline struct dwrite_font *impl_from_IDWriteFont(IDWriteFont *iface) @@ -86,7 +88,7 @@ static DWRITE_FONT_WEIGHT WINAPI dwritefont_GetWeight(IDWriteFont *iface) { struct dwrite_font *This = impl_from_IDWriteFont(iface); FIXME("(%p): stub\n", This); - return DWRITE_FONT_WEIGHT_NORMAL; + return 0; } static DWRITE_FONT_STRETCH WINAPI dwritefont_GetStretch(IDWriteFont *iface) @@ -99,8 +101,8 @@ static DWRITE_FONT_STRETCH WINAPI dwritefont_GetStretch(IDWriteFont *iface) static DWRITE_FONT_STYLE WINAPI dwritefont_GetStyle(IDWriteFont *iface) { struct dwrite_font *This = impl_from_IDWriteFont(iface); - FIXME("(%p): stub\n", This); - return DWRITE_FONT_STYLE_NORMAL; + TRACE("(%p)\n", This); + return This->style; } static BOOL WINAPI dwritefont_IsSymbolFont(IDWriteFont *iface) @@ -169,15 +171,20 @@ static const IDWriteFontVtbl dwritefontvtbl = { dwritefont_CreateFontFace }; -HRESULT create_font(IDWriteFont **font) +HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font) { struct dwrite_font *This; + *font = NULL; + This = heap_alloc(sizeof(struct dwrite_font)); if (!This) return E_OUTOFMEMORY; This->IDWriteFont_iface.lpVtbl = &dwritefontvtbl; This->ref = 1; + + This->style = logfont->lfItalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL; + *font = &This->IDWriteFont_iface; return S_OK; diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index d374724..d98eb5b 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -57,11 +57,11 @@ static ULONG WINAPI gdiinterop_Release(IDWriteGdiInterop *iface) static HRESULT WINAPI gdiinterop_CreateFontFromLOGFONT(IDWriteGdiInterop *iface, LOGFONTW const *logfont, IDWriteFont **font) { - FIXME("(%p %p): stub\n", logfont, font); + TRACE("(%p %p)\n", logfont, font); if (!logfont) return E_INVALIDARG; - return create_font(font); + return create_font_from_logfont(logfont, font); } static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface, diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 520fc1b..f169393 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -30,18 +30,35 @@ #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) -IDWriteFactory *factory; +static IDWriteFactory *factory; static void test_CreateFontFromLOGFONT(void) { static const WCHAR arialW[] = {'A','r','i','a','l',0}; + static const WCHAR blahW[] = {'B','l','a','h','!',0}; IDWriteGdiInterop *interop; DWRITE_FONT_WEIGHT weight; DWRITE_FONT_STYLE style; IDWriteFont *font; LOGFONTW logfont; + LONG weights[][2] = { + {FW_NORMAL, DWRITE_FONT_WEIGHT_NORMAL}, + {FW_BOLD, DWRITE_FONT_WEIGHT_BOLD}, + { 0, DWRITE_FONT_WEIGHT_NORMAL}, + { 50, DWRITE_FONT_WEIGHT_NORMAL}, + {150, DWRITE_FONT_WEIGHT_NORMAL}, + {250, DWRITE_FONT_WEIGHT_NORMAL}, + {350, DWRITE_FONT_WEIGHT_NORMAL}, + {450, DWRITE_FONT_WEIGHT_NORMAL}, + {650, DWRITE_FONT_WEIGHT_BOLD}, + {750, DWRITE_FONT_WEIGHT_BOLD}, + {850, DWRITE_FONT_WEIGHT_BOLD}, + {950, DWRITE_FONT_WEIGHT_BOLD}, + {960, DWRITE_FONT_WEIGHT_BOLD}, + }; HRESULT hr; BOOL ret; + int i; hr = IDWriteFactory_GetGdiInterop(factory, &interop); EXPECT_HR(hr, S_OK); @@ -65,10 +82,10 @@ if (0) /* now check properties */ weight = IDWriteFont_GetWeight(font); +todo_wine ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight); style = IDWriteFont_GetStyle(font); -todo_wine ok(style == DWRITE_FONT_STYLE_ITALIC, "got %d\n", style); ret = IDWriteFont_IsSymbolFont(font); @@ -76,6 +93,61 @@ todo_wine IDWriteFont_Release(font); + /* weight values */ + for (i = 0; i < sizeof(weights)/(2*sizeof(LONG)); i++) + { + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfWeight = weights[i][0]; + lstrcpyW(logfont.lfFaceName, arialW); + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); + EXPECT_HR(hr, S_OK); + + weight = IDWriteFont_GetWeight(font); + todo_wine + ok(weight == weights[i][1], + "%d: got %d, expected %d\n", i, weight, weights[i][1]); + IDWriteFont_Release(font); + } + + /* weight not from enum */ + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfWeight = 550; + lstrcpyW(logfont.lfFaceName, arialW); + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); + EXPECT_HR(hr, S_OK); + + weight = IDWriteFont_GetWeight(font); +todo_wine + ok(weight == DWRITE_FONT_WEIGHT_NORMAL || broken(weight == DWRITE_FONT_WEIGHT_BOLD) /* win7 w/o SP */, + "got %d\n", weight); + IDWriteFont_Release(font); + + /* empty or nonexistent face name */ + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfWeight = FW_NORMAL; + lstrcpyW(logfont.lfFaceName, blahW); + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); +todo_wine + EXPECT_HR(hr, DWRITE_E_NOFONT); + + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfWeight = FW_NORMAL; + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); +todo_wine + EXPECT_HR(hr, DWRITE_E_NOFONT); + IDWriteGdiInterop_Release(interop); } diff --git a/include/dwrite.idl b/include/dwrite.idl index aff529a..60a2bae 100644 --- a/include/dwrite.idl +++ b/include/dwrite.idl @@ -1394,3 +1394,17 @@ interface IDWriteFactory : IUnknown } cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);") + +/* error codes */ +cpp_quote("#define FACILITY_DWRITE 0x898") +cpp_quote("#define DWRITE_ERR_BASE 0x5000") +cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))") +cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)") + +cpp_quote("#define DWRITE_E_FILEFORMAT MAKE_DWRITE_HR_ERR(0x0)") +cpp_quote("#define DWRITE_E_UNEXPECTED MAKE_DWRITE_HR_ERR(0x1)") +cpp_quote("#define DWRITE_E_NOFONT MAKE_DWRITE_HR_ERR(0x2)") +cpp_quote("#define DWRITE_E_FILENOTFOUND MAKE_DWRITE_HR_ERR(0x3)") +cpp_quote("#define DWRITE_E_FILEACCESS MAKE_DWRITE_HR_ERR(0x4)") +cpp_quote("#define DWRITE_E_FONTCOLLECTIONOBSOLETE MAKE_DWRITE_HR_ERR(0x5)") +cpp_quote("#define DWRITE_E_ALREADYREGISTERED MAKE_DWRITE_HR_ERR(0x6)")
1
0
0
0
Nikolay Sivov : dwrite: Added IDWriteFont stub.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 56d71b04b7c3f40f152acb43e68f69141d5a16d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56d71b04b7c3f40f152acb43e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 13 07:44:19 2012 +0400 dwrite: Added IDWriteFont stub. --- dlls/dwrite/Makefile.in | 1 + dlls/dwrite/dwrite_private.h | 11 +++ dlls/dwrite/font.c | 184 ++++++++++++++++++++++++++++++++++++++++++ dlls/dwrite/gdiinterop.c | 3 +- dlls/dwrite/tests/font.c | 5 +- 5 files changed, 199 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/Makefile.in b/dlls/dwrite/Makefile.in index 03220d1..f4ee7ae 100644 --- a/dlls/dwrite/Makefile.in +++ b/dlls/dwrite/Makefile.in @@ -2,6 +2,7 @@ MODULE = dwrite.dll IMPORTLIB = dwrite C_SRCS = \ + font.c \ gdiinterop.c \ main.c diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 59ca09e..c52b93a 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -16,4 +16,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +static inline void *heap_alloc(size_t len) +{ + return HeapAlloc(GetProcessHeap(), 0, len); +} + +static inline BOOL heap_free(void *mem) +{ + return HeapFree(GetProcessHeap(), 0, mem); +} + extern HRESULT create_gdiinterop(IDWriteGdiInterop**) DECLSPEC_HIDDEN; +extern HRESULT create_font(IDWriteFont**) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c new file mode 100644 index 0000000..29dd63c --- /dev/null +++ b/dlls/dwrite/font.c @@ -0,0 +1,184 @@ +/* + * Font and collections + * + * Copyright 2012 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "dwrite.h" +#include "dwrite_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dwrite); + +struct dwrite_font { + IDWriteFont IDWriteFont_iface; + LONG ref; +}; + +static inline struct dwrite_font *impl_from_IDWriteFont(IDWriteFont *iface) +{ + return CONTAINING_RECORD(iface, struct dwrite_font, IDWriteFont_iface); +} + +static HRESULT WINAPI dwritefont_QueryInterface(IDWriteFont *iface, REFIID riid, void **obj) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); + + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDWriteFont)) + { + *obj = iface; + IDWriteFont_AddRef(iface); + return S_OK; + } + + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI dwritefont_AddRef(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p)->(%d)\n", This, ref); + return ref; +} + +static ULONG WINAPI dwritefont_Release(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(%d)\n", This, ref); + + if (!ref) + heap_free(This); + + return S_OK; +} + +static HRESULT WINAPI dwritefont_GetFontFamily(IDWriteFont *iface, IDWriteFontFamily **family) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(%p): stub\n", This, family); + return E_NOTIMPL; +} + +static DWRITE_FONT_WEIGHT WINAPI dwritefont_GetWeight(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p): stub\n", This); + return DWRITE_FONT_WEIGHT_NORMAL; +} + +static DWRITE_FONT_STRETCH WINAPI dwritefont_GetStretch(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p): stub\n", This); + return DWRITE_FONT_STRETCH_UNDEFINED; +} + +static DWRITE_FONT_STYLE WINAPI dwritefont_GetStyle(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p): stub\n", This); + return DWRITE_FONT_STYLE_NORMAL; +} + +static BOOL WINAPI dwritefont_IsSymbolFont(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p): stub\n", This); + return FALSE; +} + +static HRESULT WINAPI dwritefont_GetFaceNames(IDWriteFont *iface, IDWriteLocalizedStrings **names) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(%p): stub\n", This, names); + return E_NOTIMPL; +} + +static HRESULT WINAPI dwritefont_GetInformationalStrings(IDWriteFont *iface, + DWRITE_INFORMATIONAL_STRING_ID stringid, IDWriteLocalizedStrings **strings, BOOL *exists) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(%d %p %p): stub\n", This, stringid, strings, exists); + return E_NOTIMPL; +} + +static DWRITE_FONT_SIMULATIONS WINAPI dwritefont_GetSimulations(IDWriteFont *iface) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p): stub\n", This); + return DWRITE_FONT_SIMULATIONS_NONE; +} + +static void WINAPI dwritefont_GetMetrics(IDWriteFont *iface, DWRITE_FONT_METRICS *metrics) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(%p): stub\n", This, metrics); +} + +static HRESULT WINAPI dwritefont_HasCharacter(IDWriteFont *iface, UINT32 value, BOOL *exists) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(0x%08x %p): stub\n", This, value, exists); + return E_NOTIMPL; +} + +static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont *iface, IDWriteFontFace **face) +{ + struct dwrite_font *This = impl_from_IDWriteFont(iface); + FIXME("(%p)->(%p): stub\n", This, face); + return E_NOTIMPL; +} + +static const IDWriteFontVtbl dwritefontvtbl = { + dwritefont_QueryInterface, + dwritefont_AddRef, + dwritefont_Release, + dwritefont_GetFontFamily, + dwritefont_GetWeight, + dwritefont_GetStretch, + dwritefont_GetStyle, + dwritefont_IsSymbolFont, + dwritefont_GetFaceNames, + dwritefont_GetInformationalStrings, + dwritefont_GetSimulations, + dwritefont_GetMetrics, + dwritefont_HasCharacter, + dwritefont_CreateFontFace +}; + +HRESULT create_font(IDWriteFont **font) +{ + struct dwrite_font *This; + + This = heap_alloc(sizeof(struct dwrite_font)); + if (!This) return E_OUTOFMEMORY; + + This->IDWriteFont_iface.lpVtbl = &dwritefontvtbl; + This->ref = 1; + *font = &This->IDWriteFont_iface; + + return S_OK; +} diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 8215185..d374724 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -23,6 +23,7 @@ #include "windef.h" #include "winbase.h" #include "dwrite.h" +#include "dwrite_private.h" #include "wine/debug.h" @@ -60,7 +61,7 @@ static HRESULT WINAPI gdiinterop_CreateFontFromLOGFONT(IDWriteGdiInterop *iface, if (!logfont) return E_INVALIDARG; - return E_NOTIMPL; + return create_font(font); } static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface, diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index fa345e3..520fc1b 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -61,23 +61,20 @@ if (0) lstrcpyW(logfont.lfFaceName, arialW); hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); -todo_wine EXPECT_HR(hr, S_OK); -if (hr == S_OK) -{ /* now check properties */ weight = IDWriteFont_GetWeight(font); ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight); style = IDWriteFont_GetStyle(font); +todo_wine ok(style == DWRITE_FONT_STYLE_ITALIC, "got %d\n", style); ret = IDWriteFont_IsSymbolFont(font); ok(!ret, "got %d\n", ret); IDWriteFont_Release(font); -} IDWriteGdiInterop_Release(interop); }
1
0
0
0
Eric Pouech : msacm32: Convert acmFormatChoose internals to Unicode, implement acmFormatChoose[AW] on top of it.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 22789aa30ef94fed0f74f8623e1088716ec3ce14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22789aa30ef94fed0f74f8623…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sun Aug 12 10:03:41 2012 +0200 msacm32: Convert acmFormatChoose internals to Unicode, implement acmFormatChoose[AW] on top of it. --- dlls/msacm32/format.c | 181 ++++++++++++++++++++++++++++++++++--------------- 1 files changed, 125 insertions(+), 56 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=22789aa30ef94fed0f74f…
1
0
0
0
Eric Pouech : msacm32: In format chosse dialog, get rid of static variables , and store information as a property of dialog.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 03ab4bea9c72972a9e54eff76e3a6cadf43ca6a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03ab4bea9c72972a9e54eff76…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sun Aug 12 10:03:35 2012 +0200 msacm32: In format chosse dialog, get rid of static variables, and store information as a property of dialog. --- dlls/msacm32/format.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c index 9866139..f117994 100644 --- a/dlls/msacm32/format.c +++ b/dlls/msacm32/format.c @@ -39,8 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm); -static PACMFORMATCHOOSEA afc; - struct MSACM_FillFormatData { HWND hWnd; #define WINE_ACMFF_TAG 0 @@ -195,20 +193,24 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc) return affd.ret; } +static const char* fmt_prop = "acmprop"; + static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM lParam) { + PACMFORMATCHOOSEA afc = (PACMFORMATCHOOSEA)GetPropA(hWnd, fmt_prop); - TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam ); + TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam); switch (msg) { case WM_INITDIALOG: afc = (PACMFORMATCHOOSEA)lParam; + SetPropA(hWnd, fmt_prop, (HANDLE)afc); MSACM_FillFormatTags(hWnd); MSACM_FillFormat(hWnd); if ((afc->fdwStyle & ~(ACMFORMATCHOOSE_STYLEF_CONTEXTHELP| ACMFORMATCHOOSE_STYLEF_SHOWHELP)) != 0) - FIXME("Unsupported style %08x\n", ((PACMFORMATCHOOSEA)lParam)->fdwStyle); + FIXME("Unsupported style %08x\n", afc->fdwStyle); if (!(afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP)) ShowWindow(GetDlgItem(hWnd, IDD_ACMFORMATCHOOSE_BTN_HELP), SW_HIDE); return TRUE;
1
0
0
0
André Hentschel : winedbg: Add Coprocessor move operators to Thumb2 disassembler.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: ca3afdc156852d12d87948a41a8edbc96dc15e9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca3afdc156852d12d87948a41…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Aug 9 23:20:03 2012 +0200 winedbg: Add Coprocessor move operators to Thumb2 disassembler. --- programs/winedbg/be_arm.c | 33 ++++++++++++++++++++++++++------- 1 files changed, 26 insertions(+), 7 deletions(-) diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c index 1362ef1..8e1b5b1 100644 --- a/programs/winedbg/be_arm.c +++ b/programs/winedbg/be_arm.c @@ -645,7 +645,7 @@ static UINT thumb2_disasm_misc(UINT inst, ADDRESS64 *addr) if (op1 == 3 && op2 == 0) { - dbg_printf("\n\tclz\t%s, %s\t", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 0)]); + dbg_printf("\n\tclz\t%s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 0)]); return 0; } @@ -666,7 +666,7 @@ static UINT thumb2_disasm_misc(UINT inst, ADDRESS64 *addr) dbg_printf("\n\trevsh\t"); break; } - dbg_printf("%s, %s\t", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 0)]); + dbg_printf("%s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 0)]); return 0; } @@ -683,7 +683,7 @@ static UINT thumb2_disasm_mul(UINT inst, ADDRESS64 *addr) if (op2 == 0 && get_nibble(inst, 3) != 0xf) { - dbg_printf("\n\tmla\t%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + dbg_printf("\n\tmla\t%s, %s, %s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)], tbl_regs[get_nibble(inst, 3)]); @@ -692,7 +692,7 @@ static UINT thumb2_disasm_mul(UINT inst, ADDRESS64 *addr) if (op2 == 0 && get_nibble(inst, 3) == 0xf) { - dbg_printf("\n\tmul\t%s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + dbg_printf("\n\tmul\t%s, %s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)]); return 0; @@ -700,7 +700,7 @@ static UINT thumb2_disasm_mul(UINT inst, ADDRESS64 *addr) if (op2 == 1) { - dbg_printf("\n\tmls\t%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + dbg_printf("\n\tmls\t%s, %s, %s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)], tbl_regs[get_nibble(inst, 3)]); @@ -734,7 +734,7 @@ static UINT thumb2_disasm_longmuldiv(UINT inst, ADDRESS64 *addr) default: return inst; } - dbg_printf("%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 3)], tbl_regs[get_nibble(inst, 2)], + dbg_printf("%s, %s, %s, %s", tbl_regs[get_nibble(inst, 3)], tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)]); return 0; } @@ -752,7 +752,7 @@ static UINT thumb2_disasm_longmuldiv(UINT inst, ADDRESS64 *addr) default: return inst; } - dbg_printf("%s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], + dbg_printf("%s, %s, %s", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)]); return 0; } @@ -760,6 +760,23 @@ static UINT thumb2_disasm_longmuldiv(UINT inst, ADDRESS64 *addr) return inst; } +static UINT thumb2_disasm_coprocmov1(UINT inst, ADDRESS64 *addr) +{ + WORD opc1 = (inst >> 21) & 0x07; + WORD opc2 = (inst >> 5) & 0x07; + + if (opc2) + dbg_printf("\n\t%s%s\tp%u, #%u, %s, cr%u, cr%u, #%u", (inst & 0x00100000)?"mrc":"mcr", + (inst & 0x10000000)?"2":"", get_nibble(inst, 2), opc1, + tbl_regs[get_nibble(inst, 3)], get_nibble(inst, 4), get_nibble(inst, 0), opc2); + else + dbg_printf("\n\t%s%s\tp%u, #%u, %s, cr%u, cr%u", (inst & 0x00100000)?"mrc":"mcr", + (inst & 0x10000000)?"2":"", get_nibble(inst, 2), opc1, + tbl_regs[get_nibble(inst, 3)], get_nibble(inst, 4), get_nibble(inst, 0)); + + return 0; +} + struct inst_arm { UINT mask; @@ -825,6 +842,8 @@ static const struct inst_arm tbl_thumb32[] = { { 0xff8000c0, 0xfb000000, thumb2_disasm_mul }, { 0xff8000f0, 0xfb800000, thumb2_disasm_longmuldiv }, { 0xff8000f0, 0xfb8000f0, thumb2_disasm_longmuldiv }, + { 0xef100010, 0xee100010, thumb2_disasm_coprocmov1 }, + { 0xef100010, 0xee000010, thumb2_disasm_coprocmov1 }, { 0x00000000, 0x00000000, NULL } };
1
0
0
0
Detlef Riekenberg : mpr/tests: Handle result from the AppV virtual drive.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: fc4b2f6ceca61ca7738b81f6e843509d79977314 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc4b2f6ceca61ca7738b81f6e…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Aug 3 19:16:35 2012 +0200 mpr/tests: Handle result from the AppV virtual drive. --- dlls/mpr/tests/mpr.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c index d54d80d..8ccce78 100644 --- a/dlls/mpr/tests/mpr.c +++ b/dlls/mpr/tests/mpr.c @@ -42,7 +42,11 @@ static void test_WNetGetUniversalName(void) if(drive_type == DRIVE_REMOTE) ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret); else - ok(ret == ERROR_NOT_CONNECTED, "WNetGetUniversalNameA gave wrong error: %08x\n", ret); + /* WN_NO_NET_OR_BAD_PATH (DRIVE_FIXED) returned from the virtual drive (usual Q:) + created by the microsoft application virtualization client */ + ok((ret == WN_NOT_CONNECTED) || (ret == WN_NO_NET_OR_BAD_PATH), + "WNetGetUniversalNameA(%s, ...) returned %u (drive_type: %u)\n", + driveA, ret, drive_type); ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size); @@ -53,7 +57,9 @@ static void test_WNetGetUniversalName(void) if(drive_type == DRIVE_REMOTE) ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret); else - ok(ret == ERROR_NOT_CONNECTED, "WNetGetUniversalNameW gave wrong error: %08x\n", ret); + ok((ret == WN_NOT_CONNECTED) || (ret == WN_NO_NET_OR_BAD_PATH), + "WNetGetUniversalNameW(%s, ...) returned %u (drive_type: %u)\n", + wine_dbgstr_w(driveW), ret, drive_type); ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size); }
1
0
0
0
Detlef Riekenberg : kernel32/tests: Fix test failures on win7.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 9aacf4ce6fe240dcfb41f09cd959af2c0e52f66d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9aacf4ce6fe240dcfb41f09cd…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Aug 3 05:12:59 2012 +0200 kernel32/tests: Fix test failures on win7. --- dlls/kernel32/tests/debugger.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 2094190..22f7190 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -287,6 +287,13 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) } ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); + if (ret == ERROR_ACCESS_DENIED) + { + skip_crash_and_debug = TRUE; + skip("No write access to change the debugger\n"); + return; + } + ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); get_file_name(dbglog);
1
0
0
0
Michael Stefaniuc : ole32: Remove superfluous NULL pointer check before free (Smatch).
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 55d811351ab1c7212b513d21995867db61fc65d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55d811351ab1c7212b513d219…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Aug 1 01:14:56 2012 +0200 ole32: Remove superfluous NULL pointer check before free (Smatch). --- dlls/ole32/ole2.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 74fb43e..b857a3c 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2953,8 +2953,7 @@ HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */ CoTaskMemFree(pvar->u.blob.pBlobData); break; case VT_BSTR: - if (pvar->u.bstrVal) - PropSysFreeString(pvar->u.bstrVal); + PropSysFreeString(pvar->u.bstrVal); break; case VT_CF: if (pvar->u.pclipdata)
1
0
0
0
Michael Stefaniuc : gdiplus: Remove unreachable break after return (Smatch) .
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 60bef1409401ea11a71c8b4bdb4b92688ae516ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60bef1409401ea11a71c8b4bd…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Aug 1 01:14:15 2012 +0200 gdiplus: Remove unreachable break after return (Smatch). --- dlls/gdiplus/gdiplus.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 2599c58..ed2dcae 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -379,7 +379,6 @@ REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi) return pixels * point_per_inch / dpi; case UnitInch: return pixels / dpi; - break; case UnitDocument: return pixels * 300.0 / dpi; case UnitMillimeter:
1
0
0
0
Aric Stewart : usp10: Use cached values in GPOS functions.
by Alexandre Julliard
13 Aug '12
13 Aug '12
Module: wine Branch: master Commit: 7819ce61b51f53e0819ee2f335bfee5ff82a5562 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7819ce61b51f53e0819ee2f33…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jul 31 08:50:06 2012 -0500 usp10: Use cached values in GPOS functions. --- dlls/usp10/shape.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 1ef6039..3d6b303 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); } } }
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
55
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Results per page:
10
25
50
100
200