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
November 2020
----- 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
1 participants
851 discussions
Start a n
N
ew thread
Zebediah Figura : quartz/tests: Add some tests for flushing on the DirectSound renderer.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 6e9920a1d3c2440e10f695daf348744bd2a31fa2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e9920a1d3c2440e10f695da…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Nov 19 17:21:19 2020 -0600 quartz/tests: Add some tests for flushing on the DirectSound renderer. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/dsoundrender.c | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 5142ca2da6d..558e6989c98 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -832,6 +832,51 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control) * completely paused. */ } +static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control) +{ + OAFilterState state; + HRESULT hr; + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = send_frame(input); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = send_frame(input); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Run(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = send_frame(input); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = send_frame(input); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); +} + static void test_connect_pin(void) { ALLOCATOR_PROPERTIES req_props = {1, 4 * 44100, 1, 0}, ret_props; @@ -925,6 +970,7 @@ static void test_connect_pin(void) ok(hr == S_OK, "Got hr %#x.\n", hr); test_filter_state(input, control); + test_flushing(pin, input, control); hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Paul Gofman : ntdll: Fix SMT CPU flag reporting.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 03cebb22d8bb882a057acfaf5d30e991dcc03544 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=03cebb22d8bb882a057acfaf…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Nov 20 14:17:40 2020 +0300 ntdll: Fix SMT CPU flag reporting. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index faa7532cfef..8add2cabd4f 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -538,8 +538,8 @@ static DWORD count_bits(ULONG_PTR mask) DWORD count = 0; while (mask > 0) { + if (mask & 1) ++count; mask >>= 1; - count++; } return count; }
1
0
0
0
Rémi Bernon : gdi32: Lazily create and cache fontconfig patterns.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: f7e646ccb7b26b949986e53bca38674dd664009f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f7e646ccb7b26b949986e53b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 20 10:40:42 2020 +0000 gdi32: Lazily create and cache fontconfig patterns. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/freetype.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 7d8bc5f5b05..993110e6fe0 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1343,21 +1343,22 @@ static UINT parse_aa_pattern( FcPattern *pattern ) return aa_flags; } -static FcPattern *create_family_pattern( const char *name ) +static FcPattern *create_family_pattern( const char *name, FcPattern **cached ) { - FcPattern *ret, *pattern = pFcPatternCreate(); + FcPattern *ret = NULL, *tmp, *pattern = pFcPatternCreate(); FcResult result; - + if (*cached) return *cached; pFcPatternAddString( pattern, FC_FAMILY, (const FcChar8 *)name ); pFcPatternAddString( pattern, FC_NAMELANG, (const FcChar8 *)"en-us" ); pFcPatternAddString( pattern, FC_PRGNAME, (const FcChar8 *)"wine" ); pFcConfigSubstitute( NULL, pattern, FcMatchPattern ); pFcDefaultSubstitute( pattern ); - ret = pFcFontMatch( NULL, pattern, &result ); + tmp = pFcFontMatch( NULL, pattern, &result ); pFcPatternDestroy( pattern ); - if (ret && result == FcResultMatch) return ret; - pFcPatternDestroy( ret ); - return NULL; + if (result != FcResultMatch) pFcPatternDestroy( tmp ); + else if ((ret = InterlockedCompareExchangePointer( (void **)cached, tmp, NULL ))) pFcPatternDestroy( tmp ); + else ret = tmp; + return ret; } static void fontconfig_add_font( FcPattern *pattern, DWORD flags ) @@ -1458,9 +1459,6 @@ static void init_fontconfig(void) default_aa_flags = parse_aa_pattern( pattern ); pFcPatternDestroy( pattern ); } - pattern_serif = create_family_pattern( "serif" ); - pattern_fixed = create_family_pattern( "monospace" ); - pattern_sans = create_family_pattern( "sans" ); TRACE( "enabled, default flags = %x\n", default_aa_flags ); fontconfig_enabled = TRUE; @@ -2213,9 +2211,9 @@ static BOOL CDECL fontconfig_enum_family_fallbacks( DWORD pitch_and_family, int char *str; DWORD len; - if ((pitch_and_family & FIXED_PITCH) || (pitch_and_family & 0xf0) == FF_MODERN) pat = pattern_fixed; - else if ((pitch_and_family & 0xf0) == FF_ROMAN) pat = pattern_serif; - else pat = pattern_sans; + if ((pitch_and_family & FIXED_PITCH) || (pitch_and_family & 0xf0) == FF_MODERN) pat = create_family_pattern( "monospace", &pattern_fixed ); + else if ((pitch_and_family & 0xf0) == FF_ROMAN) pat = create_family_pattern( "serif", &pattern_serif ); + else pat = create_family_pattern( "sans", &pattern_sans ); if (!pat) return FALSE; if (pFcPatternGetString( pat, FC_FAMILY, index, (FcChar8 **)&str ) != FcResultMatch) return FALSE;
1
0
0
0
Rémi Bernon : gdi32: Load font list directly from fontconfig cache.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: a51d68e35c53f94f2af28ede3b008c5166b8f741 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a51d68e35c53f94f2af28ede…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 20 10:40:41 2020 +0000 gdi32: Load font list directly from fontconfig cache. Instead of going through the -slow- font matching. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/freetype.c | 169 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 125 insertions(+), 44 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 45b5e94d341..7d8bc5f5b05 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -190,6 +190,20 @@ MAKE_FUNCPTR(FcPatternDestroy); MAKE_FUNCPTR(FcPatternGetBool); MAKE_FUNCPTR(FcPatternGetInteger); MAKE_FUNCPTR(FcPatternGetString); +MAKE_FUNCPTR(FcConfigGetFontDirs); +MAKE_FUNCPTR(FcConfigGetCurrent); +MAKE_FUNCPTR(FcCacheCopySet); +MAKE_FUNCPTR(FcCacheNumSubdir); +MAKE_FUNCPTR(FcCacheSubdir); +MAKE_FUNCPTR(FcDirCacheRead); +MAKE_FUNCPTR(FcDirCacheUnload); +MAKE_FUNCPTR(FcStrListCreate); +MAKE_FUNCPTR(FcStrListDone); +MAKE_FUNCPTR(FcStrListNext); +MAKE_FUNCPTR(FcStrSetAdd); +MAKE_FUNCPTR(FcStrSetCreate); +MAKE_FUNCPTR(FcStrSetDestroy); +MAKE_FUNCPTR(FcStrSetMember); #ifndef FC_NAMELANG #define FC_NAMELANG "namelang" #endif @@ -1346,6 +1360,51 @@ static FcPattern *create_family_pattern( const char *name ) return NULL; } +static void fontconfig_add_font( FcPattern *pattern, DWORD flags ) +{ + const char *unix_name, *format; + WCHAR *dos_name; + FcBool scalable; + DWORD aa_flags; + int face_index; + + TRACE( "(%p %#x)\n", pattern, flags ); + + if (pFcPatternGetString( pattern, FC_FILE, 0, (FcChar8 **)&unix_name ) != FcResultMatch) + return; + + if (pFcPatternGetBool( pattern, FC_SCALABLE, 0, &scalable ) != FcResultMatch) + scalable = FALSE; + + if (pFcPatternGetString( pattern, FC_FONTFORMAT, 0, (FcChar8 **)&format ) != FcResultMatch) + { + TRACE( "ignoring unknown font format %s\n", debugstr_a(unix_name) ); + return; + } + + if (!strcmp( format, "Type 1" )) + { + TRACE( "ignoring Type 1 font %s\n", debugstr_a(unix_name) ); + return; + } + + if (!scalable && !(flags & ADDFONT_ALLOW_BITMAP)) + { + TRACE( "ignoring non-scalable font %s\n", debugstr_a(unix_name) ); + return; + } + + if (!(aa_flags = parse_aa_pattern( pattern ))) aa_flags = default_aa_flags; + flags |= ADDFONT_AA_FLAGS(aa_flags); + + if (pFcPatternGetInteger( pattern, FC_INDEX, 0, &face_index ) != FcResultMatch) + face_index = 0; + + dos_name = get_dos_file_name( unix_name ); + add_unix_face( unix_name, dos_name, NULL, 0, face_index, flags, NULL ); + RtlFreeHeap( GetProcessHeap(), 0, dos_name ); +} + static void init_fontconfig(void) { void *fc_handle = dlopen(SONAME_LIBFONTCONFIG, RTLD_NOW); @@ -1369,6 +1428,20 @@ static void init_fontconfig(void) LOAD_FUNCPTR(FcPatternGetBool); LOAD_FUNCPTR(FcPatternGetInteger); LOAD_FUNCPTR(FcPatternGetString); + LOAD_FUNCPTR(FcConfigGetFontDirs); + LOAD_FUNCPTR(FcConfigGetCurrent); + LOAD_FUNCPTR(FcCacheCopySet); + LOAD_FUNCPTR(FcCacheNumSubdir); + LOAD_FUNCPTR(FcCacheSubdir); + LOAD_FUNCPTR(FcDirCacheRead); + LOAD_FUNCPTR(FcDirCacheUnload); + LOAD_FUNCPTR(FcStrListCreate); + LOAD_FUNCPTR(FcStrListDone); + LOAD_FUNCPTR(FcStrListNext); + LOAD_FUNCPTR(FcStrSetAdd); + LOAD_FUNCPTR(FcStrSetCreate); + LOAD_FUNCPTR(FcStrSetDestroy); + LOAD_FUNCPTR(FcStrSetMember); #undef LOAD_FUNCPTR if (pFcInit()) @@ -1394,61 +1467,69 @@ static void init_fontconfig(void) } } -static void load_fontconfig_fonts(void) +static void fontconfig_add_fonts_from_dir_list( FcConfig *config, FcStrList *dir_list, FcStrSet *done_set, DWORD flags ) { - FcPattern *pat; - FcFontSet *fontset; - const char *format; + const FcChar8 *dir; + FcFontSet *font_set; + FcStrList *subdir_list = NULL; + FcStrSet *subdir_set = NULL; + FcCache *cache = NULL; int i; - char *file; - if (!fontconfig_enabled) return; - - pat = pFcPatternCreate(); - if (!pat) return; + TRACE( "(%p %p %p %#x)\n", config, dir_list, done_set, flags ); - fontset = pFcFontList(NULL, pat, NULL); - if (!fontset) + while ((dir = pFcStrListNext( dir_list ))) { - pFcPatternDestroy(pat); - return; + if (pFcStrSetMember( done_set, dir )) continue; + + TRACE( "adding fonts from %s\n", dir ); + if (!(cache = pFcDirCacheRead( dir, FcFalse, config ))) continue; + + if (!(font_set = pFcCacheCopySet( cache ))) goto done; + for (i = 0; i < font_set->nfont; i++) + fontconfig_add_font( font_set->fonts[i], flags ); + pFcFontSetDestroy( font_set ); + font_set = NULL; + + if (!(subdir_set = pFcStrSetCreate())) goto done; + for (i = 0; i < pFcCacheNumSubdir( cache ); i++) + pFcStrSetAdd( subdir_set, pFcCacheSubdir( cache, i ) ); + pFcDirCacheUnload( cache ); + cache = NULL; + + if (!(subdir_list = pFcStrListCreate( subdir_set ))) goto done; + pFcStrSetDestroy( subdir_set ); + subdir_set = NULL; + + pFcStrSetAdd( done_set, dir ); + fontconfig_add_fonts_from_dir_list( config, subdir_list, done_set, flags ); + pFcStrListDone( subdir_list ); + subdir_list = NULL; } - for(i = 0; i < fontset->nfont; i++) { - FcBool scalable; - DWORD aa_flags; - - if(pFcPatternGetString(fontset->fonts[i], FC_FILE, 0, (FcChar8**)&file) != FcResultMatch) - continue; - - pFcConfigSubstitute( NULL, fontset->fonts[i], FcMatchFont ); - - if(pFcPatternGetBool(fontset->fonts[i], FC_SCALABLE, 0, &scalable) == FcResultMatch && !scalable) - { - TRACE("not scalable\n"); - continue; - } +done: + if (font_set) pFcFontSetDestroy( font_set ); + if (subdir_list) pFcStrListDone( subdir_list ); + if (subdir_set) pFcStrSetDestroy( subdir_set ); + if (cache) pFcDirCacheUnload( cache ); +} - if (pFcPatternGetString( fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)&format ) != FcResultMatch) - { - TRACE( "ignoring unknown font format %s\n", debugstr_a(file) ); - continue; - } +static void load_fontconfig_fonts( void ) +{ + FcStrList *dir_list = NULL; + FcStrSet *done_set = NULL; + FcConfig *config; - if (!strcmp( format, "Type 1" )) - { - TRACE( "ignoring Type 1 font %s\n", debugstr_a(file) ); - continue; - } + if (!fontconfig_enabled) return; + if (!(config = pFcConfigGetCurrent())) goto done; + if (!(done_set = pFcStrSetCreate())) goto done; + if (!(dir_list = pFcConfigGetFontDirs( config ))) goto done; - aa_flags = parse_aa_pattern( fontset->fonts[i] ); - TRACE("fontconfig: %s aa %x\n", file, aa_flags); + fontconfig_add_fonts_from_dir_list( config, dir_list, done_set, ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE ); - AddFontToList( NULL, file, NULL, 0, - ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE | ADDFONT_AA_FLAGS(aa_flags) ); - } - pFcFontSetDestroy(fontset); - pFcPatternDestroy(pat); +done: + if (dir_list) pFcStrListDone( dir_list ); + if (done_set) pFcStrSetDestroy( done_set ); } #elif defined(HAVE_CARBON_CARBON_H)
1
0
0
0
Rémi Bernon : gdi32: Move FreeType face creation to AddFaceToList.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: d05e2bcaf6e47d94ac0a441c8c97ccd84e1b85bc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d05e2bcaf6e47d94ac0a441c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 20 10:40:40 2020 +0000 gdi32: Move FreeType face creation to AddFaceToList. So we can use it to add individual fontconfig fonts without iterating all faces. And rename it to add_unix_face. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/freetype.c | 127 ++++++++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 1722f0c746c..45b5e94d341 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1002,50 +1002,6 @@ static inline void get_fontsig( FT_Face ft_face, FONTSIGNATURE *fs ) } } -static int AddFaceToList(FT_Face ft_face, const WCHAR *file, void *data_ptr, SIZE_T data_size, - FT_Long face_index, DWORD flags ) -{ - struct bitmap_font_size size; - FONTSIGNATURE fs; - int ret; - WCHAR *family_name = ft_face_get_family_name( ft_face, system_lcid ); - WCHAR *second_name = ft_face_get_family_name( ft_face, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT) ); - WCHAR *style_name = ft_face_get_style_name( ft_face, system_lcid ); - WCHAR *full_name = ft_face_get_full_name( ft_face, system_lcid ); - - /* try to find another secondary name, preferring the lowest langids */ - if (!RtlCompareUnicodeStrings( family_name, lstrlenW(family_name), - second_name, lstrlenW(second_name), TRUE )) - { - RtlFreeHeap( GetProcessHeap(), 0, second_name ); - second_name = ft_face_get_family_name( ft_face, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ); - if (!RtlCompareUnicodeStrings( family_name, lstrlenW(family_name), - second_name, lstrlenW(second_name), TRUE )) - { - RtlFreeHeap( GetProcessHeap(), 0, second_name ); - second_name = NULL; - } - } - - get_fontsig( ft_face, &fs ); - if (!FT_IS_SCALABLE( ft_face )) get_bitmap_size( ft_face, &size ); - if (!HIWORD( flags )) flags |= ADDFONT_AA_FLAGS( default_aa_flags ); - - ret = callback_funcs->add_gdi_face( family_name, second_name, style_name, full_name, file, - data_ptr, data_size, face_index, fs, get_ntm_flags( ft_face ), - get_font_version( ft_face ), flags, - FT_IS_SCALABLE(ft_face) ? NULL : &size ); - - TRACE("fsCsb = %08x %08x/%08x %08x %08x %08x\n", - fs.fsCsb[0], fs.fsCsb[1], fs.fsUsb[0], fs.fsUsb[1], fs.fsUsb[2], fs.fsUsb[3]); - - RtlFreeHeap( GetProcessHeap(), 0, family_name ); - RtlFreeHeap( GetProcessHeap(), 0, second_name ); - RtlFreeHeap( GetProcessHeap(), 0, style_name ); - RtlFreeHeap( GetProcessHeap(), 0, full_name ); - return ret; -} - static FT_Face new_ft_face( const char *file, void *font_data_ptr, DWORD font_data_size, FT_Long face_index, BOOL allow_bitmap ) { @@ -1122,6 +1078,68 @@ fail: return NULL; } +static int add_unix_face( const char *unix_name, const WCHAR *file, void *data_ptr, SIZE_T data_size, + DWORD face_index, DWORD flags, DWORD *num_faces ) +{ + struct bitmap_font_size size; + FONTSIGNATURE fs; + FT_Face ft_face; + WCHAR *family_name, *second_name, *style_name, *full_name; + int ret; + + if (num_faces) *num_faces = 0; + + if (!(ft_face = new_ft_face( unix_name, data_ptr, data_size, face_index, flags & ADDFONT_ALLOW_BITMAP ))) + return 0; + + if (ft_face->family_name[0] == '.') /* Ignore fonts with names beginning with a dot */ + { + TRACE("Ignoring %s since its family name begins with a dot\n", debugstr_a(unix_name)); + pFT_Done_Face( ft_face ); + return 0; + } + + family_name = ft_face_get_family_name( ft_face, system_lcid ); + second_name = ft_face_get_family_name( ft_face, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT) ); + style_name = ft_face_get_style_name( ft_face, system_lcid ); + full_name = ft_face_get_full_name( ft_face, system_lcid ); + + /* try to find another secondary name, preferring the lowest langids */ + if (!RtlCompareUnicodeStrings( family_name, lstrlenW(family_name), + second_name, lstrlenW(second_name), TRUE )) + { + RtlFreeHeap( GetProcessHeap(), 0, second_name ); + second_name = ft_face_get_family_name( ft_face, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ); + if (!RtlCompareUnicodeStrings( family_name, lstrlenW(family_name), + second_name, lstrlenW(second_name), TRUE )) + { + RtlFreeHeap( GetProcessHeap(), 0, second_name ); + second_name = NULL; + } + } + + get_fontsig( ft_face, &fs ); + if (!FT_IS_SCALABLE( ft_face )) get_bitmap_size( ft_face, &size ); + if (!HIWORD( flags )) flags |= ADDFONT_AA_FLAGS( default_aa_flags ); + + ret = callback_funcs->add_gdi_face( family_name, second_name, style_name, full_name, file, + data_ptr, data_size, face_index, fs, get_ntm_flags( ft_face ), + get_font_version( ft_face ), flags, + FT_IS_SCALABLE(ft_face) ? NULL : &size ); + + TRACE("fsCsb = %08x %08x/%08x %08x %08x %08x\n", + fs.fsCsb[0], fs.fsCsb[1], fs.fsUsb[0], fs.fsUsb[1], fs.fsUsb[2], fs.fsUsb[3]); + + RtlFreeHeap( GetProcessHeap(), 0, family_name ); + RtlFreeHeap( GetProcessHeap(), 0, second_name ); + RtlFreeHeap( GetProcessHeap(), 0, style_name ); + RtlFreeHeap( GetProcessHeap(), 0, full_name ); + + if (num_faces) *num_faces = ft_face->num_faces; + pFT_Done_Face( ft_face ); + return ret; +} + static WCHAR *get_dos_file_name( LPCSTR str ) { WCHAR *buffer; @@ -1176,8 +1194,7 @@ static char *get_unix_file_name( LPCWSTR dosW ) static INT AddFontToList(const WCHAR *dos_name, const char *unix_name, void *font_data_ptr, DWORD font_data_size, DWORD flags) { - FT_Face ft_face; - FT_Long face_index = 0, num_faces; + DWORD face_index = 0, num_faces; INT ret = 0; WCHAR *filename = NULL; @@ -1207,22 +1224,10 @@ static INT AddFontToList(const WCHAR *dos_name, const char *unix_name, void *fon if (!dos_name && unix_name) dos_name = filename = get_dos_file_name( unix_name ); - do { - ft_face = new_ft_face( unix_name, font_data_ptr, font_data_size, face_index, flags & ADDFONT_ALLOW_BITMAP ); - if (!ft_face) break; - - if(ft_face->family_name[0] == '.') /* Ignore fonts with names beginning with a dot */ - { - TRACE("Ignoring %s since its family name begins with a dot\n", debugstr_a(unix_name)); - pFT_Done_Face(ft_face); - break; - } - - ret += AddFaceToList(ft_face, dos_name, font_data_ptr, font_data_size, face_index, flags); + do + ret += add_unix_face( unix_name, dos_name, font_data_ptr, font_data_size, face_index, flags, &num_faces ); + while (num_faces > ++face_index); - num_faces = ft_face->num_faces; - pFT_Done_Face(ft_face); - } while(num_faces > ++face_index); RtlFreeHeap( GetProcessHeap(), 0, filename ); return ret; }
1
0
0
0
Rémi Bernon : gdi32: Ignore Type 1 fonts in fontconfig enumeration.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 37c72ce2d6cdff13c521235cb961439565e543d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37c72ce2d6cdff13c521235c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 20 10:40:39 2020 +0000 gdi32: Ignore Type 1 fonts in fontconfig enumeration. Instead of loading the font with FreeType to discard it right away. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/freetype.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 61397e8b542..1722f0c746c 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1393,9 +1393,9 @@ static void load_fontconfig_fonts(void) { FcPattern *pat; FcFontSet *fontset; - int i, len; + const char *format; + int i; char *file; - const char *ext; if (!fontconfig_enabled) return; @@ -1418,25 +1418,29 @@ static void load_fontconfig_fonts(void) pFcConfigSubstitute( NULL, fontset->fonts[i], FcMatchFont ); - /* We're just interested in OT/TT fonts for now, so this hack just - picks up the scalable fonts without extensions .pf[ab] to save time - loading every other font */ - if(pFcPatternGetBool(fontset->fonts[i], FC_SCALABLE, 0, &scalable) == FcResultMatch && !scalable) { TRACE("not scalable\n"); continue; } + if (pFcPatternGetString( fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)&format ) != FcResultMatch) + { + TRACE( "ignoring unknown font format %s\n", debugstr_a(file) ); + continue; + } + + if (!strcmp( format, "Type 1" )) + { + TRACE( "ignoring Type 1 font %s\n", debugstr_a(file) ); + continue; + } + aa_flags = parse_aa_pattern( fontset->fonts[i] ); TRACE("fontconfig: %s aa %x\n", file, aa_flags); - len = strlen( file ); - if(len < 4) continue; - ext = &file[ len - 3 ]; - if(_strnicmp(ext, "pfa", -1) && _strnicmp(ext, "pfb", -1)) - AddFontToList(NULL, file, NULL, 0, - ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE | ADDFONT_AA_FLAGS(aa_flags) ); + AddFontToList( NULL, file, NULL, 0, + ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE | ADDFONT_AA_FLAGS(aa_flags) ); } pFcFontSetDestroy(fontset); pFcPatternDestroy(pat);
1
0
0
0
Alexandre Julliard : msvcrt: Use the public standard type definitions where possible in msvcrt.h.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 0edef50dfae4ec294a949654fa1e03700b954dcb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0edef50dfae4ec294a949654…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 20 12:35:52 2020 +0100 msvcrt: Use the public standard type definitions where possible in msvcrt.h. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/dir.c | 5 +- dlls/msvcrt/errno.c | 4 +- dlls/msvcrt/file.c | 8 +-- dlls/msvcrt/heap.c | 24 +++---- dlls/msvcrt/locale.c | 6 +- dlls/msvcrt/lock.c | 2 +- dlls/msvcrt/math.c | 20 +++--- dlls/msvcrt/misc.c | 2 +- dlls/msvcrt/msvcrt.h | 161 ++++++++++----------------------------------- dlls/msvcrt/scheduler.c | 4 +- dlls/msvcrt/thread.c | 8 +-- dlls/msvcrt/time.c | 30 +++++---- dlls/msvcrt/wcs.c | 4 +- include/msvcrt/sys/stat.h | 4 ++ include/msvcrt/sys/types.h | 4 ++ include/msvcrt/time.h | 2 +- 16 files changed, 104 insertions(+), 184 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0edef50dfae4ec294a94…
1
0
0
0
Alexandre Julliard : msvcrt: Move the fenv_t definition to the public header.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 34422eb56cad1ba799270bc6dd56f31bec86023a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34422eb56cad1ba799270bc6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 20 12:51:23 2020 +0100 msvcrt: Move the fenv_t definition to the public header. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr120/tests/msvcr120.c | 16 +++------ dlls/msvcrt/math.c | 81 +++++++++++++++++++++--------------------- dlls/msvcrt/msvcrt.h | 6 ---- include/msvcrt/fenv.h | 16 +++++++++ 4 files changed, 62 insertions(+), 57 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=34422eb56cad1ba79927…
1
0
0
0
Alexandre Julliard : msvcrt: Remove some duplicate definitions from msvcrt.h.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 1f11f41f613264dd5b937d0df0a3ee746db0517c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f11f41f613264dd5b937d0d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 20 12:44:42 2020 +0100 msvcrt: Remove some duplicate definitions from msvcrt.h. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/except_arm.c | 5 +- dlls/msvcrt/except_arm64.c | 5 +- dlls/msvcrt/except_i386.c | 5 +- dlls/msvcrt/except_x86_64.c | 5 +- dlls/msvcrt/locale.c | 2 + dlls/msvcrt/math.c | 1 + dlls/msvcrt/mbcs.c | 1 + dlls/msvcrt/msvcrt.h | 268 +------------------------------------------- 8 files changed, 17 insertions(+), 275 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1f11f41f613264dd5b93…
1
0
0
0
Alexandre Julliard : msvcrt: Avoid msvcrt-specific types in the Unix library interface.
by Alexandre Julliard
20 Nov '20
20 Nov '20
Module: wine Branch: master Commit: 8ecd9afc89269c3506f30585b92bbcce52dee4ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ecd9afc89269c3506f30585…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 20 11:20:04 2020 +0100 msvcrt: Avoid msvcrt-specific types in the Unix library interface. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/unixlib.c | 18 +++++++++--------- dlls/msvcrt/unixlib.h | 20 +++++++++----------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index b64355ebf16..3913d61048a 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -443,7 +443,7 @@ static double CDECL unix_jn(int n, double num) /********************************************************************* * ldexp */ -static double CDECL unix_ldexp(double num, MSVCRT_long exp) +static double CDECL unix_ldexp(double num, int exp) { return ldexp( num, exp ); } @@ -477,7 +477,7 @@ static float CDECL unix_lgammaf(float x) /********************************************************************* * llrint */ -static MSVCRT_longlong CDECL unix_llrint(double x) +static __int64 CDECL unix_llrint(double x) { return llrint(x); } @@ -485,7 +485,7 @@ static MSVCRT_longlong CDECL unix_llrint(double x) /********************************************************************* * llrintf */ -static MSVCRT_longlong CDECL unix_llrintf(float x) +static __int64 CDECL unix_llrintf(float x) { return llrintf(x); } @@ -589,7 +589,7 @@ static float CDECL unix_logbf( float x ) /********************************************************************* * lrint */ -static MSVCRT_long CDECL unix_lrint(double x) +static int CDECL unix_lrint(double x) { return lrint(x); } @@ -597,7 +597,7 @@ static MSVCRT_long CDECL unix_lrint(double x) /********************************************************************* * lrintf */ -static MSVCRT_long CDECL unix_lrintf(float x) +static int CDECL unix_lrintf(float x) { return lrintf(x); } @@ -795,7 +795,7 @@ static float CDECL unix_roundf(float x) /********************************************************************* * lround */ -static MSVCRT_long CDECL unix_lround(double x) +static int CDECL unix_lround(double x) { #ifdef HAVE_LROUND return lround(x); @@ -807,7 +807,7 @@ static MSVCRT_long CDECL unix_lround(double x) /********************************************************************* * lroundf */ -static MSVCRT_long CDECL unix_lroundf(float x) +static int CDECL unix_lroundf(float x) { #ifdef HAVE_LROUNDF return lroundf(x); @@ -819,7 +819,7 @@ static MSVCRT_long CDECL unix_lroundf(float x) /********************************************************************* * llround */ -static MSVCRT_longlong CDECL unix_llround(double x) +static __int64 CDECL unix_llround(double x) { #ifdef HAVE_LLROUND return llround(x); @@ -831,7 +831,7 @@ static MSVCRT_longlong CDECL unix_llround(double x) /********************************************************************* * llroundf */ -static MSVCRT_longlong CDECL unix_llroundf(float x) +static __int64 CDECL unix_llroundf(float x) { #ifdef HAVE_LLROUNDF return llroundf(x); diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index cfad08aee0b..b506151664f 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -21,8 +21,6 @@ #ifndef __UNIXLIB_H #define __UNIXLIB_H -#include "msvcrt.h" - struct unix_funcs { double (CDECL *acosh)(double x); @@ -62,13 +60,13 @@ struct unix_funcs double (CDECL *j0)(double num); double (CDECL *j1)(double num); double (CDECL *jn)(int n, double num); - double (CDECL *ldexp)(double x, MSVCRT_long exp); + double (CDECL *ldexp)(double x, int exp); double (CDECL *lgamma)(double x); float (CDECL *lgammaf)(float x); - MSVCRT_longlong (CDECL *llrint)(double x); - MSVCRT_longlong (CDECL *llrintf)(float x); - MSVCRT_longlong (CDECL *llround)(double x); - MSVCRT_longlong (CDECL *llroundf)(float x); + __int64 (CDECL *llrint)(double x); + __int64 (CDECL *llrintf)(float x); + __int64 (CDECL *llround)(double x); + __int64 (CDECL *llroundf)(float x); double (CDECL *log)(double x); float (CDECL *logf)(float x); double (CDECL *log10)(double x); @@ -79,10 +77,10 @@ struct unix_funcs float (CDECL *log2f)(float x); double (CDECL *logb)(double x); float (CDECL *logbf)(float x); - MSVCRT_long (CDECL *lrint)(double x); - MSVCRT_long (CDECL *lrintf)(float x); - MSVCRT_long (CDECL *lround)(double x); - MSVCRT_long (CDECL *lroundf)(float x); + int (CDECL *lrint)(double x); + int (CDECL *lrintf)(float x); + int (CDECL *lround)(double x); + int (CDECL *lroundf)(float x); double (CDECL *modf)(double x, double *iptr); float (CDECL *modff)(float x, float *iptr); double (CDECL *nearbyint)(double num);
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
86
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
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200