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
Alexandre Julliard : gdi32: Move the SelectFont() implementation out of freetype.c.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 53acdd5a8ae18aca11483fe2c1653e1d7d17a233 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=53acdd5a8ae18aca11483fe2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 4 09:20:26 2020 +0100 gdi32: Move the SelectFont() implementation out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 192 +++++++++++++++++++++++++++++++++++++++++++---- dlls/gdi32/freetype.c | 191 ---------------------------------------------- dlls/gdi32/gdi_private.h | 16 ---- 3 files changed, 178 insertions(+), 221 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=53acdd5a8ae18aca1148…
1
0
0
0
Alexandre Julliard : gdi32: Move the rest of the font matching code out of freetype.c.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 3b87839ec92ffd09baf077583321464c388a8e23 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b87839ec92ffd09baf07758…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 4 09:18:59 2020 +0100 gdi32: Move the rest of the font matching code out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 62 ++++++++++++++++++++++++++++++++++++++++++++---- dlls/gdi32/freetype.c | 60 ++++------------------------------------------ dlls/gdi32/gdi_private.h | 6 ++--- 3 files changed, 65 insertions(+), 63 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 55030bf95bf..47d52f6c3dc 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1461,8 +1461,9 @@ static struct gdi_font_face *find_best_matching_face( const struct gdi_font_fami return best->scalable ? best : best_bitmap; } -struct gdi_font_face *find_matching_face_by_name( const WCHAR *name, const WCHAR *subst, const LOGFONTW *lf, - FONTSIGNATURE fs, BOOL can_use_bitmap ) +static struct gdi_font_face *find_matching_face_by_name( const WCHAR *name, const WCHAR *subst, + const LOGFONTW *lf, FONTSIGNATURE fs, + BOOL can_use_bitmap ) { struct gdi_font_family *family; struct gdi_font_face *face; @@ -1489,8 +1490,8 @@ struct gdi_font_face *find_matching_face_by_name( const WCHAR *name, const WCHAR return NULL; } -struct gdi_font_face *find_any_face( const LOGFONTW *lf, FONTSIGNATURE fs, - BOOL can_use_bitmap, BOOL want_vertical ) +static struct gdi_font_face *find_any_face( const LOGFONTW *lf, FONTSIGNATURE fs, + BOOL can_use_bitmap, BOOL want_vertical ) { struct gdi_font_family *family; struct gdi_font_face *face; @@ -1524,6 +1525,59 @@ struct gdi_font_face *find_any_face( const LOGFONTW *lf, FONTSIGNATURE fs, return NULL; } +struct gdi_font_face *find_matching_face( LOGFONTW *lf, CHARSETINFO *csi, BOOL can_use_bitmap, + const WCHAR **orig_name ) +{ + BOOL want_vertical = (lf->lfFaceName[0] == '@'); + struct gdi_font_face *face; + + if (!TranslateCharsetInfo( (DWORD *)(INT_PTR)lf->lfCharSet, csi, TCI_SRCCHARSET )) + { + if (lf->lfCharSet != DEFAULT_CHARSET) FIXME( "Untranslated charset %d\n", lf->lfCharSet ); + csi->fs.fsCsb[0] = 0; + } + + if (lf->lfFaceName[0]) + { + int subst_charset; + const WCHAR *subst = get_gdi_font_subst( lf->lfFaceName, lf->lfCharSet, &subst_charset ); + + if (subst) + { + TRACE( "substituting %s,%d -> %s,%d\n", debugstr_w(lf->lfFaceName), lf->lfCharSet, + debugstr_w(subst), (subst_charset != -1) ? subst_charset : lf->lfCharSet ); + if (subst_charset != -1) lf->lfCharSet = subst_charset; + *orig_name = lf->lfFaceName; + } + + if ((face = find_matching_face_by_name( lf->lfFaceName, subst, lf, csi->fs, can_use_bitmap ))) + return face; + } + *orig_name = NULL; /* substitution is no longer relevant */ + + /* If requested charset was DEFAULT_CHARSET then try using charset + corresponding to the current ansi codepage */ + if (!csi->fs.fsCsb[0]) + { + INT acp = GetACP(); + if (!TranslateCharsetInfo( (DWORD *)(INT_PTR)acp, csi, TCI_SRCCODEPAGE )) + { + FIXME( "TCI failed on codepage %d\n", acp ); + csi->fs.fsCsb[0] = 0; + } + else lf->lfCharSet = csi->ciCharset; + } + + if ((face = find_any_face( lf, csi->fs, can_use_bitmap, want_vertical ))) return face; + if (csi->fs.fsCsb[0]) + { + csi->fs.fsCsb[0] = 0; + if ((face = find_any_face( lf, csi->fs, can_use_bitmap, want_vertical ))) return face; + } + if (want_vertical && (face = find_any_face( lf, csi->fs, can_use_bitmap, FALSE ))) return face; + return NULL; +} + /* realized font objects */ #define FIRST_FONT_HANDLE 1 diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 464d58df09c..46ab0b9f6d7 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -2217,9 +2217,8 @@ static struct gdi_font * CDECL freetype_SelectFont( DC *dc, HFONT hfont ) { struct gdi_font *font; Face *face; - Family *family; INT height; - BOOL can_use_bitmap, want_vertical; + BOOL can_use_bitmap; LOGFONTW lf; CHARSETINFO csi; FMAT2 dcmat; @@ -2279,61 +2278,12 @@ static struct gdi_font * CDECL freetype_SelectFont( DC *dc, HFONT hfont ) if(!strcmpiW(lf.lfFaceName, SymbolW)) lf.lfCharSet = SYMBOL_CHARSET; - if(!TranslateCharsetInfo((DWORD*)(INT_PTR)lf.lfCharSet, &csi, TCI_SRCCHARSET)) { - switch(lf.lfCharSet) { - case DEFAULT_CHARSET: - csi.fs.fsCsb[0] = 0; - break; - default: - FIXME("Untranslated charset %d\n", lf.lfCharSet); - csi.fs.fsCsb[0] = 0; - break; - } - } - - family = NULL; - if(lf.lfFaceName[0] != '\0') { - LPWSTR FaceName = lf.lfFaceName; - int subst_charset; - const WCHAR *subst = get_gdi_font_subst( FaceName, lf.lfCharSet, &subst_charset ); - - if(subst) { - TRACE("substituting %s,%d -> %s,%d\n", debugstr_w(FaceName), lf.lfCharSet, - debugstr_w(subst), (subst_charset != -1) ? subst_charset : lf.lfCharSet); - if (subst_charset != -1) lf.lfCharSet = subst_charset; - orig_name = FaceName; - } - - if ((face = find_matching_face_by_name( FaceName, subst, &lf, csi.fs, can_use_bitmap ))) - goto found_face; - } - - orig_name = NULL; /* substitution is no longer relevant */ - - /* If requested charset was DEFAULT_CHARSET then try using charset - corresponding to the current ansi codepage */ - if (!csi.fs.fsCsb[0]) + if (!(face = find_matching_face( &lf, &csi, can_use_bitmap, &orig_name ))) { - INT acp = GetACP(); - if(!TranslateCharsetInfo((DWORD*)(INT_PTR)acp, &csi, TCI_SRCCODEPAGE)) { - FIXME("TCI failed on codepage %d\n", acp); - csi.fs.fsCsb[0] = 0; - } else - lf.lfCharSet = csi.ciCharset; + FIXME("can't find a single appropriate font - bailing\n"); + return NULL; } - - want_vertical = (lf.lfFaceName[0] == '@'); - - if ((face = find_any_face( &lf, csi.fs, can_use_bitmap, want_vertical ))) goto found_face; - csi.fs.fsCsb[0] = 0; - if ((face = find_any_face( &lf, csi.fs, can_use_bitmap, want_vertical ))) goto found_face; - if (want_vertical && (face = find_any_face( &lf, csi.fs, can_use_bitmap, FALSE ))) goto found_face; - FIXME("can't find a single appropriate font - bailing\n"); - return NULL; - -found_face: height = lf.lfHeight; - family = face->family; TRACE("not in cache\n"); font = create_gdi_font( face, orig_name, &lf ); @@ -2345,7 +2295,7 @@ found_face: font->codepage = csi.ciACP; } else - font->charset = get_nearest_charset( family->family_name, face, &font->codepage ); + font->charset = get_nearest_charset( face->family->family_name, face, &font->codepage ); TRACE( "Chosen: %s (%s/%p:%u)\n", debugstr_w(face->full_name), debugstr_w(face->file), face->data_ptr, face->face_index ); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index ef98fa0e8fd..48bf823ff92 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -459,10 +459,8 @@ extern int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name, extern struct gdi_font_link *find_gdi_font_link( const WCHAR *name ) DECLSPEC_HIDDEN; extern void create_child_font_list( struct gdi_font *font ) DECLSPEC_HIDDEN; -extern struct gdi_font_face *find_matching_face_by_name( const WCHAR *name, const WCHAR *subst, const LOGFONTW *lf, - FONTSIGNATURE fs, BOOL can_use_bitmap ) DECLSPEC_HIDDEN; -extern struct gdi_font_face *find_any_face( const LOGFONTW *lf, FONTSIGNATURE fs, - BOOL can_use_bitmap, BOOL want_vertical ) DECLSPEC_HIDDEN; +extern struct gdi_font_face *find_matching_face( LOGFONTW *lf, CHARSETINFO *csi, BOOL can_use_bitmap, + const WCHAR **orig_name ) DECLSPEC_HIDDEN; extern void free_gdi_font( struct gdi_font *font ) DECLSPEC_HIDDEN; extern void cache_gdi_font( struct gdi_font *font ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : gdi32: Move the handling of font family fallbacks out of freetype.c.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 4cddf0d47d68cc7f548fcd358fff28ca9b65ea87 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4cddf0d47d68cc7f548fcd35…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 4 09:16:19 2020 +0100 gdi32: Move the handling of font family fallbacks out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 71 +++++++++++++++++++--------- dlls/gdi32/freetype.c | 118 ++++++++++++++++------------------------------- dlls/gdi32/gdi_private.h | 4 +- 3 files changed, 90 insertions(+), 103 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4cddf0d47d68cc7f548f…
1
0
0
0
Alexandre Julliard : gdi32: Add some helper functions for font matching.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: caf0b9c082488f87abfddb7a37a3e19e64e4b514 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=caf0b9c082488f87abfddb7a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 4 09:15:06 2020 +0100 gdi32: Add some helper functions for font matching. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 142 +++++++++++++++++++++++------ dlls/gdi32/freetype.c | 232 +++++++---------------------------------------- dlls/gdi32/gdi_private.h | 8 +- 3 files changed, 151 insertions(+), 231 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=caf0b9c082488f87abfd…
1
0
0
0
Alexandre Julliard : gdi32: Move the remove_font() function out of freetype.c.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 6c5dc58a82fbf923f3e8d10801642b280a4050c6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c5dc58a82fbf923f3e8d108…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 4 09:12:24 2020 +0100 gdi32: Move the remove_font() function out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 44 ++++++++++++++++++++++++++++++++------------ dlls/gdi32/freetype.c | 29 ----------------------------- dlls/gdi32/gdi_private.h | 3 --- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 6369ffeb7b4..ef552bfc896 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -574,7 +574,7 @@ static struct gdi_font_family *create_family( const WCHAR *name, const WCHAR *se return family; } -void release_family( struct gdi_font_family *family ) +static void release_family( struct gdi_font_family *family ) { if (--family->refcount) return; assert( list_empty( &family->faces )); @@ -754,7 +754,7 @@ static void reorder_font_list(void) default_sans = set_default_family( default_sans_list ); } -void release_face( struct gdi_font_face *face ) +static void release_face( struct gdi_font_face *face ) { if (--face->refcount) return; if (face->family) @@ -770,6 +770,33 @@ void release_face( struct gdi_font_face *face ) HeapFree( GetProcessHeap(), 0, face ); } +static int remove_font( const WCHAR *file, DWORD flags ) +{ + struct gdi_font_family *family, *family_next; + struct gdi_font_face *face, *face_next; + int count = 0; + + EnterCriticalSection( &font_cs ); + LIST_FOR_EACH_ENTRY_SAFE( family, family_next, &font_list, struct gdi_font_family, entry ) + { + family->refcount++; + LIST_FOR_EACH_ENTRY_SAFE( face, face_next, &family->faces, struct gdi_font_face, entry ) + { + if (!face->file) continue; + if (LOWORD(face->flags) != LOWORD(flags)) continue; + if (!strcmpiW( face->file, file )) + { + TRACE( "removing matching face %s refcount %d\n", debugstr_w(face->file), face->refcount ); + release_face( face ); + count++; + } + } + release_family( family ); + } + LeaveCriticalSection( &font_cs ); + return count; +} + static inline BOOL faces_equal( const struct gdi_font_face *f1, const struct gdi_font_face *f2 ) { if (strcmpiW( f1->full_name, f2->full_name )) return FALSE; @@ -7351,15 +7378,10 @@ static BOOL remove_system_font_resource( LPCWSTR file, DWORD flags ) int ret; get_fonts_win_dir_path( file, path ); - EnterCriticalSection( &font_cs ); - ret = font_funcs->remove_font( path, flags ); - LeaveCriticalSection( &font_cs ); - if (!ret) + if (!(ret = remove_font( path, flags ))) { get_fonts_data_dir_path( file, path ); - EnterCriticalSection( &font_cs ); - ret = font_funcs->remove_font( path, flags ); - LeaveCriticalSection( &font_cs ); + ret = remove_font( path, flags ); } return ret; } @@ -7395,9 +7417,7 @@ static BOOL remove_font_resource( LPCWSTR file, DWORD flags ) DWORD addfont_flags = ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_RESOURCE; if (!(flags & FR_PRIVATE)) addfont_flags |= ADDFONT_ADD_TO_CACHE; - EnterCriticalSection( &font_cs ); - ret = font_funcs->remove_font( path, addfont_flags ); - LeaveCriticalSection( &font_cs ); + ret = remove_font( path, addfont_flags ); } if (!ret && !strchrW( file, '\\' )) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 755f1286eda..83fe76115ef 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1178,34 +1178,6 @@ static INT CDECL freetype_add_mem_font( void *ptr, SIZE_T size, DWORD flags ) return AddFontToList( NULL, NULL, ptr, size, flags ); } -/************************************************************* - * freetype_remove_font - */ -static INT CDECL freetype_remove_font( const WCHAR *file, DWORD flags ) -{ - Family *family, *family_next; - Face *face, *face_next; - int count = 0; - - LIST_FOR_EACH_ENTRY_SAFE( family, family_next, &font_list, Family, entry ) - { - family->refcount++; - LIST_FOR_EACH_ENTRY_SAFE( face, face_next, &family->faces, Face, entry ) - { - if (!face->file) continue; - if (LOWORD(face->flags) != LOWORD(flags)) continue; - if (!strcmpiW( face->file, file )) - { - TRACE( "removing matching face %s refcount %d\n", debugstr_w(face->file), face->refcount ); - release_face( face ); - count++; - } - } - release_family( family ); - } - return count; -} - #ifdef __ANDROID__ static BOOL ReadFontDir(const char *dirname, BOOL external_fonts) { @@ -4431,7 +4403,6 @@ static const struct font_backend_funcs font_funcs = freetype_load_fonts, freetype_add_font, freetype_add_mem_font, - freetype_remove_font, freetype_load_font, freetype_get_font_data, freetype_get_aa_flags, diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 1afbddf603a..7147d8ebc41 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -430,7 +430,6 @@ struct font_backend_funcs void (CDECL *load_fonts)(void); INT (CDECL *add_font)( const WCHAR *file, DWORD flags ); INT (CDECL *add_mem_font)( void *ptr, SIZE_T size, DWORD flags ); - BOOL (CDECL *remove_font)( const WCHAR *file, DWORD flags ); BOOL (CDECL *load_font)( struct gdi_font *gdi_font ); DWORD (CDECL *get_font_data)( struct gdi_font *gdi_font, DWORD table, DWORD offset, @@ -452,9 +451,7 @@ struct font_backend_funcs extern const WCHAR *get_gdi_font_subst( const WCHAR *from_name, int from_charset, int *to_charset ) DECLSPEC_HIDDEN; extern struct list font_list DECLSPEC_HIDDEN; -extern void release_family( struct gdi_font_family *family ) DECLSPEC_HIDDEN; extern struct gdi_font_family *find_family_from_any_name( const WCHAR *name ) DECLSPEC_HIDDEN; -extern void release_face( struct gdi_font_face *face ) DECLSPEC_HIDDEN; extern int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name, const WCHAR *style, const WCHAR *fullname, const WCHAR *file, void *data_ptr, SIZE_T data_size, UINT index, FONTSIGNATURE fs,
1
0
0
0
Anton Baskanov : amstream: Implement MediaStreamFilter::WaitUntil.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 28764bd0c56257428e50ef2ce4805d42e1882362 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=28764bd0c56257428e50ef2c…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu Oct 29 11:40:59 2020 +0700 amstream: Implement MediaStreamFilter::WaitUntil. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/filter.c | 87 +++++++++++++++++++- dlls/amstream/tests/amstream.c | 179 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 260 insertions(+), 6 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=28764bd0c56257428e50…
1
0
0
0
Anton Baskanov : amstream: Release filter critical section before calling upstream seeking methods.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 8492657ab85ad31102509ff5e257033da07ac56d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8492657ab85ad31102509ff5…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu Oct 29 11:40:58 2020 +0700 amstream: Release filter critical section before calling upstream seeking methods. Otherwise a seek might deadlock when the stream calls the filter methods (e.g. WaitUntil) from streaming thread. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/filter.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index b63a0301d64..daeb1fafe71 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -795,15 +795,16 @@ static HRESULT WINAPI filter_seeking_GetDuration(IMediaSeeking *iface, LONGLONG EnterCriticalSection(&filter->cs); - if (!(seeking = get_seeking(filter->seekable_stream))) - { - LeaveCriticalSection(&filter->cs); + seeking = get_seeking(filter->seekable_stream); + + LeaveCriticalSection(&filter->cs); + + if (!seeking) return E_NOTIMPL; - } + hr = IMediaSeeking_GetDuration(seeking, duration); IMediaSeeking_Release(seeking); - LeaveCriticalSection(&filter->cs); return hr; } @@ -817,15 +818,16 @@ static HRESULT WINAPI filter_seeking_GetStopPosition(IMediaSeeking *iface, LONGL EnterCriticalSection(&filter->cs); - if (!(seeking = get_seeking(filter->seekable_stream))) - { - LeaveCriticalSection(&filter->cs); + seeking = get_seeking(filter->seekable_stream); + + LeaveCriticalSection(&filter->cs); + + if (!seeking) return E_NOTIMPL; - } + hr = IMediaSeeking_GetStopPosition(seeking, stop); IMediaSeeking_Release(seeking); - LeaveCriticalSection(&filter->cs); return hr; } @@ -860,18 +862,15 @@ static HRESULT WINAPI filter_seeking_SetPositions(IMediaSeeking *iface, LONGLONG seeking = get_seeking(filter->seekable_stream); + LeaveCriticalSection(&filter->cs); + if (!seeking) - { - LeaveCriticalSection(&filter->cs); return E_NOTIMPL; - } hr = IMediaSeeking_SetPositions(seeking, current_ptr, current_flags, stop_ptr, stop_flags); IMediaSeeking_Release(seeking); - LeaveCriticalSection(&filter->cs); - return hr; }
1
0
0
0
Matteo Bruni : winemac: Update the stored display settings immediately.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: f2cfd63cdac27b653c99829b780de54f16058bb8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2cfd63cdac27b653c99829b…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Nov 2 19:03:09 2020 +0100 winemac: Update the stored display settings immediately. Instead of after sending the WM_MACDRV_UPDATE_DESKTOP_RECT message. Specifically ddraw reacts to the followup messages and expects to get the new display rects inside the message handler. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index f6390becea7..6706c88341c 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -996,6 +996,8 @@ better: size_t width = CGDisplayModeGetWidth(best_display_mode); size_t height = CGDisplayModeGetHeight(best_display_mode); + macdrv_init_display_devices(TRUE); + if (best_is_original && retina_enabled) { width *= 2; @@ -1005,8 +1007,6 @@ better: SendMessageW(GetDesktopWindow(), WM_MACDRV_UPDATE_DESKTOP_RECT, mode_bpp, MAKELPARAM(width, height)); ret = DISP_CHANGE_SUCCESSFUL; - - macdrv_init_display_devices(TRUE); } else {
1
0
0
0
Aurimas Fišeras : po: Update Lithuanian translation.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: dd7109136c28ae56998f96bc22c519b5cdb9534c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dd7109136c28ae56998f96bc…
Author: Aurimas Fišeras <aurimas(a)members.fsf.org> Date: Wed Nov 4 09:28:13 2020 +0200 po: Update Lithuanian translation. Signed-off-by: Aurimas Fišeras <aurimas(a)members.fsf.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/lt.po | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/po/lt.po b/po/lt.po index 20e169acf25..6535c85c79f 100644 --- a/po/lt.po +++ b/po/lt.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2020-10-30 23:36+0200\n" +"PO-Revision-Date: 2020-11-04 09:28+0200\n" "Last-Translator: Aurimas Fišeras <aurimas(a)members.fsf.org>\n" "Language-Team: Lithuanian <komp_lt(a)konf.lt>\n" "Language: lt\n" @@ -6932,10 +6932,8 @@ msgid "Not implemented.\n" msgstr "Nerealizuota.\n" #: dlls/kernel32/winerror.mc:3788 -#, fuzzy -#| msgid "RPC call failed.\n" msgid "Call failed.\n" -msgstr "RPC kreipinys nepavyko.\n" +msgstr "Kreipinys nepavyko.\n" #: dlls/kernel32/winerror.mc:3760 msgid "No Signature found in file.\n"
1
0
0
0
Huw Davies : riched20: Pass paragraph ptrs to the para marking function.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: eb6b188a94054dbe5aaacde35d175c6ef26653cb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb6b188a94054dbe5aaacde3…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 06:56:26 2020 +0000 riched20: Pass paragraph ptrs to the para marking function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 4 ++-- dlls/riched20/editor.h | 2 +- dlls/riched20/paint.c | 2 +- dlls/riched20/para.c | 16 ++++++++-------- dlls/riched20/style.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 41906d28e4c..b27bab48738 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4126,7 +4126,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_SetDefaultCharFormat(editor, &fmt); ME_CommitUndo(editor); - ME_MarkAllForWrapping(editor); + editor_mark_rewrap_all( editor ); ME_WrapMarkedParagraphs(editor); ME_UpdateScrollBar(editor); if (bRepaint) @@ -4771,7 +4771,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_SetDefaultFormatRect(editor); editor->bDefaultFormatRect = TRUE; } - ME_MarkAllForWrapping(editor); + editor_mark_rewrap_all( editor ); ME_WrapMarkedParagraphs(editor); ME_UpdateScrollBar(editor); if (msg != EM_SETRECTNP) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 05a6a7ee37f..24e750be1de 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -204,13 +204,13 @@ void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN; /* para.c */ void editor_get_selection_paras(ME_TextEditor *editor, ME_Paragraph **para, ME_Paragraph **para_end ) DECLSPEC_HIDDEN; void editor_get_selection_para_fmt( ME_TextEditor *editor, PARAFORMAT2 *fmt ) DECLSPEC_HIDDEN; +void editor_mark_rewrap_all( ME_TextEditor *editor ) DECLSPEC_HIDDEN; void editor_set_default_para_fmt(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; BOOL editor_set_selection_para_fmt( ME_TextEditor *editor, const PARAFORMAT2 *fmt ) DECLSPEC_HIDDEN; ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN; void ME_MakeFirstParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_DumpParaStyle(ME_Paragraph *s) DECLSPEC_HIDDEN; void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) DECLSPEC_HIDDEN; -void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN; int get_total_width(ME_TextEditor *editor) DECLSPEC_HIDDEN; ME_Cell *para_cell( ME_Paragraph *para ) DECLSPEC_HIDDEN; void para_destroy( ME_TextEditor *editor, ME_Paragraph *item ) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index d15c47b72aa..6228c760295 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -138,7 +138,7 @@ ME_RewrapRepaint(ME_TextEditor *editor) /* RewrapRepaint should be called whenever the control has changed in * looks, but not content. Like resizing. */ - ME_MarkAllForWrapping(editor); + editor_mark_rewrap_all( editor ); ME_WrapMarkedParagraphs(editor); ME_UpdateScrollBar(editor); ME_Repaint(editor); diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 4348530bbdb..e7c3c6934b9 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -225,18 +225,18 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) ME_DestroyContext(&c); } -static void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last) +static void para_mark_rewrap_paras( ME_TextEditor *editor, ME_Paragraph *first, const ME_Paragraph *end ) { - while(first != last) - { - para_mark_rewrap( editor, &first->member.para ); - first = first->member.para.next_para; - } + while (first != end) + { + para_mark_rewrap( editor, first ); + first = para_next( first ); + } } -void ME_MarkAllForWrapping(ME_TextEditor *editor) +void editor_mark_rewrap_all( ME_TextEditor *editor ) { - ME_MarkForWrapping(editor, editor->pBuffer->pFirst->member.para.next_para, editor->pBuffer->pLast); + para_mark_rewrap_paras( editor, editor_first_para( editor ), editor_end_para( editor ) ); } static void table_update_flags( ME_Paragraph *para ) diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index fbbe29dce14..95d3d3b6b29 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -536,5 +536,5 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) } ScriptFreeCache( &def->script_cache ); ME_ReleaseStyle( style ); - ME_MarkAllForWrapping( editor ); + editor_mark_rewrap_all( editor ); }
1
0
0
0
← Newer
1
...
74
75
76
77
78
79
80
...
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