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
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 2015
----- 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
503 discussions
Start a n
N
ew thread
Michael Müller : winhttp: Remove unused variable in read_reply().
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: a533bf26ce1f27e2df2f438f8896ba3f26ccab5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a533bf26ce1f27e2df2f438f8…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon Aug 10 18:34:06 2015 +0200 winhttp: Remove unused variable in read_reply(). --- dlls/winhttp/request.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 740a582..607b502 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -2092,19 +2092,17 @@ static BOOL read_reply( request_t *request ) static const WCHAR crlf[] = {'\r','\n',0}; char buffer[MAX_REPLY_LEN]; - DWORD buflen, len, offset, received_len, crlf_len = 2; /* strlenW(crlf) */ + DWORD buflen, len, offset, crlf_len = 2; /* strlenW(crlf) */ char *status_code, *status_text; WCHAR *versionW, *status_textW, *raw_headers; WCHAR status_codeW[4]; /* sizeof("nnn") */ if (!netconn_connected( &request->netconn )) return FALSE; - received_len = 0; do { buflen = MAX_REPLY_LEN; if (!read_line( request, buffer, &buflen )) return FALSE; - received_len += buflen; /* first line should look like 'HTTP/1.x nnn OK' where nnn is the status code */ if (!(status_code = strchr( buffer, ' ' ))) return FALSE; @@ -2157,7 +2155,6 @@ static BOOL read_reply( request_t *request ) buflen = MAX_REPLY_LEN; if (!read_line( request, buffer, &buflen )) return TRUE; - received_len += buflen; if (!*buffer) break; while (len - offset < buflen + crlf_len)
1
0
0
0
Sebastian Lackner : wininet/tests: Print the correct function name in ok() messages.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 9a7ce5614507adc05bcff991022e6e6871f7bdf6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a7ce5614507adc05bcff9910…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Aug 10 16:45:54 2015 +0200 wininet/tests: Print the correct function name in ok() messages. --- dlls/wininet/tests/internet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 5e09525..2efde07 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1111,29 +1111,29 @@ static void test_InternetSetOption(void) SetLastError(0xdeadbeef); ulArg = 11; ret = InternetSetOptionA(NULL, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %x\n", GetLastError()); SetLastError(0xdeadbeef); ulArg = 11; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, 20); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INTERNET_BAD_OPTION_LENGTH, "GetLastError() = %d\n", GetLastError()); ulArg = 11; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); SetLastError(0xdeadbeef); ulArg = 4; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %x\n", GetLastError()); SetLastError(0xdeadbeef); ulArg = 16; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %x\n", GetLastError()); ret = InternetCloseHandle(req);
1
0
0
0
Huw Davies : ws2_32: Avoid using inet_ntoa() which isn't thread-safe.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 2569123d003be01638978c0bdab2dfe62f935d28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2569123d003be01638978c0bd…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 10 15:08:44 2015 +0100 ws2_32: Avoid using inet_ntoa() which isn't thread-safe. --- dlls/ws2_32/socket.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 79aaaf9..ca82ec9 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -283,9 +283,18 @@ static inline const char *debugstr_sockaddr( const struct WS_sockaddr *a ) switch (a->sa_family) { case WS_AF_INET: + { + char buf[16]; + const char *p; + struct WS_sockaddr_in *sin = (struct WS_sockaddr_in *)a; + + p = WS_inet_ntop( WS_AF_INET, &sin->sin_addr, buf, sizeof(buf) ); + if (!p) + p = "(unknown IPv4 address)"; + return wine_dbg_sprintf("{ family AF_INET, address %s, port %d }", - inet_ntoa(((const struct sockaddr_in *)a)->sin_addr), - ntohs(((const struct sockaddr_in *)a)->sin_port)); + p, ntohs(sin->sin_port)); + } case WS_AF_INET6: { char buf[46]; @@ -4004,15 +4013,15 @@ WS_u_short WINAPI WS_ntohs(WS_u_short netshort) */ char* WINAPI WS_inet_ntoa(struct WS_in_addr in) { - char* s = inet_ntoa(*((struct in_addr*)&in)); - if( s ) - { - struct per_thread_data *data = get_per_thread_data(); - strcpy(data->ntoa_buffer, s); - return data->ntoa_buffer; - } - SetLastError(wsaErrno()); - return NULL; + struct per_thread_data *data = get_per_thread_data(); + + sprintf( data->ntoa_buffer, "%u.%u.%u.%u", + (unsigned int)(ntohl( in.WS_s_addr ) >> 24 & 0xff), + (unsigned int)(ntohl( in.WS_s_addr ) >> 16 & 0xff), + (unsigned int)(ntohl( in.WS_s_addr ) >> 8 & 0xff), + (unsigned int)(ntohl( in.WS_s_addr ) & 0xff) ); + + return data->ntoa_buffer; } static const char *debugstr_wsaioctl(DWORD ioctl)
1
0
0
0
Nikolay Sivov : dwrite: Use better font matching algorithm based on weight /stretch/style triples.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: f5f025f1ddbeb5680c7b51d3b95857d0f7818233 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5f025f1ddbeb5680c7b51d3b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 10 13:51:28 2015 +0300 dwrite: Use better font matching algorithm based on weight/stretch/style triples. --- dlls/dwrite/font.c | 103 ++++++++++++++++++++++++++++++++++++----------- dlls/dwrite/tests/font.c | 2 +- 2 files changed, 80 insertions(+), 25 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 6036720..eda6378 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -42,6 +42,12 @@ static const FLOAT RECOMMENDED_OUTLINE_AA_THRESHOLD = 100.0f; static const FLOAT RECOMMENDED_OUTLINE_A_THRESHOLD = 350.0f; static const FLOAT RECOMMENDED_NATURAL_PPEM = 20.0f; +struct dwrite_font_propvec { + FLOAT stretch; + FLOAT style; + FLOAT weight; +}; + struct dwrite_font_data { LONG ref; @@ -49,6 +55,8 @@ struct dwrite_font_data { DWRITE_FONT_STRETCH stretch; DWRITE_FONT_WEIGHT weight; DWRITE_PANOSE panose; + struct dwrite_font_propvec propvec; + DWRITE_FONT_METRICS1 metrics; IDWriteLocalizedStrings *info_strings[DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME+1]; @@ -257,6 +265,23 @@ static void* get_fontface_table(struct dwrite_fontface *fontface, UINT32 tag, st return table->data; } +static void init_font_prop_vec(const struct dwrite_font_props *props, struct dwrite_font_propvec *vec) +{ + vec->stretch = ((INT32)props->stretch - DWRITE_FONT_STRETCH_NORMAL) * 11.0f; + vec->style = props->style * 7.0f; + vec->weight = ((INT32)props->weight - DWRITE_FONT_WEIGHT_NORMAL) / 100.0f * 5.0f; +} + +static FLOAT get_font_prop_vec_distance(const struct dwrite_font_propvec *left, const struct dwrite_font_propvec *right) +{ + return powf(left->stretch - right->stretch, 2) + powf(left->style - right->style, 2) + powf(left->weight - right->weight, 2); +} + +static FLOAT get_font_prop_vec_dotproduct(const struct dwrite_font_propvec *left, const struct dwrite_font_propvec *right) +{ + return left->stretch * right->stretch + left->style * right->style + left->weight * right->weight; +} + static inline void* get_fontface_cmap(struct dwrite_fontface *fontface) { return get_fontface_table(fontface, MS_CMAP_TAG, &fontface->cmap); @@ -1552,14 +1577,44 @@ static HRESULT WINAPI dwritefontfamily_GetFamilyNames(IDWriteFontFamily *iface, return clone_localizedstring(This->data->familyname, names); } -static inline BOOL is_matching_font_style(DWRITE_FONT_STYLE style, DWRITE_FONT_STYLE font_style) +static BOOL is_better_font_match(const struct dwrite_font_propvec *next, const struct dwrite_font_propvec *cur, + const struct dwrite_font_propvec *req) { - if (style == font_style) + FLOAT cur_to_req = get_font_prop_vec_distance(cur, req); + FLOAT next_to_req = get_font_prop_vec_distance(next, req); + FLOAT cur_req_prod, next_req_prod; + + if (next_to_req < cur_to_req) return TRUE; - if (((style == DWRITE_FONT_STYLE_ITALIC) || (style == DWRITE_FONT_STYLE_OBLIQUE)) && font_style == DWRITE_FONT_STYLE_NORMAL) + if (next_to_req > cur_to_req) + return FALSE; + + cur_req_prod = get_font_prop_vec_dotproduct(cur, req); + next_req_prod = get_font_prop_vec_dotproduct(next, req); + + if (next_req_prod > cur_req_prod) return TRUE; + if (next_req_prod < cur_req_prod) + return FALSE; + + if (next->stretch > cur->stretch) + return TRUE; + if (next->stretch < cur->stretch) + return FALSE; + + if (next->style > cur->style) + return TRUE; + if (next->style < cur->style) + return FALSE; + + if (next->weight > cur->weight) + return TRUE; + if (next->weight < cur->weight) + return FALSE; + + /* full match, no reason to prefer new variant */ return FALSE; } @@ -1567,35 +1622,34 @@ static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily *i DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont **font) { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily(iface); - UINT32 min_weight_diff = ~0u; - int found = -1, i; + struct dwrite_font_props reqprops = { style, stretch, weight }; + DWRITE_FONT_SIMULATIONS simulations; + struct dwrite_font_propvec req; + struct dwrite_font_data *match; + UINT32 i; TRACE("(%p)->(%d %d %d %p)\n", This, weight, stretch, style, font); - for (i = 0; i < This->data->font_count; i++) { - if (is_matching_font_style(style, This->data->fonts[i]->style) && stretch == This->data->fonts[i]->stretch) { - DWRITE_FONT_WEIGHT font_weight = This->data->fonts[i]->weight; - UINT32 weight_diff = abs(font_weight - weight); - if (weight_diff < min_weight_diff) { - min_weight_diff = weight_diff; - found = i; - } - } + if (This->data->font_count == 0) { + *font = NULL; + return DWRITE_E_NOFONT; } - if (found != -1) { - DWRITE_FONT_SIMULATIONS simulations = DWRITE_FONT_SIMULATIONS_NONE; + init_font_prop_vec(&reqprops, &req); + match = This->data->fonts[0]; - if (((style == DWRITE_FONT_STYLE_ITALIC) || (style == DWRITE_FONT_STYLE_OBLIQUE)) && - This->data->fonts[found]->style == DWRITE_FONT_STYLE_NORMAL) { - simulations = DWRITE_FONT_SIMULATIONS_OBLIQUE; - } - return create_font(This->data->fonts[found], iface, simulations, font); + for (i = 1; i < This->data->font_count; i++) { + if (is_better_font_match(&This->data->fonts[i]->propvec, &match->propvec, &req)) + match = This->data->fonts[i]; } - else { - *font = NULL; - return DWRITE_E_NOFONT; + + simulations = DWRITE_FONT_SIMULATIONS_NONE; + if (((style == DWRITE_FONT_STYLE_ITALIC) || (style == DWRITE_FONT_STYLE_OBLIQUE)) && + match->style == DWRITE_FONT_STYLE_NORMAL) { + simulations = DWRITE_FONT_SIMULATIONS_OBLIQUE; } + + return create_font(match, iface, simulations, font); } static HRESULT WINAPI dwritefontfamily_GetMatchingFonts(IDWriteFontFamily *iface, DWRITE_FONT_WEIGHT weight, @@ -1941,6 +1995,7 @@ static HRESULT init_font_data(IDWriteFactory2 *factory, IDWriteFontFile *file, U data->stretch = props.stretch; data->weight = props.weight; data->panose = props.panose; + init_font_prop_vec(&props, &data->propvec); if (tt_os2) IDWriteFontFileStream_ReleaseFileFragment(*stream, os2_context); diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 0664a9a..7ee5c8a 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -705,7 +705,7 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); weight = IDWriteFont_GetWeight(font); - ok(weight == DWRITE_FONT_WEIGHT_NORMAL || broken(weight == DWRITE_FONT_WEIGHT_BOLD) /* win7 w/o SP */, + ok(weight == DWRITE_FONT_WEIGHT_NORMAL || weight == DWRITE_FONT_WEIGHT_BOLD, "got %d\n", weight); IDWriteFont_Release(font);
1
0
0
0
Nikolay Sivov : dwrite: Improve the way font weight is set with both OS/ 2 and 'head' values.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 785c592ada7a6bc161c2026c3df29b7c6d825bb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=785c592ada7a6bc161c2026c3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 10 13:50:59 2015 +0300 dwrite: Improve the way font weight is set with both OS/2 and 'head' values. --- dlls/dwrite/opentype.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 57660a3..c6d4ec3 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -1041,11 +1041,19 @@ void opentype_get_font_properties(IDWriteFontFileStream *stream, DWRITE_FONT_FAC if (tt_os2) { USHORT version = GET_BE_WORD(tt_os2->version); USHORT fsSelection = GET_BE_WORD(tt_os2->fsSelection); + USHORT usWeightClass = GET_BE_WORD(tt_os2->usWeightClass); if (GET_BE_WORD(tt_os2->usWidthClass) <= DWRITE_FONT_STRETCH_ULTRA_EXPANDED) props->stretch = GET_BE_WORD(tt_os2->usWidthClass); - props->weight = GET_BE_WORD(tt_os2->usWeightClass); + if (usWeightClass >= 1 && usWeightClass <= 9) + usWeightClass *= 100; + + if (usWeightClass > DWRITE_FONT_WEIGHT_ULTRA_BLACK) + props->weight = DWRITE_FONT_WEIGHT_ULTRA_BLACK; + else + props->weight = usWeightClass; + if (version >= 4 && (fsSelection & OS2_FSSELECTION_OBLIQUE)) props->style = DWRITE_FONT_STYLE_OBLIQUE; else if (fsSelection & OS2_FSSELECTION_ITALIC) @@ -1054,13 +1062,17 @@ void opentype_get_font_properties(IDWriteFontFileStream *stream, DWRITE_FONT_FAC } else if (tt_head) { USHORT macStyle = GET_BE_WORD(tt_head->macStyle); - if (macStyle & TT_HEAD_MACSTYLE_ITALIC) - props->style = DWRITE_FONT_STYLE_ITALIC; if (macStyle & TT_HEAD_MACSTYLE_CONDENSED) props->stretch = DWRITE_FONT_STRETCH_CONDENSED; else if (macStyle & TT_HEAD_MACSTYLE_EXTENDED) props->stretch = DWRITE_FONT_STRETCH_EXPANDED; + + if (macStyle & TT_HEAD_MACSTYLE_BOLD) + props->weight = DWRITE_FONT_WEIGHT_BOLD; + + if (macStyle & TT_HEAD_MACSTYLE_ITALIC) + props->style = DWRITE_FONT_STYLE_ITALIC; } TRACE("stretch=%d, weight=%d, style %d\n", props->stretch, props->weight, props->style);
1
0
0
0
Nikolay Sivov : dwrite: Set font stretch from 'head' table as a fallback.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 123c7cde07c73f01e576f2ab4dd01cdc8968047a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=123c7cde07c73f01e576f2ab4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 10 13:50:25 2015 +0300 dwrite: Set font stretch from 'head' table as a fallback. --- dlls/dwrite/opentype.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 852ad96..57660a3 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -133,8 +133,13 @@ typedef struct enum TT_HEAD_MACSTYLE { - TT_HEAD_MACSTYLE_BOLD = 1 << 0, - TT_HEAD_MACSTYLE_ITALIC = 1 << 1, + TT_HEAD_MACSTYLE_BOLD = 1 << 0, + TT_HEAD_MACSTYLE_ITALIC = 1 << 1, + TT_HEAD_MACSTYLE_UNDERLINE = 1 << 2, + TT_HEAD_MACSTYLE_OUTLINE = 1 << 3, + TT_HEAD_MACSTYLE_SHADOW = 1 << 4, + TT_HEAD_MACSTYLE_CONDENSED = 1 << 5, + TT_HEAD_MACSTYLE_EXTENDED = 1 << 6, }; typedef struct @@ -1051,6 +1056,11 @@ void opentype_get_font_properties(IDWriteFontFileStream *stream, DWRITE_FONT_FAC USHORT macStyle = GET_BE_WORD(tt_head->macStyle); if (macStyle & TT_HEAD_MACSTYLE_ITALIC) props->style = DWRITE_FONT_STYLE_ITALIC; + + if (macStyle & TT_HEAD_MACSTYLE_CONDENSED) + props->stretch = DWRITE_FONT_STRETCH_CONDENSED; + else if (macStyle & TT_HEAD_MACSTYLE_EXTENDED) + props->stretch = DWRITE_FONT_STRETCH_EXPANDED; } TRACE("stretch=%d, weight=%d, style %d\n", props->stretch, props->weight, props->style);
1
0
0
0
Nikolay Sivov : dwrite: Use OS/2 table data to set font style, make it preferable.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 4b4674bea84817d624bf34fb8efd010ec72e3775 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b4674bea84817d624bf34fb8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 10 13:49:52 2015 +0300 dwrite: Use OS/2 table data to set font style, make it preferable. --- dlls/dwrite/opentype.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index f8c66fc..852ad96 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -131,6 +131,12 @@ typedef struct SHORT glyphdata_format; } TT_HEAD; +enum TT_HEAD_MACSTYLE +{ + TT_HEAD_MACSTYLE_BOLD = 1 << 0, + TT_HEAD_MACSTYLE_ITALIC = 1 << 1, +}; + typedef struct { ULONG Version; @@ -1028,21 +1034,27 @@ void opentype_get_font_properties(IDWriteFontFileStream *stream, DWRITE_FONT_FAC /* DWRITE_FONT_STRETCH enumeration values directly match font data values */ if (tt_os2) { + USHORT version = GET_BE_WORD(tt_os2->version); + USHORT fsSelection = GET_BE_WORD(tt_os2->fsSelection); + if (GET_BE_WORD(tt_os2->usWidthClass) <= DWRITE_FONT_STRETCH_ULTRA_EXPANDED) props->stretch = GET_BE_WORD(tt_os2->usWidthClass); props->weight = GET_BE_WORD(tt_os2->usWeightClass); + if (version >= 4 && (fsSelection & OS2_FSSELECTION_OBLIQUE)) + props->style = DWRITE_FONT_STYLE_OBLIQUE; + else if (fsSelection & OS2_FSSELECTION_ITALIC) + props->style = DWRITE_FONT_STYLE_ITALIC; memcpy(&props->panose, &tt_os2->panose, sizeof(props->panose)); - - TRACE("stretch=%d, weight=%d\n", props->stretch, props->weight); } - - if (tt_head) { + else if (tt_head) { USHORT macStyle = GET_BE_WORD(tt_head->macStyle); - if (macStyle & 0x0002) + if (macStyle & TT_HEAD_MACSTYLE_ITALIC) props->style = DWRITE_FONT_STYLE_ITALIC; } + TRACE("stretch=%d, weight=%d, style %d\n", props->stretch, props->weight, props->style); + if (tt_os2) IDWriteFontFileStream_ReleaseFileFragment(stream, os2_context); if (tt_head)
1
0
0
0
Nikolay Sivov : dwrite: Fix font table tag tracing.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: c7d1b911541a5c775e67ec635f3d3df3e2331a4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7d1b911541a5c775e67ec635…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 10 13:49:13 2015 +0300 dwrite: Fix font table tag tracing. --- dlls/dwrite/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 93aae86..6036720 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -211,7 +211,7 @@ static inline struct dwrite_colorglyphenum *impl_from_IDWriteColorGlyphRunEnumer static inline const char *debugstr_tag(UINT32 tag) { - return wine_dbg_sprintf("%c%c%c%c", tag >> 24, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff); + return wine_dbg_sprintf("%c%c%c%c", tag & 0xff, (tag >> 8) & 0xff, (tag >> 16) & 0xff, tag >> 24); } static HRESULT get_cached_glyph_metrics(struct dwrite_fontface *fontface, UINT16 glyph, DWRITE_GLYPH_METRICS *metrics)
1
0
0
0
André Hentschel : user32/tests: Add ARM and ARM64 arch strings.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 3c9b8d702814c86ab7f68b2d5b5454cebf69b349 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c9b8d702814c86ab7f68b2d5…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Aug 9 14:04:03 2015 +0200 user32/tests: Add ARM and ARM64 arch strings. --- dlls/user32/tests/msg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 8b4475f..d92fbc7 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -64,6 +64,10 @@ #define ARCH "x86" #elif defined __x86_64__ #define ARCH "amd64" +#elif defined __arm__ +#define ARCH "arm" +#elif defined __aarch64__ +#define ARCH "arm64" #else #define ARCH "none" #endif
1
0
0
0
André Hentschel : kernel32/tests: Add more ARM and ARM64 arch strings.
by Alexandre Julliard
12 Aug '15
12 Aug '15
Module: wine Branch: master Commit: 4b8df74447940c0c91f4877d99f6fa47fd1328d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b8df74447940c0c91f4877d9…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Aug 9 14:03:54 2015 +0200 kernel32/tests: Add more ARM and ARM64 arch strings. --- dlls/kernel32/tests/path.c | 4 ++++ dlls/kernel32/tests/thread.c | 4 ++++ dlls/oleaut32/tests/typelib.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index f8dfdc8..85c4ec3 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -46,6 +46,10 @@ #define ARCH "x86" #elif defined __x86_64__ #define ARCH "amd64" +#elif defined __arm__ +#define ARCH "arm" +#elif defined __aarch64__ +#define ARCH "arm64" #else #define ARCH "none" #endif diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 35e978e..bb6faa0 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -65,6 +65,10 @@ #define ARCH "x86" #elif defined __x86_64__ #define ARCH "amd64" +#elif defined __arm__ +#define ARCH "arm" +#elif defined __aarch64__ +#define ARCH "arm64" #else #define ARCH "none" #endif diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index df68340..3ce2bd7 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -63,6 +63,10 @@ #define ARCH "x86" #elif defined __x86_64__ #define ARCH "amd64" +#elif defined __arm__ +#define ARCH "arm" +#elif defined __aarch64__ +#define ARCH "arm64" #else #define ARCH "none" #endif
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
51
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
Results per page:
10
25
50
100
200