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 2017
----- 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
351 discussions
Start a n
N
ew thread
Hugh McMaster : reg: Introduce a partial state machine for importing Windows 3.1 registry data.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: 3e87a70e82b83ba0786a20e195cc8708e692b15b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e87a70e82b83ba0786a20e19…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Fri Aug 18 09:30:04 2017 +0000 reg: Introduce a partial state machine for importing Windows 3.1 registry data. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 12 ++ po/bg.po | 11 ++ po/ca.po | 12 ++ po/cs.po | 12 ++ po/da.po | 12 ++ po/de.po | 12 ++ po/el.po | 9 ++ po/en.po | 8 + po/en_US.po | 8 + po/eo.po | 12 ++ po/es.po | 12 ++ po/fa.po | 9 ++ po/fi.po | 12 ++ po/fr.po | 12 ++ po/he.po | 12 ++ po/hi.po | 8 + po/hr.po | 12 ++ po/hu.po | 12 ++ po/it.po | 12 ++ po/ja.po | 12 ++ po/ko.po | 12 ++ po/lt.po | 12 ++ po/ml.po | 8 + po/nb_NO.po | 12 ++ po/nl.po | 12 ++ po/or.po | 8 + po/pa.po | 8 + po/pl.po | 12 ++ po/pt_BR.po | 12 ++ po/pt_PT.po | 12 ++ po/rm.po | 9 ++ po/ro.po | 12 ++ po/ru.po | 12 ++ po/sk.po | 12 ++ po/sl.po | 12 ++ po/sr_RS(a)cyrillic.po | 11 ++ po/sr_RS(a)latin.po | 11 ++ po/sv.po | 12 ++ po/te.po | 8 + po/th.po | 10 ++ po/tr.po | 12 ++ po/uk.po | 12 ++ po/wa.po | 9 ++ po/wine.pot | 8 + po/zh_CN.po | 12 ++ po/zh_TW.po | 12 ++ programs/reg/import.c | 408 ++++++++++++++++++++++++++++++++++++++++++++++- programs/reg/reg.c | 12 +- programs/reg/reg.h | 10 ++ programs/reg/reg.rc | 2 + programs/reg/resource.h | 2 + programs/reg/tests/reg.c | 98 ++++++------ 52 files changed, 978 insertions(+), 57 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3e87a70e82b83ba0786a2…
1
0
0
0
Hugh McMaster : reg: Add initial support for the import operation.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: aa386af42a967ed49f435cb9a02a9200818cc73e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa386af42a967ed49f435cb9a…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Fri Aug 18 09:29:54 2017 +0000 reg: Add initial support for the import operation. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 6 +++++- po/bg.po | 6 +++++- po/ca.po | 17 ++++++++++++++++- po/cs.po | 6 +++++- po/da.po | 6 +++++- po/de.po | 17 ++++++++++++++++- po/el.po | 6 +++++- po/en.po | 8 ++++++-- po/en_US.po | 8 ++++++-- po/eo.po | 6 +++++- po/es.po | 6 +++++- po/fa.po | 6 +++++- po/fi.po | 17 ++++++++++++++++- po/fr.po | 17 ++++++++++++++++- po/he.po | 6 +++++- po/hi.po | 6 +++++- po/hr.po | 6 +++++- po/hu.po | 6 +++++- po/it.po | 6 +++++- po/ja.po | 17 ++++++++++++++++- po/ko.po | 6 +++++- po/lt.po | 17 ++++++++++++++++- po/ml.po | 6 +++++- po/nb_NO.po | 17 ++++++++++++++++- po/nl.po | 6 +++++- po/or.po | 6 +++++- po/pa.po | 6 +++++- po/pl.po | 17 ++++++++++++++++- po/pt_BR.po | 17 ++++++++++++++++- po/pt_PT.po | 6 +++++- po/rm.po | 6 +++++- po/ro.po | 6 +++++- po/ru.po | 17 ++++++++++++++++- po/sk.po | 6 +++++- po/sl.po | 6 +++++- po/sr_RS(a)cyrillic.po | 6 +++++- po/sr_RS(a)latin.po | 6 +++++- po/sv.po | 6 +++++- po/te.po | 6 +++++- po/th.po | 6 +++++- po/tr.po | 17 ++++++++++++++++- po/uk.po | 17 ++++++++++++++++- po/wa.po | 6 +++++- po/wine.pot | 6 +++++- po/zh_CN.po | 17 ++++++++++++++++- po/zh_TW.po | 6 +++++- programs/reg/Makefile.in | 4 +++- programs/reg/import.c | 30 ++++++++++++++++++++++++++++++ programs/reg/reg.c | 45 +++++++++++++++++++++++++++------------------ programs/reg/reg.h | 26 ++++++++++++++++++++++++++ programs/reg/reg.rc | 3 ++- programs/reg/resource.h | 1 + programs/reg/tests/reg.c | 2 +- 53 files changed, 465 insertions(+), 69 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=aa386af42a967ed49f435…
1
0
0
0
Hugh McMaster : reg: Rename reg.h to resource.h.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: f2fbbec27db92291fd4f6344a65a2d0c2d64a658 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2fbbec27db92291fd4f6344a…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Fri Aug 18 09:29:44 2017 +0000 reg: Rename reg.h to resource.h. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 2 +- programs/reg/reg.rc | 2 +- programs/reg/{reg.h => resource.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index cb3bd4e..595dcab 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -21,7 +21,7 @@ #include <stdlib.h> #include <wine/unicode.h> #include <wine/debug.h> -#include "reg.h" +#include "resource.h" #define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) diff --git a/programs/reg/reg.rc b/programs/reg/reg.rc index ae69cb7..2e0da68 100644 --- a/programs/reg/reg.rc +++ b/programs/reg/reg.rc @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "reg.h" +#include "resource.h" #pragma makedep po diff --git a/programs/reg/reg.h b/programs/reg/resource.h similarity index 100% rename from programs/reg/reg.h rename to programs/reg/resource.h
1
0
0
0
Hugh McMaster : reg: Compile with msvcrt.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: c6c95a026b5df7ba5f1bf57a1dda384daa9e7b09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6c95a026b5df7ba5f1bf57a1…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Fri Aug 18 09:29:35 2017 +0000 reg: Compile with msvcrt. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/Makefile.in | 2 +- programs/reg/reg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/reg/Makefile.in b/programs/reg/Makefile.in index c255171..7a70a33 100644 --- a/programs/reg/Makefile.in +++ b/programs/reg/Makefile.in @@ -1,5 +1,5 @@ MODULE = reg.exe -APPMODE = -mconsole -municode +APPMODE = -mconsole -municode -mno-cygwin IMPORTS = advapi32 DELAYIMPORTS = user32 diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 72f2b58..cb3bd4e 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -284,8 +284,8 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW { LPWSTR rest; unsigned long val; - val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10); - if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE) || val > ~0u) { + val = wcstoul(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10); + if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) { output_message(STRING_MISSING_INTEGER); break; }
1
0
0
0
Hugh McMaster : regedit: Return a valid pointer in the QUOTED_VALUE_NAME state if REGPROC_unescape_string () returns FALSE.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: 3f0ebaeebb524f87a0c154b1e6ffa6e9242b0b1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f0ebaeebb524f87a0c154b1e…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Fri Aug 18 09:14:14 2017 +0000 regedit: Return a valid pointer in the QUOTED_VALUE_NAME state if REGPROC_unescape_string() returns FALSE. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 3f055b6..58ca5ac 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -748,7 +748,7 @@ static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos) invalid: set_state(parser, LINE_START); - return p; + return val_name; } /* handler for parser DATA_START state */
1
0
0
0
Mingcong Bai : po: Update Simplified Chinese translation.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: 2c438c7ed8669d95e7dd2341fc341a8a50d70437 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c438c7ed8669d95e7dd2341f…
Author: Mingcong Bai <jeffbai(a)aosc.xyz> Date: Sat Aug 19 14:38:15 2017 +0800 po: Update Simplified Chinese translation. Signed-off-by: Mingcong Bai <jeffbai(a)aosc.xyz> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/zh_CN.po | 396 +++++++++++++++++++----------------------------------------- 1 file changed, 123 insertions(+), 273 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2c438c7ed8669d95e7dd2…
1
0
0
0
Dmitry Timoshkov : windowscodecs/tests: Add a test for loading PNG grayscale images.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: 1dbc9fcb9cf7d4caf87a4eaaeed8c1728fda922c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dbc9fcb9cf7d4caf87a4eaae…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 17 13:35:29 2017 -0500 windowscodecs/tests: Add a test for loading PNG grayscale images. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/tests/pngformat.c | 58 +++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c index 1aeb9bc..d266910 100644 --- a/dlls/windowscodecs/tests/pngformat.c +++ b/dlls/windowscodecs/tests/pngformat.c @@ -1,5 +1,5 @@ /* - * Copyright 2012 Dmitry Timoshkov + * Copyright 2012, 2016 Dmitry Timoshkov * Copyright 2012 Hans Leidekker for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -580,6 +580,61 @@ static void test_png_palette(void) IWICBitmapDecoder_Release(decoder); } +/* RGB 24 bpp 1x1 pixel PNG image */ +static const char png_1x1_data[] = { + 0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a, + 0x00,0x00,0x00,0x0d,'I','H','D','R',0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,0xde, + 0x00,0x00,0x00,0x0c,'I','D','A','T',0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,0xe7, + 0x00,0x00,0x00,0x00,'I','E','N','D',0xae,0x42,0x60,0x82 +}; + +static void test_color_formats(void) +{ + static const struct + { + char bit_depth, color_type; + const GUID *format; + } td[] = + { + /* 2 - PNG_COLOR_TYPE_RGB */ + { 8, 2, &GUID_WICPixelFormat24bppBGR }, + /* 0 - PNG_COLOR_TYPE_GRAY */ + { 1, 0, &GUID_WICPixelFormatBlackWhite }, + { 2, 0, &GUID_WICPixelFormat2bppGray }, + { 4, 0, &GUID_WICPixelFormat4bppGray }, + { 8, 0, &GUID_WICPixelFormat8bppGray }, + { 16, 0, &GUID_WICPixelFormat16bppGray }, + }; + char buf[sizeof(png_1x1_data)]; + HRESULT hr; + IWICBitmapDecoder *decoder; + IWICBitmapFrameDecode *frame; + GUID format; + int i; + + for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) + { + memcpy(buf, png_1x1_data, sizeof(png_1x1_data)); + buf[24] = td[i].bit_depth; + buf[25] = td[i].color_type; + + decoder = create_decoder(buf, sizeof(buf)); + ok(decoder != NULL, "Failed to load PNG image data\n"); + if (!decoder) continue; + + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + ok(hr == S_OK, "GetFrame error %#x\n", hr); + + hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); + ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); + ok(IsEqualGUID(&format, td[i].format), + "expected %s, got %s\n", wine_dbgstr_guid(td[i].format), wine_dbgstr_guid(&format)); + + IWICBitmapFrameDecode_Release(frame); + IWICBitmapDecoder_Release(decoder); + } +} + START_TEST(pngformat) { HRESULT hr; @@ -592,6 +647,7 @@ START_TEST(pngformat) test_color_contexts(); test_png_palette(); + test_color_formats(); IWICImagingFactory_Release(factory); CoUninitialize();
1
0
0
0
Nikolay Sivov : dwrite: Simplify GetFontSignature().
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: eb212c1939b77ba12fbb68b05dfbe448c0343780 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb212c1939b77ba12fbb68b05…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Aug 15 14:40:26 2017 +0300 dwrite: Simplify GetFontSignature(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 4 +++- dlls/dwrite/font.c | 19 +++++++++++++++++++ dlls/dwrite/gdiinterop.c | 33 ++------------------------------- dlls/dwrite/opentype.c | 44 ++++++++++++++++---------------------------- 4 files changed, 40 insertions(+), 60 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index c65166d..a0632b7 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -202,6 +202,8 @@ extern void factory_detach_gdiinterop(IDWriteFactory5*,IDWriteGdiInterop1*) DECL extern struct fontfacecached *factory_cache_fontface(IDWriteFactory5*,struct list*,IDWriteFontFace4*) DECLSPEC_HIDDEN; extern void get_logfont_from_font(IDWriteFont*,LOGFONTW*) DECLSPEC_HIDDEN; extern void get_logfont_from_fontface(IDWriteFontFace*,LOGFONTW*) DECLSPEC_HIDDEN; +extern HRESULT get_fontsig_from_font(IDWriteFont*,FONTSIGNATURE*) DECLSPEC_HIDDEN; +extern HRESULT get_fontsig_from_fontface(IDWriteFontFace*,FONTSIGNATURE*) DECLSPEC_HIDDEN; extern HRESULT create_gdiinterop(IDWriteFactory5*,IDWriteGdiInterop1**) DECLSPEC_HIDDEN; extern void fontface_detach_from_cache(IDWriteFontFace4*) DECLSPEC_HIDDEN; extern void factory_lock(IDWriteFactory5*) DECLSPEC_HIDDEN; @@ -213,6 +215,7 @@ struct dwrite_font_props { DWRITE_FONT_STRETCH stretch; DWRITE_FONT_WEIGHT weight; DWRITE_PANOSE panose; + FONTSIGNATURE fontsig; LOGFONTW lf; }; @@ -235,7 +238,6 @@ extern BOOL opentype_get_vdmx_size(const void*,INT,UINT16*,UINT16*) DECLSPEC_HID extern UINT32 opentype_get_cpal_palettecount(const void*) DECLSPEC_HIDDEN; extern UINT32 opentype_get_cpal_paletteentrycount(const void*) DECLSPEC_HIDDEN; extern HRESULT opentype_get_cpal_entries(const void*,UINT32,UINT32,UINT32,DWRITE_COLOR_F*) DECLSPEC_HIDDEN; -extern HRESULT opentype_get_font_signature(struct file_stream_desc*,FONTSIGNATURE*) DECLSPEC_HIDDEN; extern BOOL opentype_has_vertical_variants(IDWriteFontFace4*) DECLSPEC_HIDDEN; extern UINT32 opentype_get_glyph_image_formats(IDWriteFontFace4*) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index a189f74..4dfb47f 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -76,6 +76,7 @@ struct dwrite_font_data { DWRITE_FONT_STRETCH stretch; DWRITE_FONT_WEIGHT weight; DWRITE_PANOSE panose; + FONTSIGNATURE fontsig; struct dwrite_font_propvec propvec; DWRITE_FONT_METRICS1 metrics; @@ -242,6 +243,7 @@ struct dwrite_fontface { DWRITE_FONT_STRETCH stretch; DWRITE_FONT_WEIGHT weight; DWRITE_PANOSE panose; + FONTSIGNATURE fontsig; UINT32 glyph_image_formats; LOGFONTW lf; @@ -1769,6 +1771,20 @@ void get_logfont_from_fontface(IDWriteFontFace *iface, LOGFONTW *lf) *lf = fontface->lf; } +HRESULT get_fontsig_from_font(IDWriteFont *iface, FONTSIGNATURE *fontsig) +{ + struct dwrite_font *font = unsafe_impl_from_IDWriteFont(iface); + *fontsig = font->data->fontsig; + return S_OK; +} + +HRESULT get_fontsig_from_fontface(IDWriteFontFace *iface, FONTSIGNATURE *fontsig) +{ + struct dwrite_fontface *fontface = unsafe_impl_from_IDWriteFontFace(iface); + *fontsig = fontface->fontsig; + return S_OK; +} + static HRESULT create_font(struct dwrite_fontfamily *family, UINT32 index, IDWriteFont3 **font) { struct dwrite_font *This; @@ -3344,6 +3360,7 @@ static HRESULT init_font_data(const struct fontface_desc *desc, IDWriteLocalized data->stretch = props.stretch; data->weight = props.weight; data->panose = props.panose; + data->fontsig = props.fontsig; data->lf = props.lf; fontstrings_get_en_string(*family_name, familyW, sizeof(familyW)/sizeof(WCHAR)); @@ -4383,6 +4400,7 @@ HRESULT create_fontface(const struct fontface_desc *desc, struct list *cached_li fontface->style = desc->font_data->style; fontface->stretch = desc->font_data->stretch; fontface->panose = desc->font_data->panose; + fontface->fontsig = desc->font_data->fontsig; fontface->lf = desc->font_data->lf; } else { @@ -4399,6 +4417,7 @@ HRESULT create_fontface(const struct fontface_desc *desc, struct list *cached_li fontface->style = data->style; fontface->stretch = data->stretch; fontface->panose = data->panose; + fontface->fontsig = data->fontsig; fontface->lf = data->lf; IDWriteLocalizedStrings_Release(names); diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 22b4ca4..5425b5c 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -838,51 +838,22 @@ static HRESULT WINAPI gdiinterop1_GetFontSignature_(IDWriteGdiInterop1 *iface, I FONTSIGNATURE *fontsig) { struct gdiinterop *This = impl_from_IDWriteGdiInterop1(iface); - struct file_stream_desc stream_desc; - IDWriteFontFileStream *stream; - IDWriteFontFile *file; - UINT32 count; - HRESULT hr; TRACE("(%p)->(%p %p)\n", This, fontface, fontsig); - memset(fontsig, 0, sizeof(*fontsig)); - - count = 1; - hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - hr = get_filestream_from_file(file, &stream); - IDWriteFontFile_Release(file); - if (FAILED(hr)) - return hr; - - stream_desc.stream = stream; - stream_desc.face_type = IDWriteFontFace_GetType(fontface); - stream_desc.face_index = IDWriteFontFace_GetIndex(fontface); - hr = opentype_get_font_signature(&stream_desc, fontsig); - IDWriteFontFileStream_Release(stream); - return hr; + return get_fontsig_from_fontface(fontface, fontsig); } static HRESULT WINAPI gdiinterop1_GetFontSignature(IDWriteGdiInterop1 *iface, IDWriteFont *font, FONTSIGNATURE *fontsig) { struct gdiinterop *This = impl_from_IDWriteGdiInterop1(iface); - IDWriteFontFace *fontface; - HRESULT hr; TRACE("(%p)->(%p %p)\n", This, font, fontsig); if (!font) return E_INVALIDARG; - memset(fontsig, 0, sizeof(*fontsig)); - - hr = IDWriteFont_CreateFontFace(font, &fontface); - if (FAILED(hr)) - return hr; - - hr = IDWriteGdiInterop1_GetFontSignature_(iface, fontface, fontsig); - IDWriteFontFace_Release(fontface); - return hr; + return get_fontsig_from_font(font, fontsig); } static HRESULT WINAPI gdiinterop1_GetMatchingFontsByLOGFONT(IDWriteGdiInterop1 *iface, LOGFONTW const *logfont, diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index a66500a..36c34b6 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -1317,6 +1317,7 @@ void opentype_get_font_properties(struct file_stream_desc *stream_desc, struct d props->weight = DWRITE_FONT_WEIGHT_NORMAL; props->style = DWRITE_FONT_STYLE_NORMAL; memset(&props->panose, 0, sizeof(props->panose)); + memset(&props->fontsig, 0, sizeof(props->fontsig)); memset(&props->lf, 0, sizeof(props->lf)); /* DWRITE_FONT_STRETCH enumeration values directly match font data values */ @@ -1343,6 +1344,21 @@ void opentype_get_font_properties(struct file_stream_desc *stream_desc, struct d props->style = DWRITE_FONT_STYLE_ITALIC; memcpy(&props->panose, &tt_os2->panose, sizeof(props->panose)); + + /* FONTSIGNATURE */ + props->fontsig.fsUsb[0] = GET_BE_DWORD(tt_os2->ulUnicodeRange1); + props->fontsig.fsUsb[1] = GET_BE_DWORD(tt_os2->ulUnicodeRange2); + props->fontsig.fsUsb[2] = GET_BE_DWORD(tt_os2->ulUnicodeRange3); + props->fontsig.fsUsb[3] = GET_BE_DWORD(tt_os2->ulUnicodeRange4); + + if (GET_BE_WORD(tt_os2->version) == 0) { + props->fontsig.fsCsb[0] = 0; + props->fontsig.fsCsb[1] = 0; + } + else { + props->fontsig.fsCsb[0] = GET_BE_DWORD(tt_os2->ulCodePageRange1); + props->fontsig.fsCsb[1] = GET_BE_DWORD(tt_os2->ulCodePageRange2); + } } else if (tt_head) { USHORT macStyle = GET_BE_WORD(tt_head->macStyle); @@ -1971,34 +1987,6 @@ void opentype_colr_next_glyph(const void *colr, struct dwrite_colorglyph *glyph) glyph->palette_index = GET_BE_WORD(layer->paletteIndex); } -HRESULT opentype_get_font_signature(struct file_stream_desc *stream_desc, FONTSIGNATURE *fontsig) -{ - const TT_OS2_V2 *tt_os2; - void *os2_context; - HRESULT hr; - - hr = opentype_get_font_table(stream_desc, MS_OS2_TAG, (const void**)&tt_os2, &os2_context, NULL, NULL); - if (tt_os2) { - fontsig->fsUsb[0] = GET_BE_DWORD(tt_os2->ulUnicodeRange1); - fontsig->fsUsb[1] = GET_BE_DWORD(tt_os2->ulUnicodeRange2); - fontsig->fsUsb[2] = GET_BE_DWORD(tt_os2->ulUnicodeRange3); - fontsig->fsUsb[3] = GET_BE_DWORD(tt_os2->ulUnicodeRange4); - - if (GET_BE_WORD(tt_os2->version) == 0) { - fontsig->fsCsb[0] = 0; - fontsig->fsCsb[1] = 0; - } - else { - fontsig->fsCsb[0] = GET_BE_DWORD(tt_os2->ulCodePageRange1); - fontsig->fsCsb[1] = GET_BE_DWORD(tt_os2->ulCodePageRange2); - } - - IDWriteFontFileStream_ReleaseFileFragment(stream_desc->stream, os2_context); - } - - return hr; -} - BOOL opentype_has_vertical_variants(IDWriteFontFace4 *fontface) { const OT_FeatureList *featurelist;
1
0
0
0
Nikolay Sivov : dwrite: Added a helper to check for supported characters.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: b93d9d93e78312fc997995cbdbce514682710b1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b93d9d93e78312fc997995cbd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Aug 15 14:40:25 2017 +0300 dwrite: Added a helper to check for supported characters. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index eadf92c..a189f74 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1192,7 +1192,7 @@ static BOOL WINAPI dwritefontface3_HasCharacter(IDWriteFontFace4 *iface, UINT32 struct dwrite_fontface *This = impl_from_IDWriteFontFace4(iface); UINT16 index; - TRACE("(%p)->(0x%08x)\n", This, ch); + TRACE("(%p)->(%#x)\n", This, ch); index = 0; if (FAILED(fontface_get_glyphs(This, &ch, 1, &index))) @@ -1566,31 +1566,37 @@ static void WINAPI dwritefont_GetMetrics(IDWriteFont3 *iface, DWRITE_FONT_METRIC memcpy(metrics, &This->data->metrics, sizeof(*metrics)); } -static HRESULT WINAPI dwritefont_HasCharacter(IDWriteFont3 *iface, UINT32 value, BOOL *exists) +static HRESULT font_has_character(struct dwrite_font *font, UINT32 ch, BOOL *exists) { - struct dwrite_font *This = impl_from_IDWriteFont3(iface); IDWriteFontFace4 *fontface; UINT16 index; HRESULT hr; - TRACE("(%p)->(0x%08x %p)\n", This, value, exists); - *exists = FALSE; - hr = get_fontface_from_font(This, &fontface); + hr = get_fontface_from_font(font, &fontface); if (FAILED(hr)) return hr; index = 0; - hr = IDWriteFontFace4_GetGlyphIndices(fontface, &value, 1, &index); + hr = IDWriteFontFace4_GetGlyphIndices(fontface, &ch, 1, &index); + IDWriteFontFace4_Release(fontface); if (FAILED(hr)) return hr; - IDWriteFontFace4_Release(fontface); *exists = index != 0; return S_OK; } +static HRESULT WINAPI dwritefont_HasCharacter(IDWriteFont3 *iface, UINT32 ch, BOOL *exists) +{ + struct dwrite_font *This = impl_from_IDWriteFont3(iface); + + TRACE("(%p)->(%#x %p)\n", This, ch, exists); + + return font_has_character(This, ch, exists); +} + static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont3 *iface, IDWriteFontFace **fontface) { struct dwrite_font *This = impl_from_IDWriteFont3(iface); @@ -1694,13 +1700,11 @@ static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWr static BOOL WINAPI dwritefont3_HasCharacter(IDWriteFont3 *iface, UINT32 ch) { struct dwrite_font *This = impl_from_IDWriteFont3(iface); - HRESULT hr; BOOL ret; - TRACE("(%p)->(0x%x)\n", This, ch); + TRACE("(%p)->(%#x)\n", This, ch); - hr = IDWriteFont_HasCharacter((IDWriteFont*)iface, ch, &ret); - return hr == S_OK && ret; + return font_has_character(This, ch, &ret) == S_OK && ret; } static DWRITE_LOCALITY WINAPI dwritefont3_GetLocality(IDWriteFont3 *iface)
1
0
0
0
Nikolay Sivov : dwrite: Protect cached fontface list when accessed from multiple threads.
by Alexandre Julliard
20 Aug '17
20 Aug '17
Module: wine Branch: master Commit: fb5079d887036ea35c8aa8dabdbd126c4df52dab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb5079d887036ea35c8aa8dab…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Aug 15 14:40:24 2017 +0300 dwrite: Protect cached fontface list when accessed from multiple threads. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 15 ++++++++--- dlls/dwrite/font.c | 30 +++++++++++++-------- dlls/dwrite/main.c | 63 +++++++++++++++++++++++++++++++------------- 3 files changed, 74 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fb5079d887036ea35c8aa…
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
36
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
Results per page:
10
25
50
100
200