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
October 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
796 discussions
Start a n
N
ew thread
Michael Stefaniuc : cryptnet/tests: Change the scope of a variable from global to local.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: c7c49ab57dd8d1df1cfdf93c97fa9e4c352700f2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c7c49ab57dd8d1df1cfdf93c…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 22 12:45:59 2020 +0200 cryptnet/tests: Change the scope of a variable from global to local. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/cryptnet/tests/cryptnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index 0b017604c04..3eca9e43f2e 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -99,11 +99,10 @@ static void compareUrlArray(const CRYPT_URL_ARRAY *expected, } } -static WCHAR url[] = - { 'h','t','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g',0 }; static void test_getObjectUrl(void) { + static WCHAR url[] = L"
http://winehq.org
"; BOOL ret; DWORD urlArraySize = 0, infoSize = 0; PCCERT_CONTEXT cert;
1
0
0
0
Alexandre Julliard : gdi32: Move the GetGlyphIndices() implementation out of freetype.c.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 5bdc6e0fe64222d8d7d383616f5e230928af011a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5bdc6e0fe64222d8d7d38361…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 13:13:52 2020 +0200 gdi32: Move the GetGlyphIndices() implementation out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 44 +++++++++++++++++++-- dlls/gdi32/freetype.c | 100 ++++++++++++++++------------------------------- dlls/gdi32/gdi_private.h | 3 +- 3 files changed, 76 insertions(+), 71 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 8c85614cb49..9c4fec88e1a 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1103,17 +1103,55 @@ static DWORD CDECL font_GetFontUnicodeRanges( PHYSDEV dev, GLYPHSET *glyphset ) static DWORD CDECL font_GetGlyphIndices( PHYSDEV dev, const WCHAR *str, INT count, WORD *gi, DWORD flags ) { struct font_physdev *physdev = get_font_dev( dev ); - DWORD ret; + UINT default_char; + char ch; + BOOL used, got_default = FALSE; + int i; if (!physdev->font) { dev = GET_NEXT_PHYSDEV( dev, pGetGlyphIndices ); return dev->funcs->pGetGlyphIndices( dev, str, count, gi, flags ); } + + if (flags & GGI_MARK_NONEXISTING_GLYPHS) + { + default_char = 0xffff; /* XP would use 0x1f for bitmap fonts */ + got_default = TRUE; + } + EnterCriticalSection( &font_cs ); - ret = font_funcs->pGetGlyphIndices( physdev->font, str, count, gi, flags ); + + for (i = 0; i < count; i++) + { + UINT glyph = str[i]; + + if (!font_funcs->get_glyph_index( physdev->font, &glyph )) + { + glyph = 0; + if (physdev->font->codepage == CP_SYMBOL) + { + if (str[i] >= 0xf020 && str[i] <= 0xf100) glyph = str[i] - 0xf000; + else if (str[i] < 0x100) glyph = str[i]; + } + else if (WideCharToMultiByte( physdev->font->codepage, 0, &str[i], 1, + &ch, 1, NULL, &used ) && !used) + glyph = (unsigned char)ch; + } + if (!glyph) + { + if (!got_default) + { + default_char = font_funcs->get_default_glyph( physdev->font ); + got_default = TRUE; + } + glyph = default_char; + } + gi[i] = glyph; + } + LeaveCriticalSection( &font_cs ); - return ret; + return count; } diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index b06a26b9e34..718c7f3407e 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5661,89 +5661,54 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph) return pFT_Get_Char_Index(font->ft_face, glyph); } -/* helper for freetype_GetGlyphIndices */ -static FT_UInt get_gdi_glyph_index(const GdiFont *font, UINT glyph) +/************************************************************* + * freetype_get_glyph_index + */ +static BOOL CDECL freetype_get_glyph_index( struct gdi_font *gdi_font, UINT *glyph ) { - struct gdi_font *gdi_font = font->gdi_font; - WCHAR wc = (WCHAR)glyph; - BOOL default_used = FALSE; - BOOL *default_used_pointer = NULL; - FT_UInt ret; - char buf; + GdiFont *font = get_font_ptr( gdi_font ); - if(font->ft_face->charmap->encoding != FT_ENCODING_NONE) - return get_glyph_index(font, glyph); + if (font->ft_face->charmap->encoding == FT_ENCODING_NONE) return FALSE; - if (codepage_sets_default_used(gdi_font->codepage)) - default_used_pointer = &default_used; - if(!WideCharToMultiByte(gdi_font->codepage, 0, &wc, 1, &buf, sizeof(buf), NULL, default_used_pointer) - || default_used) + if (font->ft_face->charmap->encoding == FT_ENCODING_MS_SYMBOL) { - if (gdi_font->codepage == CP_SYMBOL && wc < 0x100) - ret = (unsigned char)wc; - else - ret = 0; - } - else - ret = (unsigned char)buf; - TRACE("%04x (%02x) -> ret %d def_used %d\n", glyph, (unsigned char)buf, ret, default_used); - return ret; -} - -static FT_UInt get_default_char_index(GdiFont *font) -{ - FT_UInt default_char; + if (!(*glyph = get_glyph_index_symbol( font, *glyph ))) + { + WCHAR wc = *glyph; + char ch; - if (FT_IS_SFNT(font->ft_face)) - { - TT_OS2 *pOS2 = pFT_Get_Sfnt_Table(font->ft_face, ft_sfnt_os2); - default_char = (pOS2->usDefaultChar ? get_glyph_index(font, pOS2->usDefaultChar) : 0); - } - else - { - TEXTMETRICW textm; - get_text_metrics(font, &textm); - default_char = textm.tmDefaultChar; + if (WideCharToMultiByte( CP_ACP, 0, &wc, 1, &ch, 1, NULL, NULL )) + *glyph = get_glyph_index_symbol( font, (unsigned char)ch ); + } + return TRUE; } - return default_char; + if ((*glyph = pFT_Get_Char_Index( font->ft_face, *glyph ))) + *glyph = get_GSUB_vert_glyph( font, *glyph ); + + return TRUE; } /************************************************************* - * freetype_GetGlyphIndices + * freetype_get_default_glyph */ -static DWORD CDECL freetype_GetGlyphIndices( struct gdi_font *gdi_font, LPCWSTR lpstr, - INT count, LPWORD pgi, DWORD flags ) +static UINT CDECL freetype_get_default_glyph( struct gdi_font *gdi_font ) { - GdiFont *font = get_font_ptr(gdi_font); - int i; - WORD default_char; - BOOL got_default = FALSE; - - if (flags & GGI_MARK_NONEXISTING_GLYPHS) - { - default_char = 0xffff; /* XP would use 0x1f for bitmap fonts */ - got_default = TRUE; - } + GdiFont *font = get_font_ptr( gdi_font ); + FT_WinFNT_HeaderRec winfnt; + TT_OS2 *pOS2; - for(i = 0; i < count; i++) + if ((pOS2 = pFT_Get_Sfnt_Table( font->ft_face, ft_sfnt_os2 ))) { - pgi[i] = get_gdi_glyph_index(font, lpstr[i]); - if (pgi[i] == 0) - { - if (!got_default) - { - default_char = get_default_char_index(font); - got_default = TRUE; - } - pgi[i] = default_char; - } - else - pgi[i] = get_GSUB_vert_glyph(font, pgi[i]); + UINT glyph = pOS2->usDefaultChar; + freetype_get_glyph_index( gdi_font, &glyph ); + return glyph; } - return count; + if (!pFT_Get_WinFNT_Header( font->ft_face, &winfnt )) return winfnt.default_char + winfnt.first_char; + return 32; } + static inline BOOL is_identity_FMAT2(const FMAT2 *matrix) { static const FMAT2 identity = { 1.0, 0.0, 0.0, 1.0 }; @@ -7838,7 +7803,6 @@ static const struct font_backend_funcs font_funcs = freetype_FontIsLinked, freetype_GetCharWidthInfo, freetype_GetFontUnicodeRanges, - freetype_GetGlyphIndices, freetype_GetKerningPairs, freetype_GetOutlineTextMetrics, freetype_GetTextMetrics, @@ -7849,6 +7813,8 @@ static const struct font_backend_funcs font_funcs = freetype_CreateScalableFontResource, freetype_alloc_font, freetype_get_font_data, + freetype_get_glyph_index, + freetype_get_default_glyph, freetype_get_glyph_outline, freetype_destroy_font }; diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 2302dc5a7a7..6d1caf6c65e 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -356,7 +356,6 @@ struct font_backend_funcs BOOL (CDECL *pFontIsLinked)( struct gdi_font *font ); BOOL (CDECL *pGetCharWidthInfo)( struct gdi_font *font, struct char_width_info *info ); DWORD (CDECL *pGetFontUnicodeRanges)( struct gdi_font *font, GLYPHSET *glyphset ); - DWORD (CDECL *pGetGlyphIndices)( struct gdi_font *font, const WCHAR *str, INT count, WORD *gi, DWORD flags ); DWORD (CDECL *pGetKerningPairs)( struct gdi_font *font, DWORD count, KERNINGPAIR *pairs ); UINT (CDECL *pGetOutlineTextMetrics)( struct gdi_font *font, UINT size, OUTLINETEXTMETRICW *metrics ); BOOL (CDECL *pGetTextMetrics)( struct gdi_font *font, TEXTMETRICW *metrics ); @@ -371,6 +370,8 @@ struct font_backend_funcs BOOL (CDECL *alloc_font)( struct gdi_font *font ); DWORD (CDECL *get_font_data)( struct gdi_font *gdi_font, DWORD table, DWORD offset, void *buf, DWORD count ); + BOOL (CDECL *get_glyph_index)( struct gdi_font *gdi_font, UINT *glyph ); + UINT (CDECL *get_default_glyph)( struct gdi_font *gdi_font ); DWORD (CDECL *get_glyph_outline)( struct gdi_font *font, UINT glyph, UINT format, GLYPHMETRICS *gm, ABC *abc, DWORD buflen, void *buf, const MAT2 *mat ); void (CDECL *destroy_font)( struct gdi_font *font );
1
0
0
0
Alexandre Julliard : gdi32: Move the GetFontFileData() implementation out of freetype.c.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 2d15ea5012e1fbd9e16a86c69d68b587128832ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d15ea5012e1fbd9e16a86c6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 11:57:48 2020 +0200 gdi32: Move the GetFontFileData() implementation out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 12 +++++- dlls/gdi32/freetype.c | 99 +++++++++++++----------------------------------- dlls/gdi32/gdi_private.h | 15 ++++++-- 3 files changed, 49 insertions(+), 77 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2d15ea5012e1fbd9e16a…
1
0
0
0
Alexandre Julliard : gdi32: Move the get_glyph_outline() helper to the font function interface.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: a3b08dd3f3e621d87782aff22447a95511b80a08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a3b08dd3f3e621d87782aff2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 11:56:47 2020 +0200 gdi32: Move the get_glyph_outline() helper to the font function interface. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 80 ++++++++++++++++++++++------- dlls/gdi32/freetype.c | 130 +++-------------------------------------------- dlls/gdi32/gdi_private.h | 9 +--- 3 files changed, 73 insertions(+), 146 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a3b08dd3f3e621d87782…
1
0
0
0
Alexandre Julliard : gdi32: Move the font critical section out of freetype.c.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 26f8b4a7bc131acd910c41748bda6971a84148c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26f8b4a7bc131acd910c4174…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 11:54:35 2020 +0200 gdi32: Move the font critical section out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 147 ++++++++++++++++++++++++++++++++++++----------- dlls/gdi32/freetype.c | 95 ++++-------------------------- dlls/gdi32/gdi_private.h | 1 + 3 files changed, 125 insertions(+), 118 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=26f8b4a7bc131acd910c…
1
0
0
0
Alexandre Julliard : gdi32: Move the glyph metrics cache out of freetype.c.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: b3d55e2ce509bf2e75246da54e080adde2c76b2f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3d55e2ce509bf2e75246da5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 11:51:07 2020 +0200 gdi32: Move the glyph metrics cache out of freetype.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 60 +++++++++++++++++++++++++++++++++++++++++ dlls/gdi32/freetype.c | 69 ++---------------------------------------------- dlls/gdi32/gdi_private.h | 8 ++++++ 3 files changed, 70 insertions(+), 67 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 31c9d1561a5..0882b5ef1ba 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -430,8 +430,12 @@ struct gdi_font *alloc_gdi_font(void) void free_gdi_font( struct gdi_font *font ) { + DWORD i; + if (font->private) font_funcs->destroy_font( font ); free_font_handle( font->handle ); + for (i = 0; i < font->gm_size; i++) HeapFree( GetProcessHeap(), 0, font->gm[i] ); + HeapFree( GetProcessHeap(), 0, font->gm ); HeapFree( GetProcessHeap(), 0, font->name ); HeapFree( GetProcessHeap(), 0, font->fileinfo ); HeapFree( GetProcessHeap(), 0, font ); @@ -469,6 +473,62 @@ void set_gdi_font_file_info( struct gdi_font *font, const WCHAR *file, SIZE_T da else font->fileinfo->size.QuadPart = data_size; } +struct glyph_metrics +{ + GLYPHMETRICS gm; + ABC abc; /* metrics of the unrotated char */ + BOOL init; +}; + +#define GM_BLOCK_SIZE 128 + +/* TODO: GGO format support */ +BOOL get_gdi_font_glyph_metrics( struct gdi_font *font, UINT index, GLYPHMETRICS *gm, ABC *abc ) +{ + UINT block = index / GM_BLOCK_SIZE; + UINT entry = index % GM_BLOCK_SIZE; + + if (block < font->gm_size && font->gm[block] && font->gm[block][entry].init) + { + *gm = font->gm[block][entry].gm; + *abc = font->gm[block][entry].abc; + + TRACE( "cached gm: %u, %u, %s, %d, %d abc: %d, %u, %d\n", + gm->gmBlackBoxX, gm->gmBlackBoxY, wine_dbgstr_point( &gm->gmptGlyphOrigin ), + gm->gmCellIncX, gm->gmCellIncY, abc->abcA, abc->abcB, abc->abcC ); + return TRUE; + } + + return FALSE; +} + +void set_gdi_font_glyph_metrics( struct gdi_font *font, UINT index, const GLYPHMETRICS *gm, const ABC *abc ) +{ + UINT block = index / GM_BLOCK_SIZE; + UINT entry = index % GM_BLOCK_SIZE; + + if (block >= font->gm_size) + { + struct glyph_metrics **ptr; + + if (font->gm) + ptr = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, font->gm, (block + 1) * sizeof(*ptr) ); + else + ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, (block + 1) * sizeof(*ptr) ); + if (!ptr) return; + font->gm_size = block + 1; + font->gm = ptr; + } + if (!font->gm[block]) + { + font->gm[block] = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(**font->gm) * GM_BLOCK_SIZE ); + if (!font->gm[block]) return; + } + font->gm[block][entry].gm = *gm; + font->gm[block][entry].abc = *abc; + font->gm[block][entry].init = TRUE; +} + /* font cache */ static struct list gdi_font_list = LIST_INIT( gdi_font_list ); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 58e85a4515e..8251b257a3d 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -304,12 +304,6 @@ typedef struct tagFamily { struct list *replacement; } Family; -typedef struct { - GLYPHMETRICS gm; - ABC abc; /* metrics of the unrotated char */ - BOOL init; -} GM; - typedef struct tagGdiFont GdiFont; typedef struct { @@ -320,8 +314,6 @@ typedef struct { struct tagGdiFont { struct gdi_font *gdi_font; - GM **gm; - DWORD gmsize; OUTLINETEXTMETRICW *potm; DWORD total_kern_pairs; KERNINGPAIR *kern_pairs; @@ -356,9 +348,6 @@ struct enum_charset_list { struct enum_charset_element element[32]; }; -#define GM_BLOCK_SIZE 128 -#define FONT_GM(font,idx) (&(font)->gm[(idx) / GM_BLOCK_SIZE][(idx) % GM_BLOCK_SIZE]) - static struct list system_links = LIST_INIT(system_links); static struct list font_subst_list = LIST_INIT(font_subst_list); @@ -4068,9 +4057,6 @@ static UINT get_nearest_charset(const WCHAR *family_name, Face *face, UINT *cp) static BOOL CDECL freetype_alloc_font( struct gdi_font *font ) { GdiFont *ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)); - ret->gmsize = 1; - ret->gm = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GM*)); - ret->gm[0] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GM) * GM_BLOCK_SIZE); ret->potm = NULL; ret->total_kern_pairs = (DWORD)-1; ret->kern_pairs = NULL; @@ -4087,7 +4073,6 @@ static void CDECL freetype_destroy_font( struct gdi_font *gdi_font ) { GdiFont *font = get_font_ptr( gdi_font ); CHILD_FONT *child, *child_next; - DWORD i; LIST_FOR_EACH_ENTRY_SAFE( child, child_next, &font->child_fonts, CHILD_FONT, entry ) { @@ -4102,60 +4087,10 @@ static void CDECL freetype_destroy_font( struct gdi_font *gdi_font ) if (font->mapping) unmap_font_file( font->mapping ); HeapFree(GetProcessHeap(), 0, font->kern_pairs); HeapFree(GetProcessHeap(), 0, font->potm); - for (i = 0; i < font->gmsize; i++) - HeapFree(GetProcessHeap(),0,font->gm[i]); - HeapFree(GetProcessHeap(), 0, font->gm); HeapFree(GetProcessHeap(), 0, font->GSUB_Table); HeapFree(GetProcessHeap(), 0, font); } -/* TODO: GGO format support */ -static BOOL get_cached_metrics( GdiFont *font, UINT index, GLYPHMETRICS *gm, ABC *abc ) -{ - UINT block = index / GM_BLOCK_SIZE; - UINT entry = index % GM_BLOCK_SIZE; - - if (block < font->gmsize && font->gm[block] && font->gm[block][entry].init) - { - *gm = font->gm[block][entry].gm; - *abc = font->gm[block][entry].abc; - - TRACE( "cached gm: %u, %u, %s, %d, %d abc: %d, %u, %d\n", - gm->gmBlackBoxX, gm->gmBlackBoxY, wine_dbgstr_point( &gm->gmptGlyphOrigin ), - gm->gmCellIncX, gm->gmCellIncY, abc->abcA, abc->abcB, abc->abcC ); - return TRUE; - } - - return FALSE; -} - -static void set_cached_metrics( GdiFont *font, UINT index, const GLYPHMETRICS *gm, const ABC *abc ) -{ - UINT block = index / GM_BLOCK_SIZE; - UINT entry = index % GM_BLOCK_SIZE; - - if (block >= font->gmsize) - { - GM **ptr = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - font->gm, (block + 1) * sizeof(GM *) ); - if (!ptr) return; - - font->gmsize = block + 1; - font->gm = ptr; - } - - if (!font->gm[block]) - { - font->gm[block] = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(GM) * GM_BLOCK_SIZE ); - if (!font->gm[block]) return; - } - - font->gm[block][entry].gm = *gm; - font->gm[block][entry].abc = *abc; - font->gm[block][entry].init = TRUE; -} - static DWORD get_font_data( GdiFont *font, DWORD table, DWORD offset, LPVOID buf, DWORD cbData) { FT_Face ft_face = font->ft_face; @@ -6805,7 +6740,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, format &= ~GGO_UNHINTED; if (format == GGO_METRICS && is_identity_MAT2(lpmat) && - get_cached_metrics( font, glyph_index, lpgm, abc )) + get_gdi_font_glyph_metrics( gdi_font, glyph_index, lpgm, abc )) return 1; /* FIXME */ needsTransform = get_transform_matrices( font, tategaki, lpmat, matrices ); @@ -6860,7 +6795,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, if ((format == GGO_METRICS || format == GGO_BITMAP || format == WINE_GGO_GRAY16_BITMAP) && is_identity_MAT2(lpmat)) /* don't cache custom transforms */ - set_cached_metrics( font, glyph_index, &gm, abc ); + set_gdi_font_glyph_metrics( gdi_font, glyph_index, &gm, abc ); if(format == GGO_METRICS) { diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 3968b62d8db..29ec84f9e97 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -303,11 +303,15 @@ struct char_width_info typedef struct { FLOAT eM11, eM12, eM21, eM22; } FMAT2; +struct glyph_metrics; + struct gdi_font { struct list entry; struct list unused_entry; DWORD refcount; + DWORD gm_size; + struct glyph_metrics **gm; /* the following members can be accessed without locking, they are never modified after creation */ void *private; /* font backend private data */ DWORD handle; @@ -375,6 +379,10 @@ extern struct gdi_font *find_cached_gdi_font( const LOGFONTW *lf, const FMAT2 *m BOOL can_use_bitmap ) DECLSPEC_HIDDEN; extern void set_gdi_font_name( struct gdi_font *font, const WCHAR *name ) DECLSPEC_HIDDEN; extern void set_gdi_font_file_info( struct gdi_font *font, const WCHAR *file, SIZE_T data_size ) DECLSPEC_HIDDEN; +extern BOOL get_gdi_font_glyph_metrics( struct gdi_font *font, UINT index, + GLYPHMETRICS *gm, ABC *abc ) DECLSPEC_HIDDEN; +extern void set_gdi_font_glyph_metrics( struct gdi_font *font, UINT index, + const GLYPHMETRICS *gm, const ABC *abc ) DECLSPEC_HIDDEN; extern void font_init(void) DECLSPEC_HIDDEN; /* freetype.c */
1
0
0
0
Alexandre Julliard : gdi32: Move more font metrics information to the generic font structure.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: c44c347dd5712e29ed88f3cec69061abf1067eef URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c44c347dd5712e29ed88f3ce…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 22 11:49:33 2020 +0200 gdi32: Move more font metrics information to the generic font structure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/font.c | 1 + dlls/gdi32/freetype.c | 167 +++++++++++++++++++++-------------------------- dlls/gdi32/gdi_private.h | 9 +++ 3 files changed, 86 insertions(+), 91 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c44c347dd5712e29ed88…
1
0
0
0
Haoyang Chen : wbemprox: Implement Win32_SoundDevice.Status.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 16b8f2b3e75241394ff552b9aeadd7823fad6391 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16b8f2b3e75241394ff552b9…
Author: Haoyang Chen <chenhaoyang(a)uniontech.com> Date: Thu Oct 22 11:25:36 2020 +0200 wbemprox: Implement Win32_SoundDevice.Status. Signed-off-by: Haoyang Chen <chenhaoyang(a)uniontech.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 590714b826b..e35aa069e1d 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -379,6 +379,7 @@ static const struct column col_sounddevice[] = { L"Manufacturer", CIM_STRING }, { L"Name", CIM_STRING }, { L"ProductName", CIM_STRING }, + { L"Status", CIM_STRING }, { L"StatusInfo", CIM_UINT16 }, }; static const struct column col_stdregprov[] = @@ -768,6 +769,7 @@ struct record_sounddevice const WCHAR *manufacturer; const WCHAR *name; const WCHAR *productname; + const WCHAR *status; UINT16 statusinfo; }; struct record_stdregprov @@ -886,7 +888,7 @@ static const struct record_quickfixengineering data_quickfixengineering[] = }; static const struct record_sounddevice data_sounddevice[] = { - { L"The Wine Project", L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */ } + { L"The Wine Project", L"Wine Audio Device", L"Wine Audio Device", L"OK", 3 /* enabled */ } }; static const struct record_stdregprov data_stdregprov[] = {
1
0
0
0
Alistair Leslie-Hughes : server: Fix compile error when irda.h is available.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 3c0dae37a64d0c2960b7a39c602e4661cf942b28 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c0dae37a64d0c2960b7a39c…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Oct 22 20:06:23 2020 +1100 server: Fix compile error when irda.h is available. Include "af_irda.h" so SOCKADDR_IRDA is defined. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/sock.c b/server/sock.c index 866a9351152..8f500adc68b 100644 --- a/server/sock.c +++ b/server/sock.c @@ -86,6 +86,7 @@ #include "winsock2.h" #include "ws2tcpip.h" #include "wsipx.h" +#include "af_irda.h" #include "wine/afd.h" #include "process.h"
1
0
0
0
Michael Stefaniuc : msi: Use 0 terminated WCHAR strings in the SQL tokenizer.
by Alexandre Julliard
22 Oct '20
22 Oct '20
Module: wine Branch: master Commit: 6705b959d0cf7635bf2ab16ab89fefb409a0a9c8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6705b959d0cf7635bf2ab16a…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 22 01:24:07 2020 +0200 msi: Use 0 terminated WCHAR strings in the SQL tokenizer. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/tokenize.c | 114 ++++++++++++++++++---------------------------------- 1 file changed, 39 insertions(+), 75 deletions(-) diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c index 4ebc9b81fb4..3b9f98c6f17 100644 --- a/dlls/msi/tokenize.c +++ b/dlls/msi/tokenize.c @@ -38,87 +38,51 @@ struct Keyword { #define MAX_TOKEN_LEN 11 -static const WCHAR addW[] = {'A','D','D'}; -static const WCHAR alterW[] = {'A','L','T','E','R'}; -static const WCHAR andW[] = {'A','N','D'}; -static const WCHAR byW[] = {'B','Y'}; -static const WCHAR charW[] = {'C','H','A','R'}; -static const WCHAR characterW[] = {'C','H','A','R','A','C','T','E','R'}; -static const WCHAR createW[] = {'C','R','E','A','T','E'}; -static const WCHAR deleteW[] = {'D','E','L','E','T','E'}; -static const WCHAR distinctW[] = {'D','I','S','T','I','N','C','T'}; -static const WCHAR dropW[] = {'D','R','O','P'}; -static const WCHAR freeW[] = {'F','R','E','E'}; -static const WCHAR fromW[] = {'F','R','O','M'}; -static const WCHAR holdW[] = {'H','O','L','D'}; -static const WCHAR insertW[] = {'I','N','S','E','R','T'}; -static const WCHAR intW[] = {'I','N','T'}; -static const WCHAR integerW[] = {'I','N','T','E','G','E','R'}; -static const WCHAR intoW[] = {'I','N','T','O'}; -static const WCHAR isW[] = {'I','S'}; -static const WCHAR keyW[] = {'K','E','Y'}; -static const WCHAR likeW[] = {'L','I','K','E'}; -static const WCHAR localizableW[] = {'L','O','C','A','L','I','Z','A','B','L','E'}; -static const WCHAR longW[] = {'L','O','N','G'}; -static const WCHAR longcharW[] = {'L','O','N','G','C','H','A','R'}; -static const WCHAR notW[] = {'N','O','T'}; -static const WCHAR nullW[] = {'N','U','L','L'}; -static const WCHAR objectW[] = {'O','B','J','E','C','T'}; -static const WCHAR orW[] = {'O','R'}; -static const WCHAR orderW[] = {'O','R','D','E','R'}; -static const WCHAR primaryW[] = {'P','R','I','M','A','R','Y'}; -static const WCHAR selectW[] = {'S','E','L','E','C','T'}; -static const WCHAR setW[] = {'S','E','T'}; -static const WCHAR shortW[] = {'S','H','O','R','T'}; -static const WCHAR tableW[] = {'T','A','B','L','E'}; -static const WCHAR temporaryW[] = {'T','E','M','P','O','R','A','R','Y'}; -static const WCHAR updateW[] = {'U','P','D','A','T','E'}; -static const WCHAR valuesW[] = {'V','A','L','U','E','S'}; -static const WCHAR whereW[] = {'W','H','E','R','E'}; - /* ** These are the keywords ** They MUST be in alphabetical order */ +#define X(str) str, ARRAY_SIZE(str) - 1 static const Keyword aKeywordTable[] = { - { addW, ARRAY_SIZE(addW), TK_ADD }, - { alterW, ARRAY_SIZE(alterW), TK_ALTER }, - { andW, ARRAY_SIZE(andW), TK_AND }, - { byW, ARRAY_SIZE(byW), TK_BY }, - { charW, ARRAY_SIZE(charW), TK_CHAR }, - { characterW, ARRAY_SIZE(characterW), TK_CHAR }, - { createW, ARRAY_SIZE(createW), TK_CREATE }, - { deleteW, ARRAY_SIZE(deleteW), TK_DELETE }, - { distinctW, ARRAY_SIZE(distinctW), TK_DISTINCT }, - { dropW, ARRAY_SIZE(dropW), TK_DROP }, - { freeW, ARRAY_SIZE(freeW), TK_FREE }, - { fromW, ARRAY_SIZE(fromW), TK_FROM }, - { holdW, ARRAY_SIZE(holdW), TK_HOLD }, - { insertW, ARRAY_SIZE(insertW), TK_INSERT }, - { intW, ARRAY_SIZE(intW), TK_INT }, - { integerW, ARRAY_SIZE(integerW), TK_INT }, - { intoW, ARRAY_SIZE(intoW), TK_INTO }, - { isW, ARRAY_SIZE(isW), TK_IS }, - { keyW, ARRAY_SIZE(keyW), TK_KEY }, - { likeW, ARRAY_SIZE(likeW), TK_LIKE }, - { localizableW, ARRAY_SIZE(localizableW), TK_LOCALIZABLE }, - { longW, ARRAY_SIZE(longW), TK_LONG }, - { longcharW, ARRAY_SIZE(longcharW), TK_LONGCHAR }, - { notW, ARRAY_SIZE(notW), TK_NOT }, - { nullW, ARRAY_SIZE(nullW), TK_NULL }, - { objectW, ARRAY_SIZE(objectW), TK_OBJECT }, - { orW, ARRAY_SIZE(orW), TK_OR }, - { orderW, ARRAY_SIZE(orderW), TK_ORDER }, - { primaryW, ARRAY_SIZE(primaryW), TK_PRIMARY }, - { selectW, ARRAY_SIZE(selectW), TK_SELECT }, - { setW, ARRAY_SIZE(setW), TK_SET }, - { shortW, ARRAY_SIZE(shortW), TK_SHORT }, - { tableW, ARRAY_SIZE(tableW), TK_TABLE }, - { temporaryW, ARRAY_SIZE(temporaryW), TK_TEMPORARY }, - { updateW, ARRAY_SIZE(updateW), TK_UPDATE }, - { valuesW, ARRAY_SIZE(valuesW), TK_VALUES }, - { whereW, ARRAY_SIZE(whereW), TK_WHERE }, + { X(L"ADD"), TK_ADD }, + { X(L"ALTER"), TK_ALTER }, + { X(L"AND"), TK_AND }, + { X(L"BY"), TK_BY }, + { X(L"CHAR"), TK_CHAR }, + { X(L"CHARACTER"), TK_CHAR }, + { X(L"CREATE"), TK_CREATE }, + { X(L"DELETE"), TK_DELETE }, + { X(L"DISTINCT"), TK_DISTINCT }, + { X(L"DROP"), TK_DROP }, + { X(L"FREE"), TK_FREE }, + { X(L"FROM"), TK_FROM }, + { X(L"HOLD"), TK_HOLD }, + { X(L"INSERT"), TK_INSERT }, + { X(L"INT"), TK_INT }, + { X(L"INTEGER"), TK_INT }, + { X(L"INTO"), TK_INTO }, + { X(L"IS"), TK_IS }, + { X(L"KEY"), TK_KEY }, + { X(L"LIKE"), TK_LIKE }, + { X(L"LOCALIZABLE"), TK_LOCALIZABLE }, + { X(L"LONG"), TK_LONG }, + { X(L"LONGCHAR"), TK_LONGCHAR }, + { X(L"NOT"), TK_NOT }, + { X(L"NULL"), TK_NULL }, + { X(L"OBJECT"), TK_OBJECT }, + { X(L"OR"), TK_OR }, + { X(L"ORDER"), TK_ORDER }, + { X(L"PRIMARY"), TK_PRIMARY }, + { X(L"SELECT"), TK_SELECT }, + { X(L"SET"), TK_SET }, + { X(L"SHORT"), TK_SHORT }, + { X(L"TABLE"), TK_TABLE }, + { X(L"TEMPORARY"), TK_TEMPORARY }, + { X(L"UPDATE"), TK_UPDATE }, + { X(L"VALUES"), TK_VALUES }, + { X(L"WHERE"), TK_WHERE }, }; +#undef X /* ** Comparison function for binary search.
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
80
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
Results per page:
10
25
50
100
200