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
March 2015
----- 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
775 discussions
Start a n
N
ew thread
Jactry Zeng : riched20: Add tests for IRichEditOle::QueryInterface.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 879261dd8b90cb258604dc810623095efece94f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=879261dd8b90cb258604dc810…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Mon Mar 16 17:27:07 2015 +0800 riched20: Add tests for IRichEditOle::QueryInterface. --- dlls/riched20/tests/richole.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index eed335c..ee31a16 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -156,6 +156,14 @@ static void test_Interfaces(void) ok(punk != NULL, "ITextSelection_QueryInterface\n"); IUnknown_Release(punk); + punk = NULL; + hres = IRichEditOle_QueryInterface(reOle, &IID_IOleClientSite, (void **) &punk); + ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n"); + + punk = NULL; + hres = IRichEditOle_QueryInterface(reOle, &IID_IOleWindow, (void **) &punk); + ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n"); + ITextDocument_Release(txtDoc); IRichEditOle_Release(reOle); refcount = IRichEditOle_Release(reOle);
1
0
0
0
Alexandre Julliard : winhttp: Remove const to fix a warning with the Microsoft headers.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 0d7613fc98a8b7b8edbff8dbaae09e8b205d1c4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d7613fc98a8b7b8edbff8dba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 17 00:19:19 2015 +0900 winhttp: Remove const to fix a warning with the Microsoft headers. --- dlls/winhttp/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index a12d73a..4efe2d8 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -983,10 +983,10 @@ static BOOL secure_proxy_connect( request_t *request ) #define INET6_ADDRSTRLEN 46 #endif -static WCHAR *addr_to_str( const struct sockaddr *addr ) +static WCHAR *addr_to_str( struct sockaddr *addr ) { char buf[INET6_ADDRSTRLEN]; - const void *src; + void *src; switch (addr->sa_family) {
1
0
0
0
Alexandre Julliard : msvcp: Add a macro to access the locale field of I/ O streams.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 90aad327ae6d1c8dab95b6a6a8ae5b0c636607a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90aad327ae6d1c8dab95b6a6a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 16 17:25:08 2015 +0900 msvcp: Add a macro to access the locale field of I/O streams. --- dlls/msvcp60/ios.c | 156 ++++++++++++++++----------------- dlls/msvcp60/locale.c | 90 +++++++++---------- dlls/msvcp60/msvcp.h | 2 + dlls/msvcp90/ios.c | 232 ++++++++++++++++++++++++++----------------------- dlls/msvcp90/locale.c | 88 +++++++++---------- dlls/msvcp90/msvcp90.h | 6 ++ 6 files changed, 296 insertions(+), 278 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=90aad327ae6d1c8dab95b…
1
0
0
0
Nikolay Sivov : scrrun: Implement Path() property for IFile.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 574350d838da872d6e9d4cdbcb03128ddb86db59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=574350d838da872d6e9d4cdbc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 13 23:31:04 2015 +0300 scrrun: Implement Path() property for IFile. --- dlls/scrrun/filesystem.c | 15 ++++++++++++--- dlls/scrrun/tests/filesystem.c | 10 +++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index 74e5432..5e0fc28 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -2546,11 +2546,20 @@ static HRESULT WINAPI file_Invoke(IFile *iface, DISPID dispIdMember, REFIID riid return hr; } -static HRESULT WINAPI file_get_Path(IFile *iface, BSTR *pbstrPath) +static HRESULT WINAPI file_get_Path(IFile *iface, BSTR *path) { struct file *This = impl_from_IFile(iface); - FIXME("(%p)->(%p)\n", This, pbstrPath); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, path); + + if (!path) + return E_POINTER; + + *path = SysAllocString(This->path); + if (!*path) + return E_OUTOFMEMORY; + + return S_OK; } static HRESULT WINAPI file_get_Name(IFile *iface, BSTR *name) diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index 210b90c..987ecba 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -538,7 +538,7 @@ static void test_GetAbsolutePathName(void) static void test_GetFile(void) { static const WCHAR slW[] = {'\\',0}; - BSTR path; + BSTR path, str; WCHAR pathW[MAX_PATH]; FileAttribute fa; VARIANT size; @@ -572,6 +572,14 @@ static void test_GetFile(void) hr = IFileSystem3_GetFile(fs3, path, &file); ok(hr == S_OK, "GetFile returned %x, expected S_OK\n", hr); + hr = IFile_get_Path(file, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IFile_get_Path(file, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, pathW), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + hr = IFile_get_Attributes(file, &fa); gfa = GetFileAttributesW(pathW) & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE |
1
0
0
0
Nikolay Sivov : dwrite: Implement GetKerningPairAdjustments().
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 7e480d3c6d475617e66a21711daffd02d8fef0eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e480d3c6d475617e66a21711…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 13 23:19:18 2015 +0300 dwrite: Implement GetKerningPairAdjustments(). --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 21 +++++++++++++++++--- dlls/dwrite/freetype.c | 25 ++++++++++++++++++++++++ dlls/dwrite/tests/font.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 92f0427..aa73b4b 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -163,6 +163,7 @@ extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT, extern UINT16 freetype_get_glyphcount(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern UINT16 freetype_get_glyphindex(IDWriteFontFace2*,UINT32) DECLSPEC_HIDDEN; extern BOOL freetype_has_kerning_pairs(IDWriteFontFace2*) DECLSPEC_HIDDEN; +extern INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace2*,UINT16,UINT16) DECLSPEC_HIDDEN; /* Glyph shaping */ enum SCRIPT_JUSTIFY diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 66dbc68..59eda80 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -658,12 +658,27 @@ static HRESULT WINAPI dwritefontface1_GetGdiCompatibleGlyphAdvances(IDWriteFontF return E_NOTIMPL; } -static HRESULT WINAPI dwritefontface1_GetKerningPairAdjustments(IDWriteFontFace2 *iface, UINT32 glyph_count, +static HRESULT WINAPI dwritefontface1_GetKerningPairAdjustments(IDWriteFontFace2 *iface, UINT32 count, const UINT16 *indices, INT32 *adjustments) { struct dwrite_fontface *This = impl_from_IDWriteFontFace2(iface); - FIXME("(%p)->(%u %p %p): stub\n", This, glyph_count, indices, adjustments); - return E_NOTIMPL; + UINT32 i; + + TRACE("(%p)->(%u %p %p)\n", This, count, indices, adjustments); + + if (!(indices || adjustments) || !count) + return E_INVALIDARG; + + if (!indices || count == 1) { + memset(adjustments, 0, count*sizeof(INT32)); + return E_INVALIDARG; + } + + for (i = 0; i < count-1; i++) + adjustments[i] = freetype_get_kerning_pair_adjustment(iface, indices[i], indices[i+1]); + adjustments[count-1] = 0; + + return S_OK; } static BOOL WINAPI dwritefontface1_HasKerningPairs(IDWriteFontFace2 *iface) diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 325f156..a18c542 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -63,6 +63,7 @@ typedef struct #define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL MAKE_FUNCPTR(FT_Done_FreeType); +MAKE_FUNCPTR(FT_Get_Kerning); MAKE_FUNCPTR(FT_Init_FreeType); MAKE_FUNCPTR(FT_Library_Version); MAKE_FUNCPTR(FT_Load_Glyph); @@ -135,6 +136,7 @@ BOOL init_freetype(void) #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(ft_handle, #f, NULL, 0)) == NULL){WARN("Can't find symbol %s\n", #f); goto sym_not_found;} LOAD_FUNCPTR(FT_Done_FreeType) + LOAD_FUNCPTR(FT_Get_Kerning) LOAD_FUNCPTR(FT_Init_FreeType) LOAD_FUNCPTR(FT_Library_Version) LOAD_FUNCPTR(FT_Load_Glyph) @@ -420,6 +422,24 @@ BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface) return has_kerning_pairs; } +INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace2 *fontface, UINT16 left, UINT16 right) +{ + INT32 adjustment = 0; + FT_Face face; + + EnterCriticalSection(&freetype_cs); + if (pFTC_Manager_LookupFace(cache_manager, fontface, &face) == 0) { + FT_Vector kern; + if (FT_HAS_KERNING(face)) { + pFT_Get_Kerning(face, left, right, FT_KERNING_UNSCALED, &kern); + adjustment = kern.x; + } + } + LeaveCriticalSection(&freetype_cs); + + return adjustment; +} + #else /* HAVE_FREETYPE */ BOOL init_freetype(void) @@ -466,4 +486,9 @@ BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface) return FALSE; } +INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace2 *fontface, UINT16 left, UINT16 right) +{ + return 0; +} + #endif /* HAVE_FREETYPE */ diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index a9a6802..9762d49 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -3136,6 +3136,51 @@ static void test_GetGlyphCount(void) DELETE_FONTFILE(path); } +static void test_GetKerningPairAdjustments(void) +{ + IDWriteFontFace1 *fontface1; + IDWriteFontFace *fontface; + IDWriteFactory *factory; + IDWriteFontFile *file; + WCHAR *path; + HRESULT hr; + + path = create_testfontfile(test_fontfile); + factory = create_factory(); + + hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); + ok(hr == S_OK, "got 0x%08x\n", hr); + IDWriteFontFile_Release(file); + + hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); + if (hr == S_OK) { + INT32 adjustments[1]; + + hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 0, NULL, NULL); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + + if (0) /* crashes on native */ + hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 1, NULL, NULL); + + adjustments[0] = 1; + hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 1, NULL, adjustments); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(adjustments[0] == 0, "got %d\n", adjustments[0]); + + IDWriteFontFace1_Release(fontface1); + } + else + win_skip("GetKerningPairAdjustments() is not supported.\n"); + + IDWriteFontFace_Release(fontface); + IDWriteFactory_Release(factory); + DELETE_FONTFILE(path); +} + + START_TEST(font) { IDWriteFactory *factory; @@ -3176,6 +3221,7 @@ START_TEST(font) test_GetEudcFontCollection(); test_GetCaretMetrics(); test_GetGlyphCount(); + test_GetKerningPairAdjustments(); IDWriteFactory_Release(factory); }
1
0
0
0
Nikolay Sivov : dwrite: Implement HasKerningPairs().
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 23c2ef2fcde3aef1ecc3021a3440c47db0007d84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23c2ef2fcde3aef1ecc3021a3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 13 22:42:30 2015 +0300 dwrite: Implement HasKerningPairs(). --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 4 ++-- dlls/dwrite/freetype.c | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 9481c74..92f0427 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -162,6 +162,7 @@ extern BOOL freetype_is_monospaced(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT,struct glyph_outline**) DECLSPEC_HIDDEN; extern UINT16 freetype_get_glyphcount(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern UINT16 freetype_get_glyphindex(IDWriteFontFace2*,UINT32) DECLSPEC_HIDDEN; +extern BOOL freetype_has_kerning_pairs(IDWriteFontFace2*) DECLSPEC_HIDDEN; /* Glyph shaping */ enum SCRIPT_JUSTIFY diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index c4b8818..66dbc68 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -669,8 +669,8 @@ static HRESULT WINAPI dwritefontface1_GetKerningPairAdjustments(IDWriteFontFace2 static BOOL WINAPI dwritefontface1_HasKerningPairs(IDWriteFontFace2 *iface) { struct dwrite_fontface *This = impl_from_IDWriteFontFace2(iface); - FIXME("(%p): stub\n", This); - return FALSE; + TRACE("(%p)\n", This); + return freetype_has_kerning_pairs(iface); } static HRESULT WINAPI dwritefontface1_GetRecommendedRenderingMode(IDWriteFontFace2 *iface, diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 84c9cad..325f156 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -407,6 +407,19 @@ UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint) return glyph; } +BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface) +{ + BOOL has_kerning_pairs = FALSE; + FT_Face face; + + EnterCriticalSection(&freetype_cs); + if (pFTC_Manager_LookupFace(cache_manager, fontface, &face) == 0) + has_kerning_pairs = FT_HAS_KERNING(face); + LeaveCriticalSection(&freetype_cs); + + return has_kerning_pairs; +} + #else /* HAVE_FREETYPE */ BOOL init_freetype(void) @@ -448,4 +461,9 @@ UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint) return 0; } +BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface) +{ + return FALSE; +} + #endif /* HAVE_FREETYPE */
1
0
0
0
Nikolay Sivov : dwrite: Fix invalid parameter handling in GetGlyphIndices( ).
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 2933e8666f77cf92d4458514d345abb9851a95f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2933e8666f77cf92d4458514d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 13 21:57:50 2015 +0300 dwrite: Fix invalid parameter handling in GetGlyphIndices(). --- dlls/dwrite/font.c | 8 ++++++++ dlls/dwrite/tests/font.c | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 32ed712..c4b8818 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -392,6 +392,14 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace2 *iface, UI TRACE("(%p)->(%p %u %p)\n", This, codepoints, count, glyph_indices); + if (!glyph_indices) + return E_INVALIDARG; + + if (!codepoints) { + memset(glyph_indices, 0, count*sizeof(UINT16)); + return E_INVALIDARG; + } + for (i = 0; i < count; i++) glyph_indices[i] = freetype_get_glyphindex(iface, codepoints[i]); diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index d773c66..a9a6802 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1779,7 +1779,7 @@ static void test_CreateCustomFontFileReference(void) HRESULT hr; HRSRC fontrsrc; UINT32 codePoints[1] = {0xa8}; - UINT16 indices[1]; + UINT16 indices[2]; factory = create_factory(); factory2 = create_factory(); @@ -1876,6 +1876,27 @@ if (face2) IDWriteFontFace_Release(face2); IDWriteFontFile_Release(file2); + hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 0, NULL); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + + hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 0, NULL); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + + hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 0, indices); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 0, indices); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + + indices[0] = indices[1] = 11; + hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, indices); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(indices[0] == 0, "got index %i\n", indices[0]); + ok(indices[1] == 11, "got index %i\n", indices[1]); + +if (0) /* crashes on native */ + hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, NULL); + hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 1, indices); ok(hr == S_OK, "got 0x%08x\n", hr); ok(indices[0] == 6, "got index %i\n", indices[0]);
1
0
0
0
Nikolay Sivov : dwrite: Actually return NULL names pointer and error code when failed to read them.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 5eccb1322d09362c5431911bcdc5a4d218ee98fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5eccb1322d09362c5431911bc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 13 21:24:49 2015 +0300 dwrite: Actually return NULL names pointer and error code when failed to read them. --- dlls/dwrite/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 12ce3ca..32ed712 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -773,7 +773,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index { const void *name_table = NULL; void *name_context; - HRESULT hr = S_OK; + HRESULT hr = E_FAIL; opentype_get_font_table(stream, facetype, index, MS_NAME_TAG, &name_table, &name_context, NULL, NULL); if (name_table) { @@ -781,7 +781,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index IDWriteFontFileStream_ReleaseFileFragment(stream, name_context); } else - names = NULL; + *names = NULL; return hr; }
1
0
0
0
Bruno Jesus : ws2_32/tests: Check the OOB mark in the right place.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: a19febc1a769a298d0c68b32a70921c5467ba7a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a19febc1a769a298d0c68b32a…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Sun Mar 15 16:13:18 2015 -0300 ws2_32/tests: Check the OOB mark in the right place. --- dlls/ws2_32/tests/sock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c596e85..3a60ddb 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -612,15 +612,15 @@ static VOID WINAPI oob_server ( server_params *par ) pos = test_buffer ( mem->sock[0].buf, gen->chunk_size, gen->n_chunks ); ok ( pos == -1, "oob_server (%x): test pattern error: %d\n", id, pos); + /* check atmark state */ + ioctlsocket ( mem->sock[0].s, SIOCATMARK, &atmark ); + ok ( atmark == 1, "oob_server (%x): unexpectedly at the OOB mark: %i\n", id, atmark ); + /* Echo data back */ n_sent = do_synchronous_send ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "oob_server (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); - /* check atmark state */ - ioctlsocket ( mem->sock[0].s, SIOCATMARK, &atmark ); - ok ( atmark == 1, "oob_server (%x): unexpectedly at the OOB mark: %i\n", id, atmark ); - /* Receive a part of the out-of-band data and check atmark state */ n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, 8, 0, par->buflen ); ok ( n_recvd == 8,
1
0
0
0
Bruno Jesus : ws2_32/tests: Improve some helper functions.
by Alexandre Julliard
16 Mar '15
16 Mar '15
Module: wine Branch: master Commit: 8042dbac55ef56ac47c9977a9ebe8199f76c3787 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8042dbac55ef56ac47c9977a9…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Sun Mar 15 16:13:12 2015 -0300 ws2_32/tests: Improve some helper functions. --- dlls/ws2_32/tests/sock.c | 49 ++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index ca8e1a5..c596e85 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -301,32 +301,41 @@ static void read_zero_bytes ( SOCKET s ) ok ( n <= 0, "garbage data received: %d bytes\n", n ); } -static int do_synchronous_send ( SOCKET s, char *buf, int buflen, int sendlen, int flags ) +static int do_synchronous_send ( SOCKET s, char *buf, int buflen, int flags, int sendlen ) { char* last = buf + buflen, *p; int n = 1; - for ( p = buf; n > 0 && p < last; p += n ) + for ( p = buf; n > 0 && p < last; ) + { n = send ( s, p, min ( sendlen, last - p ), flags ); + if (n > 0) p += n; + } wsa_ok ( n, 0 <=, "do_synchronous_send (%x): error %d\n" ); return p - buf; } -static int do_synchronous_recv ( SOCKET s, char *buf, int buflen, int recvlen ) +static int do_synchronous_recv ( SOCKET s, char *buf, int buflen, int flags, int recvlen ) { char* last = buf + buflen, *p; int n = 1; - for ( p = buf; n > 0 && p < last; p += n ) - n = recv ( s, p, min ( recvlen, last - p ), 0 ); + for ( p = buf; n > 0 && p < last; ) + { + n = recv ( s, p, min ( recvlen, last - p ), flags ); + if (n > 0) p += n; + } wsa_ok ( n, 0 <=, "do_synchronous_recv (%x): error %d:\n" ); return p - buf; } -static int do_synchronous_recvfrom ( SOCKET s, char *buf, int buflen,int flags,struct sockaddr *from, int *fromlen, int recvlen ) +static int do_synchronous_recvfrom ( SOCKET s, char *buf, int buflen, int flags, struct sockaddr *from, int *fromlen, int recvlen ) { char* last = buf + buflen, *p; int n = 1; - for ( p = buf; n > 0 && p < last; p += n ) - n = recvfrom ( s, p, min ( recvlen, last - p ), 0, from, fromlen ); + for ( p = buf; n > 0 && p < last; ) + { + n = recvfrom ( s, p, min ( recvlen, last - p ), flags, from, fromlen ); + if (n > 0) p += n; + } wsa_ok ( n, 0 <=, "do_synchronous_recv (%x): error %d:\n" ); return p - buf; } @@ -538,14 +547,14 @@ static VOID WINAPI simple_server ( server_params *par ) "simple_server (%x): strange peer address\n", id ); /* Receive data & check it */ - n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, par->buflen ); + n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ok ( n_recvd == n_expected, "simple_server (%x): received less data than expected: %d of %d\n", id, n_recvd, n_expected ); pos = test_buffer ( mem->sock[0].buf, gen->chunk_size, gen->n_chunks ); ok ( pos == -1, "simple_server (%x): test pattern error: %d\n", id, pos); /* Echo data back */ - n_sent = do_synchronous_send ( mem->sock[0].s, mem->sock[0].buf, n_expected, par->buflen, 0 ); + n_sent = do_synchronous_send ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "simple_server (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); @@ -597,14 +606,14 @@ static VOID WINAPI oob_server ( server_params *par ) ok ( atmark == 1, "oob_server (%x): unexpectedly at the OOB mark: %i\n", id, atmark ); /* Receive normal data */ - n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, par->buflen ); + n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ok ( n_recvd == n_expected, "oob_server (%x): received less data than expected: %d of %d\n", id, n_recvd, n_expected ); pos = test_buffer ( mem->sock[0].buf, gen->chunk_size, gen->n_chunks ); ok ( pos == -1, "oob_server (%x): test pattern error: %d\n", id, pos); /* Echo data back */ - n_sent = do_synchronous_send ( mem->sock[0].s, mem->sock[0].buf, n_expected, par->buflen, 0 ); + n_sent = do_synchronous_send ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "oob_server (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); @@ -613,7 +622,7 @@ static VOID WINAPI oob_server ( server_params *par ) ok ( atmark == 1, "oob_server (%x): unexpectedly at the OOB mark: %i\n", id, atmark ); /* Receive a part of the out-of-band data and check atmark state */ - n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, 8, par->buflen ); + n_recvd = do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, 8, 0, par->buflen ); ok ( n_recvd == 8, "oob_server (%x): received less data than expected: %d of %d\n", id, n_recvd, 8 ); n_expected -= 8; @@ -622,7 +631,7 @@ static VOID WINAPI oob_server ( server_params *par ) todo_wine ok ( atmark == 0, "oob_server (%x): not at the OOB mark: %i\n", id, atmark ); /* Receive the rest of the out-of-band data and check atmark state */ - do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, par->buflen ); + do_synchronous_recv ( mem->sock[0].s, mem->sock[0].buf, n_expected, 0, par->buflen ); ioctlsocket ( mem->sock[0].s, SIOCATMARK, &atmark ); todo_wine ok ( atmark == 0, "oob_server (%x): not at the OOB mark: %i\n", id, atmark ); @@ -795,7 +804,7 @@ static VOID WINAPI simple_client ( client_params *par ) trace ( "simple_client (%x) connected\n", id ); /* send data to server */ - n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, par->buflen, 0 ); + n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "simple_client (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); @@ -803,7 +812,7 @@ static VOID WINAPI simple_client ( client_params *par ) wsa_ok ( shutdown ( mem->s, SD_SEND ), 0 ==, "simple_client (%x): shutdown failed: %d\n" ); /* Receive data echoed back & check it */ - n_recvd = do_synchronous_recv ( mem->s, mem->recv_buf, n_expected, par->buflen ); + n_recvd = do_synchronous_recv ( mem->s, mem->recv_buf, n_expected, 0, par->buflen ); ok ( n_recvd == n_expected, "simple_client (%x): received less data than expected: %d of %d\n", id, n_recvd, n_expected ); @@ -845,19 +854,19 @@ static VOID WINAPI oob_client ( client_params *par ) trace ( "oob_client (%x) connected\n", id ); /* send data to server */ - n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, par->buflen, 0 ); + n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "oob_client (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); /* Receive data echoed back & check it */ - n_recvd = do_synchronous_recv ( mem->s, mem->recv_buf, n_expected, par->buflen ); + n_recvd = do_synchronous_recv ( mem->s, mem->recv_buf, n_expected, 0, par->buflen ); ok ( n_recvd == n_expected, "simple_client (%x): received less data than expected: %d of %d\n", id, n_recvd, n_expected ); pos = test_buffer ( mem->recv_buf, gen->chunk_size, gen->n_chunks ); ok ( pos == -1, "simple_client (%x): test pattern error: %d\n", id, pos); /* send out-of-band data to server */ - n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, par->buflen, MSG_OOB ); + n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, MSG_OOB, par->buflen ); ok ( n_sent == n_expected, "oob_client (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected ); @@ -900,7 +909,7 @@ static VOID WINAPI simple_mixed_client ( client_params *par ) trace ( "simple_client (%x) connected\n", id ); /* send data to server */ - n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, par->buflen, 0 ); + n_sent = do_synchronous_send ( mem->s, mem->send_buf, n_expected, 0, par->buflen ); ok ( n_sent == n_expected, "simple_client (%x): sent less data than expected: %d of %d\n", id, n_sent, n_expected );
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
78
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200