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: Update the Windows font registry keys only when they have changed.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: 000e32f18362d2c0cb17c04cf1c79d3789dccf7b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=000e32f18362d2c0cb17c04c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:28:20 2020 +0100 gdi32: Update the Windows font registry keys only when they have changed. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 217 ++++++++++++++++++++++++++++++++++++++--------- dlls/gdi32/freetype.c | 191 ----------------------------------------- dlls/gdi32/gdi_private.h | 4 - 3 files changed, 176 insertions(+), 236 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=000e32f18362d2c0cb17…
1
0
0
0
Alexandre Julliard : gdi32: Add a helper function to create a face.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: a6f0349e8483ad388b28f239b3e397842b9bdc8e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6f0349e8483ad388b28f239…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:27:21 2020 +0100 gdi32: Add a helper function to create a face. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 142 ++++++++++++++++++++++++++++++++++------------- dlls/gdi32/freetype.c | 115 ++++++++------------------------------ dlls/gdi32/gdi_private.h | 12 ++-- 3 files changed, 132 insertions(+), 137 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a6f0349e8483ad388b28…
1
0
0
0
Alexandre Julliard : gdi32: Move the font cache out of freetype.c.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: 19d13d0004db90e311cdb68c8d8026629f82a482 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=19d13d0004db90e311cdb68c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:26:39 2020 +0100 gdi32: Move the font cache out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 293 ++++++++++++++++++++++++++++++++++++++++- dlls/gdi32/freetype.c | 336 +---------------------------------------------- dlls/gdi32/gdi_private.h | 3 + 3 files changed, 300 insertions(+), 332 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=19d13d0004db90e311cd…
1
0
0
0
Alexandre Julliard : gdi32: Add a separate backend function to load the font list.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: a84c60ed2ad79cc3cc6e57cfd4989b701e9be5d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a84c60ed2ad79cc3cc6e57cf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:26:12 2020 +0100 gdi32: Add a separate backend function to load the font list. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 11 ++++++++++- dlls/gdi32/freetype.c | 41 ++++++++++++++++++----------------------- dlls/gdi32/gdi_private.h | 1 + 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 26f183e4864..7bb0f513ca7 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -3238,13 +3238,22 @@ static void init_font_options(void) */ void font_init(void) { + static const WCHAR mutex_nameW[] = {'_','_','W','I','N','E','_','F','O','N','T','_','M','U','T','E','X','_','_',0}; + HANDLE mutex; + if (RegCreateKeyExA( HKEY_CURRENT_USER, "Software\\Wine\\Fonts", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &wine_fonts_key, NULL )) return; init_font_options(); update_codepage(); - WineEngInit( &font_funcs ); + if (!WineEngInit( &font_funcs )) return; + + if (!(mutex = CreateMutexW( NULL, FALSE, mutex_nameW ))) return; + WaitForSingleObject( mutex, INFINITE ); + font_funcs->load_fonts(); + ReleaseMutex( mutex ); + reorder_font_list(); load_gdi_font_subst(); load_gdi_font_replacements(); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 50df968226b..dea032b7185 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -286,8 +286,6 @@ static struct list mappings_list = LIST_INIT( mappings_list ); static UINT default_aa_flags; static HKEY hkey_font_cache; -static const WCHAR font_mutex_nameW[] = {'_','_','W','I','N','E','_','F','O','N','T','_','M','U','T','E','X','_','_','\0'}; - static BOOL CDECL freetype_set_outline_text_metrics( struct gdi_font *font ); static BOOL CDECL freetype_set_bitmap_text_metrics( struct gdi_font *font ); static void remove_face_from_cache( Face *face ); @@ -2168,29 +2166,11 @@ static void init_font_list(void) } /************************************************************* - * WineEngInit - * - * Initialize FreeType library and create a list of available faces + * freetype_load_fonts */ -BOOL WineEngInit( const struct font_backend_funcs **funcs ) +static void CDECL freetype_load_fonts(void) { DWORD disposition; - HANDLE font_mutex; - - if(!init_freetype()) return FALSE; - -#ifdef SONAME_LIBFONTCONFIG - init_fontconfig(); -#endif - - *funcs = &font_funcs; - - if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL) - { - ERR("Failed to create font mutex\n"); - return FALSE; - } - WaitForSingleObject(font_mutex, INFINITE); create_font_cache_key(&hkey_font_cache, &disposition); @@ -2201,8 +2181,22 @@ BOOL WineEngInit( const struct font_backend_funcs **funcs ) if(disposition == REG_CREATED_NEW_KEY) update_reg_entries(); +} + +/************************************************************* + * WineEngInit + * + * Initialize FreeType library and create a list of available faces + */ +BOOL WineEngInit( const struct font_backend_funcs **funcs ) +{ + if(!init_freetype()) return FALSE; + +#ifdef SONAME_LIBFONTCONFIG + init_fontconfig(); +#endif - ReleaseMutex(font_mutex); + *funcs = &font_funcs; return TRUE; } @@ -5020,6 +5014,7 @@ static DWORD CDECL freetype_get_kerning_pairs( struct gdi_font *font, KERNINGPAI static const struct font_backend_funcs font_funcs = { freetype_SelectFont, + freetype_load_fonts, freetype_add_font, freetype_add_mem_font, freetype_remove_font, diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 4350be34851..f77ed4ec345 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -427,6 +427,7 @@ struct font_backend_funcs { struct gdi_font * (CDECL *pSelectFont)( DC *dc, HFONT hfont ); + 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 );
1
0
0
0
Alexandre Julliard : gdi32: Move the font list reordering out of freetype.c.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: fc44dcdd03b0ec88f38b988849f4830b92b93879 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc44dcdd03b0ec88f38b9888…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:25:47 2020 +0100 gdi32: Move the font list reordering out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 59 +++++++++++++++++++++++++++++++++++++ dlls/gdi32/freetype.c | 75 ------------------------------------------------ dlls/gdi32/gdi_private.h | 3 ++ 3 files changed, 62 insertions(+), 75 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index cf27f6063ee..26f183e4864 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -225,6 +225,42 @@ static const WCHAR Gulim[] = {'G','u','l','i','m',0}; static const WCHAR PMingLiU[] = {'P','M','i','n','g','L','i','U',0}; static const WCHAR Batang[] = {'B','a','t','a','n','g',0}; +static const WCHAR arial[] = {'A','r','i','a','l',0}; +static const WCHAR bitstream_vera_sans[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',0}; +static const WCHAR bitstream_vera_sans_mono[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',' ','M','o','n','o',0}; +static const WCHAR bitstream_vera_serif[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','e','r','i','f',0}; +static const WCHAR courier_new[] = {'C','o','u','r','i','e','r',' ','N','e','w',0}; +static const WCHAR liberation_mono[] = {'L','i','b','e','r','a','t','i','o','n',' ','M','o','n','o',0}; +static const WCHAR liberation_sans[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','a','n','s',0}; +static const WCHAR liberation_serif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f',0}; +static const WCHAR times_new_roman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0}; + +static const WCHAR * const default_serif_list[] = +{ + times_new_roman, + liberation_serif, + bitstream_vera_serif, + NULL +}; +static const WCHAR * const default_fixed_list[] = +{ + courier_new, + liberation_mono, + bitstream_vera_sans_mono, + NULL +}; +static const WCHAR * const default_sans_list[] = +{ + arial, + liberation_sans, + bitstream_vera_sans, + NULL +}; + +const WCHAR *default_serif = times_new_roman; +const WCHAR *default_fixed = courier_new; +const WCHAR *default_sans = arial; + static const struct nls_update_font_list { UINT ansi_cp, oem_cp; @@ -691,6 +727,28 @@ static void dump_gdi_font_list(void) } } +static const WCHAR *set_default_family( const WCHAR * const *name_list ) +{ + struct gdi_font_family *family; + const WCHAR * const *entry; + + for (entry = name_list; *entry; entry++) + { + if (!(family = find_family_from_name( *entry ))) continue; + list_remove( &family->entry ); + list_add_head( &font_list, &family->entry ); + return *entry; + } + return *name_list; +} + +static void reorder_font_list(void) +{ + default_serif = set_default_family( default_serif_list ); + default_fixed = set_default_family( default_fixed_list ); + default_sans = set_default_family( default_sans_list ); +} + struct gdi_font_face *create_face( const WCHAR *style, const WCHAR *fullname, const WCHAR *file, UINT index, FONTSIGNATURE fs, DWORD ntmflags, DWORD version, DWORD flags, const struct bitmap_font_size *size ) @@ -3187,6 +3245,7 @@ void font_init(void) init_font_options(); update_codepage(); WineEngInit( &font_funcs ); + reorder_font_list(); load_gdi_font_subst(); load_gdi_font_replacements(); load_system_links(); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index ea76e90a7f8..50df968226b 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -263,46 +263,8 @@ static const WCHAR winnt_font_reg_key[] = {'S','o','f','t','w','a','r','e','\\', static const WCHAR external_fonts_reg_key[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\', 'F','o','n','t','s','\\','E','x','t','e','r','n','a','l',' ','F','o','n','t','s','\0'}; -/* Interesting and well-known (frequently-assumed!) font names */ -static const WCHAR arial[] = {'A','r','i','a','l',0}; -static const WCHAR bitstream_vera_sans[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',0}; -static const WCHAR bitstream_vera_sans_mono[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',' ','M','o','n','o',0}; -static const WCHAR bitstream_vera_serif[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','e','r','i','f',0}; -static const WCHAR courier_new[] = {'C','o','u','r','i','e','r',' ','N','e','w',0}; -static const WCHAR liberation_mono[] = {'L','i','b','e','r','a','t','i','o','n',' ','M','o','n','o',0}; -static const WCHAR liberation_sans[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','a','n','s',0}; -static const WCHAR liberation_serif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f',0}; -static const WCHAR times_new_roman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0}; static const WCHAR SymbolW[] = {'S','y','m','b','o','l','\0'}; -static const WCHAR *default_serif_list[] = -{ - times_new_roman, - liberation_serif, - bitstream_vera_serif, - NULL -}; - -static const WCHAR *default_fixed_list[] = -{ - courier_new, - liberation_mono, - bitstream_vera_sans_mono, - NULL -}; - -static const WCHAR *default_sans_list[] = -{ - arial, - liberation_sans, - bitstream_vera_sans, - NULL -}; - -static const WCHAR *default_serif = times_new_roman; -static const WCHAR *default_fixed = courier_new; -static const WCHAR *default_sans = arial; - /* Registry font cache key and value names */ static const WCHAR wine_fonts_key[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\', 'F','o','n','t','s',0}; @@ -2205,41 +2167,6 @@ static void init_font_list(void) #endif } -static BOOL move_to_front(const WCHAR *name) -{ - Family *family, *cursor2; - LIST_FOR_EACH_ENTRY_SAFE(family, cursor2, &font_list, Family, entry) - { - if (!strncmpiW( family->family_name, name, LF_FACESIZE - 1 )) - { - list_remove(&family->entry); - list_add_head(&font_list, &family->entry); - return TRUE; - } - } - return FALSE; -} - -static const WCHAR *set_default(const WCHAR **name_list) -{ - const WCHAR **entry = name_list; - - while (*entry) - { - if (move_to_front(*entry)) return *entry; - entry++; - } - - return *name_list; -} - -static void reorder_font_list(void) -{ - default_serif = set_default( default_serif_list ); - default_fixed = set_default( default_fixed_list ); - default_sans = set_default( default_sans_list ); -} - /************************************************************* * WineEngInit * @@ -2272,8 +2199,6 @@ BOOL WineEngInit( const struct font_backend_funcs **funcs ) else load_font_list_from_cache(hkey_font_cache); - reorder_font_list(); - if(disposition == REG_CREATED_NEW_KEY) update_reg_entries(); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 2d1d74e902b..4350be34851 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -479,6 +479,9 @@ extern struct gdi_font *create_gdi_font( const struct gdi_font_face *face, const const LOGFONTW *lf ) DECLSPEC_HIDDEN; extern void *get_GSUB_vert_feature( struct gdi_font *font ) DECLSPEC_HIDDEN; extern void font_init(void) DECLSPEC_HIDDEN; +extern const WCHAR *default_serif DECLSPEC_HIDDEN; +extern const WCHAR *default_fixed DECLSPEC_HIDDEN; +extern const WCHAR *default_sans DECLSPEC_HIDDEN; /* freetype.c */
1
0
0
0
Alexandre Julliard : gdi32: Move the default AA flags handling out of freetype.c.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: de63a647d5813be38d61af7159d2fdf20372f319 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=de63a647d5813be38d61af71…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 3 11:25:30 2020 +0100 gdi32: Move the default AA flags handling out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/driver.c | 5 ++ dlls/gdi32/font.c | 209 +++++++++++++++++++++++------------------------ dlls/gdi32/freetype.c | 94 ++++++++------------- dlls/gdi32/gdi_private.h | 4 +- 4 files changed, 140 insertions(+), 172 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=de63a647d5813be38d61…
1
0
0
0
Paul Gofman : kernel32: Add string for E_FAIL error.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: e4df6f87ca5e52cb38c4f7c5130970ebb1b71063 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4df6f87ca5e52cb38c4f7c5…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Nov 3 13:14:50 2020 +0300 kernel32: Add string for E_FAIL error. Fixes a crash in Horizon Zero Dawn. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/format_msg.c | 1 + dlls/kernel32/winerror.mc | 7 +++++++ po/ar.po | 6 ++++++ po/ast.po | 6 ++++++ po/bg.po | 5 +++++ po/ca.po | 6 ++++++ po/cs.po | 6 ++++++ po/da.po | 6 ++++++ po/de.po | 6 ++++++ po/el.po | 5 +++++ po/en.po | 4 ++++ po/en_US.po | 4 ++++ po/eo.po | 6 ++++++ po/es.po | 6 ++++++ po/fa.po | 5 +++++ po/fi.po | 6 ++++++ po/fr.po | 6 ++++++ po/he.po | 5 +++++ po/hi.po | 4 ++++ po/hr.po | 6 ++++++ po/hu.po | 6 ++++++ po/it.po | 6 ++++++ po/ja.po | 6 ++++++ po/ko.po | 6 ++++++ po/lt.po | 6 ++++++ po/ml.po | 4 ++++ po/nb_NO.po | 6 ++++++ po/nl.po | 6 ++++++ po/or.po | 4 ++++ po/pa.po | 4 ++++ po/pl.po | 6 ++++++ po/pt_BR.po | 6 ++++++ po/pt_PT.po | 6 ++++++ po/rm.po | 5 +++++ po/ro.po | 6 ++++++ po/ru.po | 6 ++++++ po/si.po | 6 ++++++ po/sk.po | 5 +++++ po/sl.po | 6 ++++++ po/sr_RS(a)cyrillic.po | 5 +++++ po/sr_RS(a)latin.po | 5 +++++ po/sv.po | 6 ++++++ po/ta.po | 4 ++++ po/te.po | 4 ++++ po/th.po | 5 +++++ po/tr.po | 6 ++++++ po/uk.po | 6 ++++++ po/wa.po | 5 +++++ po/wine.pot | 4 ++++ po/zh_CN.po | 6 ++++++ po/zh_TW.po | 6 ++++++ 51 files changed, 274 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e4df6f87ca5e52cb38c4…
1
0
0
0
Huw Davies : riched20: Use a paragraph ptr in the clipboard get text function.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: 8b613eb2ed8e57c901402fa74390111e8556d6f5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b613eb2ed8e57c901402fa7…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 3 08:44:44 2020 +0000 riched20: Use a paragraph ptr in the clipboard get text function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/clipboard.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c index 578fb02fd99..f74ca2dae1a 100644 --- a/dlls/riched20/clipboard.c +++ b/dlls/riched20/clipboard.c @@ -344,13 +344,12 @@ static HGLOBAL get_unicode_text(ME_TextEditor *editor, const ME_Cursor *start, i int pars = 0; WCHAR *data; HANDLE ret; - ME_DisplayItem *para; + ME_Paragraph *para; int nEnd = ME_GetCursorOfs(start) + nChars; /* count paragraphs in range */ - para = start->pPara; - while((para = para->member.para.next_para) && - para->member.para.nCharOfs <= nEnd) + para = &start->pPara->member.para; + while ((para = para_next( para )) && para->nCharOfs <= nEnd) pars++; ret = GlobalAlloc(GMEM_MOVEABLE, sizeof(WCHAR) * (nChars + pars + 1));
1
0
0
0
Huw Davies : riched20: Use para and row ptrs in the row number from offset function.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: b132d8bf05631ab67ff8538ec84e35d6a79e3de3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b132d8bf05631ab67ff8538e…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 3 08:44:43 2020 +0000 riched20: Use para and row ptrs in the row number from offset function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 12 ++++-------- dlls/riched20/editor.h | 2 +- dlls/riched20/row.c | 47 +++++++++++++++++++++-------------------------- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 168dc51d827..41906d28e4c 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4312,17 +4312,13 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, } case EM_LINEFROMCHAR: { - if (wParam == -1) - return ME_RowNumberFromCharOfs(editor, ME_GetCursorOfs(&editor->pCursors[1])); - else - return ME_RowNumberFromCharOfs(editor, wParam); + if (wParam == -1) wParam = ME_GetCursorOfs( editor->pCursors + 1 ); + return row_number_from_char_ofs( editor, wParam ); } case EM_EXLINEFROMCHAR: { - if (lParam == -1) - return ME_RowNumberFromCharOfs(editor, ME_GetCursorOfs(&editor->pCursors[1])); - else - return ME_RowNumberFromCharOfs(editor, lParam); + if (lParam == -1) lParam = ME_GetCursorOfs( editor->pCursors + 1 ); + return row_number_from_char_ofs( editor, lParam ); } case EM_LINEINDEX: { diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index e5d580846d0..e884cbee2f3 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -118,7 +118,7 @@ ME_Row *row_from_cursor( ME_Cursor *cursor ) DECLSPEC_HIDDEN; ME_Row *row_from_row_number( ME_TextEditor *editor, int row_num ) DECLSPEC_HIDDEN; ME_Row *row_next( ME_Row *row ) DECLSPEC_HIDDEN; ME_Run *row_next_run( ME_Row *row, ME_Run *run ) DECLSPEC_HIDDEN; -int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) DECLSPEC_HIDDEN; +int row_number_from_char_ofs( ME_TextEditor *editor, int ofs ) DECLSPEC_HIDDEN; static inline ME_DisplayItem *row_get_di( ME_Row *row ) { return (ME_DisplayItem *)((ptrdiff_t)row - offsetof(ME_DisplayItem, member)); diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index a12a8c7449b..9a87cf27fb5 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -102,33 +102,28 @@ ME_Row *row_from_row_number( ME_TextEditor *editor, int row_num ) } -int -ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) +int row_number_from_char_ofs( ME_TextEditor *editor, int ofs ) { - ME_DisplayItem *item = ME_FindItemFwd(editor->pBuffer->pFirst, diParagraph); - int nRow = 0; - - while (item->type == diParagraph && - item->member.para.next_para->member.para.nCharOfs <= nOfs) - { - nRow += item->member.para.nRows; - item = item->member.para.next_para; - } - if (item->type == diParagraph) - { - ME_DisplayItem *next_para = item->member.para.next_para; - - nOfs -= item->member.para.nCharOfs; - item = ME_FindItemFwd(item, diRun); - while ((item = ME_FindItemFwd(item, diStartRowOrParagraph)) != NULL) + ME_Paragraph *para = editor_first_para( editor ); + ME_Row *row; + ME_Cursor cursor; + int row_num = 0; + + while (para_next( para ) && para_next( para )->nCharOfs <= ofs) + { + row_num += para->nRows; + para = para_next( para ); + } + + if (para_next( para )) { - if (item == next_para) - break; - item = ME_FindItemFwd(item, diRun); - if (item->member.run.nCharOfs > nOfs) - break; - nRow++; + for (row = para_first_row( para ); row; row = row_next( row )) + { + row_end_cursor( row, &cursor, TRUE ); + if (ME_GetCursorOfs( &cursor ) > ofs ) break; + row_num++; + } } - } - return nRow; + + return row_num; }
1
0
0
0
Huw Davies : riched20: Remove unused ME_RowStart().
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: 410dceb939d3b01fd80651578fcad291cb6cb43a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=410dceb939d3b01fd8065157…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 3 08:44:42 2020 +0000 riched20: Remove unused ME_RowStart(). Its functionality has been replaced with row_from_cursor(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.h | 2 -- dlls/riched20/row.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index d0d34ac5afc..e5d580846d0 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -118,8 +118,6 @@ ME_Row *row_from_cursor( ME_Cursor *cursor ) DECLSPEC_HIDDEN; ME_Row *row_from_row_number( ME_TextEditor *editor, int row_num ) DECLSPEC_HIDDEN; ME_Row *row_next( ME_Row *row ) DECLSPEC_HIDDEN; ME_Run *row_next_run( ME_Row *row, ME_Run *run ) DECLSPEC_HIDDEN; -ME_DisplayItem *ME_RowStart(ME_DisplayItem *item) DECLSPEC_HIDDEN; -/* ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); */ int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) DECLSPEC_HIDDEN; static inline ME_DisplayItem *row_get_di( ME_Row *row ) { diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index 2c77962b56b..a12a8c7449b 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -82,10 +82,6 @@ void row_end_cursor( ME_Row *row, ME_Cursor *cursor, BOOL include_eop ) cursor->nOffset = (item->type == diStartRow || include_eop) ? cursor->pRun->member.run.len : 0; } -ME_DisplayItem *ME_RowStart(ME_DisplayItem *item) { - return ME_FindItemBackOrHere(item, diStartRow); -} - ME_Row *row_from_row_number( ME_TextEditor *editor, int row_num ) { ME_Paragraph *para = editor_first_para( editor );
1
0
0
0
← Newer
1
...
79
80
81
82
83
84
85
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