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
June 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
411 discussions
Start a n
N
ew thread
Matteo Bruni : d3d9/tests: Reset texture 0 to NULL at the end of texop_test ().
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 5ffabcdfff8a14256b202cd8e26187afe603c5fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ffabcdfff8a14256b202cd8e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Jun 19 21:59:25 2013 +0200 d3d9/tests: Reset texture 0 to NULL at the end of texop_test(). --- dlls/d3d9/tests/visual.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index dc84559..73f5066 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -10179,8 +10179,9 @@ static void texop_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Present failed with 0x%08x\n", hr); } - if (texture) IDirect3DTexture9_Release(texture); - if (vertex_declaration) IDirect3DVertexDeclaration9_Release(vertex_declaration); + hr = IDirect3DDevice9_SetTexture(device, 0, NULL); + IDirect3DTexture9_Release(texture); + IDirect3DVertexDeclaration9_Release(vertex_declaration); } static void yuv_color_test(IDirect3DDevice9 *device) {
1
0
0
0
Matteo Bruni : wined3d: Fix NP2 surface repacking in surface_download_data.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 5649746b60af65248177309e1c998dff1aa9aef4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5649746b60af65248177309e1…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Jun 19 21:59:24 2013 +0200 wined3d: Fix NP2 surface repacking in surface_download_data. --- dlls/wined3d/surface.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a325ac0..83ff41f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2246,12 +2246,11 @@ static void surface_download_data(struct wined3d_surface *surface, const struct src_data = mem; dst_data = surface->resource.allocatedMemory; TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_pitch); - for (y = 1; y < surface->resource.height; ++y) + for (y = 0; y < surface->resource.height; ++y) { - /* skip the first row */ + memcpy(dst_data, src_data, dst_pitch); src_data += src_pitch; dst_data += dst_pitch; - memcpy(dst_data, src_data, dst_pitch); } HeapFree(GetProcessHeap(), 0, mem);
1
0
0
0
Alexandre Julliard : winemac.drv: Don' t register IME classes before the dll is initialized.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 410b728c7b04abba1a7de2a4e9ec287b593ad76f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=410b728c7b04abba1a7de2a4e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 20 17:02:01 2013 +0200 winemac.drv: Don't register IME classes before the dll is initialized. --- dlls/winemac.drv/macdrv_main.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index d72b036..470553e 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -164,7 +164,7 @@ static void setup_options(void) /*********************************************************************** * process_attach */ -static BOOL process_attach(void) +static BOOL process_attach( HINSTANCE instance ) { SessionAttributeBits attributes; OSStatus status; @@ -186,6 +186,7 @@ static BOOL process_attach(void) set_app_icon(); macdrv_clipboard_process_attach(); + IME_RegisterClasses( instance ); return TRUE; } @@ -279,8 +280,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) switch(reason) { case DLL_PROCESS_ATTACH: - IME_RegisterClasses(hinst); - ret = process_attach(); + ret = process_attach( hinst ); break; case DLL_THREAD_DETACH: thread_detach();
1
0
0
0
Jacek Caban : dwmapi: Added DwmGetCompositionTimingInfo stub.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: f98ccb82b9987d0c9cff79e15ac8c08a82cd011d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f98ccb82b9987d0c9cff79e15…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 20 15:29:17 2013 +0200 dwmapi: Added DwmGetCompositionTimingInfo stub. --- dlls/dwmapi/dwmapi.spec | 2 +- dlls/dwmapi/dwmapi_main.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/dwmapi/dwmapi.spec b/dlls/dwmapi/dwmapi.spec index 8f8f7a3..5f74970 100644 --- a/dlls/dwmapi/dwmapi.spec +++ b/dlls/dwmapi/dwmapi.spec @@ -28,7 +28,7 @@ @ stdcall DwmExtendFrameIntoClientArea(long ptr) @ stdcall DwmFlush() @ stdcall DwmGetColorizationColor(ptr long) -@ stub DwmGetCompositionTimingInfo +@ stdcall DwmGetCompositionTimingInfo(long ptr) @ stdcall DwmGetGraphicsStreamClient(long ptr) @ stdcall DwmGetGraphicsStreamTransformHint(long ptr) @ stdcall DwmGetTransportAttributes(ptr ptr ptr) diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 39a9918..e6154ba 100644 --- a/dlls/dwmapi/dwmapi_main.c +++ b/dlls/dwmapi/dwmapi_main.c @@ -208,3 +208,15 @@ HRESULT WINAPI DwmRegisterThumbnail(HWND dest, HWND src, PHTHUMBNAIL thumbnail_i return E_NOTIMPL; } + +/********************************************************************** + * DwmGetCompositionTimingInfo (DWMAPI.@) + */ +HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info) +{ + static int i; + + if(!i++) FIXME("(%p %p)\n", hwnd, info); + + return E_NOTIMPL; +}
1
0
0
0
Jacek Caban : dwmapi.h: Added some missing declarations.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 92bdc3705860303c0c540aee7f6b73b598f71b19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92bdc3705860303c0c540aee7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 20 15:28:59 2013 +0200 dwmapi.h: Added some missing declarations. --- include/dwmapi.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/include/dwmapi.h b/include/dwmapi.h index b2546ae..f85999a 100644 --- a/include/dwmapi.h +++ b/include/dwmapi.h @@ -32,6 +32,59 @@ extern "C" { DECLARE_HANDLE(HTHUMBNAIL); typedef HTHUMBNAIL *PHTHUMBNAIL; +#include <pshpack1.h> + +typedef ULONGLONG DWM_FRAME_COUNT; +typedef ULONGLONG QPC_TIME; + +typedef struct _UNSIGNED_RATIO { + UINT32 uiNumerator; + UINT32 uiDenominator; +} UNSIGNED_RATIO; + +typedef struct _DWM_TIMING_INFO { + UINT32 cbSize; + UNSIGNED_RATIO rateRefresh; + QPC_TIME qpcRefreshPeriod; + UNSIGNED_RATIO rateCompose; + QPC_TIME qpcVBlank; + DWM_FRAME_COUNT cRefresh; + UINT cDXRefresh; + QPC_TIME qpcCompose; + DWM_FRAME_COUNT cFrame; + UINT cDXPresent; + DWM_FRAME_COUNT cRefreshFrame; + DWM_FRAME_COUNT cFrameSubmitted; + UINT cDXPresentSubmitted; + DWM_FRAME_COUNT cFrameConfirmed; + UINT cDXPresentConfirmed; + DWM_FRAME_COUNT cRefreshConfirmed; + UINT cDXRefreshConfirmed; + DWM_FRAME_COUNT cFramesLate; + UINT cFramesOutstanding; + DWM_FRAME_COUNT cFrameDisplayed; + QPC_TIME qpcFrameDisplayed; + DWM_FRAME_COUNT cRefreshFrameDisplayed; + DWM_FRAME_COUNT cFrameComplete; + QPC_TIME qpcFrameComplete; + DWM_FRAME_COUNT cFramePending; + QPC_TIME qpcFramePending; + DWM_FRAME_COUNT cFramesDisplayed; + DWM_FRAME_COUNT cFramesComplete; + DWM_FRAME_COUNT cFramesPending; + DWM_FRAME_COUNT cFramesAvailable; + DWM_FRAME_COUNT cFramesDropped; + DWM_FRAME_COUNT cFramesMissed; + DWM_FRAME_COUNT cRefreshNextDisplayed; + DWM_FRAME_COUNT cRefreshNextPresented; + DWM_FRAME_COUNT cRefreshesDisplayed; + DWM_FRAME_COUNT cRefreshesPresented; + DWM_FRAME_COUNT cRefreshStarted; + ULONGLONG cPixelsReceived; + ULONGLONG cPixelsDrawn; + DWM_FRAME_COUNT cBuffersEmpty; +} DWM_TIMING_INFO; + typedef struct _MilMatrix3x2D { DOUBLE S_11; @@ -42,6 +95,8 @@ typedef struct _MilMatrix3x2D DOUBLE DY; } MilMatrix3x2D; +#include <poppack.h> + #define DWM_BB_ENABLE 0x00000001 #define DWM_BB_BLURREGION 0x00000002 #define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004 @@ -60,6 +115,7 @@ DWMAPI DwmEnableComposition(UINT); DWMAPI DwmEnableMMCSS(BOOL); DWMAPI DwmExtendFrameIntoClientArea(HWND,const MARGINS*); DWMAPI DwmGetColorizationColor(DWORD*,BOOL); +DWMAPI DwmGetCompositionTimingInfo(HWND,DWM_TIMING_INFO*); DWMAPI DwmIsCompositionEnabled(BOOL*); DWMAPI DwmRegisterThumbnail(HWND, HWND, PHTHUMBNAIL); DWMAPI DwmSetWindowAttribute(HWND, DWORD, LPCVOID, DWORD);
1
0
0
0
Aric Stewart : gdi32/tests: Add a test case for vertical fonts enumeration order.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 37d216cc563477312b438dad9fbe4156e53a1e67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37d216cc563477312b438dad9…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jun 18 07:42:00 2013 -0500 gdi32/tests: Add a test case for vertical fonts enumeration order. --- dlls/gdi32/tests/font.c | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 9563da9..6ee8db4 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -5098,6 +5098,42 @@ static void test_max_height(void) return; } +static void test_vertical_order(void) +{ + struct enum_font_data efd; + LOGFONTA lf; + HDC hdc; + int i, j; + + hdc = CreateCompatibleDC(0); + ok(hdc != NULL, "CreateCompatibleDC failed\n"); + + memset(&lf, 0, sizeof(lf)); + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfHeight = 16; + lf.lfWidth = 16; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfItalic = FALSE; + lf.lfWeight = FW_DONTCARE; + efd.total = 0; + EnumFontFamiliesExA(hdc, &lf, enum_font_data_proc, (LPARAM)&efd, 0); + for (i = 0; i < efd.total; i++) + { + if (efd.lf[i].lfFaceName[0] != '@') continue; + for (j = 0; j < efd.total; j++) + { + if (!strcmp(efd.lf[i].lfFaceName + 1, efd.lf[j].lfFaceName)) + { + ok(i > j,"Found vertical font %s before its horizontal version\n", efd.lf[i].lfFaceName); + break; + } + } + } + DeleteDC( hdc ); +} + + START_TEST(font) { init(); @@ -5155,6 +5191,7 @@ START_TEST(font) test_fullname2(); test_east_asian_font_selection(); test_max_height(); + test_vertical_order(); /* These tests should be last test until RemoveFontResource * is properly implemented.
1
0
0
0
Alexandre Julliard : gdi32: Put vertical font families after their horizontal counterpart in the font list .
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: e531306f7ad6292fe0deff1533e25059d88df93c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e531306f7ad6292fe0deff153…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 20 12:12:16 2013 +0200 gdi32: Put vertical font families after their horizontal counterpart in the font list. --- dlls/gdi32/freetype.c | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 2ec7335..bdd6df7 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1622,6 +1622,38 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family, void *bu } } +/* move vertical fonts after their horizontal counterpart */ +/* assumes that font_list is already sorted by family name */ +static void reorder_vertical_fonts(void) +{ + Family *family, *next, *vert_family; + struct list *ptr, *vptr; + struct list vertical_families = LIST_INIT( vertical_families ); + + LIST_FOR_EACH_ENTRY_SAFE( family, next, &font_list, Family, entry ) + { + if (family->FamilyName[0] != '@') continue; + list_remove( &family->entry ); + list_add_tail( &vertical_families, &family->entry ); + } + + ptr = list_head( &font_list ); + vptr = list_head( &vertical_families ); + while (ptr && vptr) + { + family = LIST_ENTRY( ptr, Family, entry ); + vert_family = LIST_ENTRY( vptr, Family, entry ); + if (strcmpiW( family->FamilyName, vert_family->FamilyName + 1 ) > 0) + { + list_remove( vptr ); + list_add_before( ptr, vptr ); + vptr = list_head( &vertical_families ); + } + else ptr = list_next( &font_list, ptr ); + } + list_move_tail( &font_list, &vertical_families ); +} + static void load_font_list_from_cache(HKEY hkey_font_cache) { DWORD size, family_index = 0; @@ -1672,6 +1704,8 @@ static void load_font_list_from_cache(HKEY hkey_font_cache) release_family( family ); size = sizeof(buffer); } + + reorder_vertical_fonts(); } static LONG create_font_cache_key(HKEY *hkey, DWORD *disposition)
1
0
0
0
Alexandre Julliard : gdi32: Add support for loading name strings in Apple Unicode format.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 102b2785f4e9d892fa4ae7a84ccc57792000e5e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=102b2785f4e9d892fa4ae7a84…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 20 21:07:33 2013 +0200 gdi32: Add support for loading name strings in Apple Unicode format. --- dlls/gdi32/freetype.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 468ea4b..2ec7335 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1325,6 +1325,19 @@ static int match_name_table_language( const FT_SfntName *name, LANGID lang ) if (name->language_id >= sizeof(mac_langid_table)/sizeof(mac_langid_table[0])) return 0; name_lang = mac_langid_table[name->language_id]; break; + case TT_PLATFORM_APPLE_UNICODE: + switch (name->encoding_id) + { + case TT_APPLE_ID_DEFAULT: + case TT_APPLE_ID_ISO_10646: + case TT_APPLE_ID_UNICODE_2_0: + if (name->language_id >= sizeof(mac_langid_table)/sizeof(mac_langid_table[0])) return 0; + name_lang = mac_langid_table[name->language_id]; + break; + default: + return 0; + } + break; default: return 0; } @@ -1342,6 +1355,7 @@ static WCHAR *copy_name_table_string( const FT_SfntName *name ) switch (name->platform_id) { + case TT_PLATFORM_APPLE_UNICODE: case TT_PLATFORM_MICROSOFT: ret = HeapAlloc( GetProcessHeap(), 0, name->string_len + sizeof(WCHAR) ); for (i = 0; i < name->string_len / 2; i++)
1
0
0
0
Alexandre Julliard : gdi32: Add support for loading name strings in Macintosh format.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: 3d0f044883e361ec6c9379cd3da85b9dc7f366fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d0f044883e361ec6c9379cd3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 20 15:04:11 2013 +0200 gdi32: Add support for loading name strings in Macintosh format. --- dlls/gdi32/freetype.c | 158 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 153 insertions(+), 5 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3d0f044883e361ec6c937…
1
0
0
0
Alexandre Julliard : gdi32: Improve font name localization by not requiring a strict language match.
by Alexandre Julliard
20 Jun '13
20 Jun '13
Module: wine Branch: master Commit: b05b637c9179b7b01f21f5fd80e46cf405c04419 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b05b637c9179b7b01f21f5fd8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 20 13:36:34 2013 +0200 gdi32: Improve font name localization by not requiring a strict language match. --- dlls/gdi32/freetype.c | 114 +++++++++++++++++++++++-------------------------- 1 files changed, 53 insertions(+), 61 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 62e1608..dc08fc2 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1173,69 +1173,74 @@ static void LoadSubstList(void) } -/***************************************************************** - * get_name_table_entry - * - * Supply the platform, encoding, language and name ids in req - * and if the name exists the function will fill in the string - * and string_len members. The string is owned by FreeType so - * don't free it. Returns TRUE if the name is found else FALSE. - */ -static BOOL get_name_table_entry(FT_Face ft_face, FT_SfntName *req) +static int match_name_table_language( const FT_SfntName *name, LANGID lang ) { - FT_SfntName name; - FT_UInt num_names, name_index; + LANGID name_lang; - if(FT_IS_SFNT(ft_face)) + switch (name->platform_id) { - num_names = pFT_Get_Sfnt_Name_Count(ft_face); - - for(name_index = 0; name_index < num_names; name_index++) + case TT_PLATFORM_MICROSOFT: + switch (name->encoding_id) { - if(!pFT_Get_Sfnt_Name(ft_face, name_index, &name)) - { - if((name.platform_id == req->platform_id) && - ((name.encoding_id == TT_MS_ID_UNICODE_CS) || (name.encoding_id == TT_MS_ID_SYMBOL_CS)) && - (name.language_id == req->language_id) && - (name.name_id == req->name_id)) - { - req->string = name.string; - req->string_len = name.string_len; - return TRUE; - } - } + case TT_MS_ID_UNICODE_CS: + case TT_MS_ID_SYMBOL_CS: + name_lang = name->language_id; + break; + default: + return 0; } + break; + default: + return 0; } - req->string = NULL; - req->string_len = 0; - return FALSE; + if (name_lang == lang) return 3; + if (PRIMARYLANGID( name_lang ) == PRIMARYLANGID( lang )) return 2; + if (name_lang == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )) return 1; + return 0; } -static WCHAR *get_face_name(FT_Face ft_face, FT_UShort name_id, FT_UShort language_id) +static WCHAR *copy_name_table_string( const FT_SfntName *name ) +{ + WCHAR *ret; + int i; + + ret = HeapAlloc( GetProcessHeap(), 0, name->string_len + sizeof(WCHAR) ); + for (i = 0; i < name->string_len / 2; i++) + ret[i] = (name->string[i * 2] << 8) | name->string[i * 2 + 1]; + ret[i] = 0; + return ret; +} + +static WCHAR *get_face_name(FT_Face ft_face, FT_UShort name_id, LANGID language_id) { - WCHAR *ret = NULL; FT_SfntName name; + FT_UInt num_names, name_index; + int res, best_lang = 0, best_index = -1; - name.platform_id = TT_PLATFORM_MICROSOFT; - name.language_id = language_id; - name.name_id = name_id; + if (!FT_IS_SFNT(ft_face)) return NULL; - if(get_name_table_entry(ft_face, &name)) - { - FT_UInt i; + num_names = pFT_Get_Sfnt_Name_Count( ft_face ); - /* String is not nul terminated and string_len is a byte length. */ - ret = HeapAlloc(GetProcessHeap(), 0, name.string_len + 2); - for(i = 0; i < name.string_len / 2; i++) + for (name_index = 0; name_index < num_names; name_index++) + { + if (pFT_Get_Sfnt_Name( ft_face, name_index, &name )) continue; + if (name.name_id != name_id) continue; + res = match_name_table_language( &name, language_id ); + if (res > best_lang) { - WORD *tmp = (WORD *)&name.string[i * 2]; - ret[i] = GET_BE_WORD(*tmp); + best_lang = res; + best_index = name_index; } - ret[i] = 0; - TRACE("Got localised name %s\n", debugstr_w(ret)); } - return ret; + if (best_index != -1 && !pFT_Get_Sfnt_Name( ft_face, best_index, &name )) + { + WCHAR *ret = copy_name_table_string( &name ); + TRACE( "name %u found platform %u lang %04x %s\n", + name_id, name.platform_id, name.language_id, debugstr_w( ret )); + return ret; + } + return NULL; } static inline BOOL faces_equal( const Face *f1, const Face *f2 ) @@ -1614,7 +1619,7 @@ static WCHAR *prepend_at(WCHAR *family) static void get_family_names( FT_Face ft_face, WCHAR **name, WCHAR **english, BOOL vertical ) { - *english = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + *english = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT) ); if (!*english) *english = towstr( CP_ACP, ft_face->family_name ); *name = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, GetSystemDefaultLCID() ); @@ -1777,16 +1782,9 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, face->refcount = 1; face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, GetSystemDefaultLangID() ); - if (!face->StyleName) - face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); - if (!face->StyleName) - { - face->StyleName = towstr( CP_ACP, ft_face->style_name ); - } + if (!face->StyleName) face->StyleName = towstr( CP_ACP, ft_face->style_name ); face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); - if (!face->FullName) - face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (flags & ADDFONT_VERTICAL_FONT) face->FullName = prepend_at( face->FullName ); @@ -6998,8 +6996,6 @@ static BOOL get_outline_text_metrics(GdiFont *font) style_nameW = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, GetSystemDefaultLangID() ); if (!style_nameW) - style_nameW = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); - if (!style_nameW) { FIXME("failed to read style_nameW for font %s!\n", wine_dbgstr_w(font->name)); style_nameW = towstr( CP_ACP, ft_face->style_name ); @@ -7008,8 +7004,6 @@ static BOOL get_outline_text_metrics(GdiFont *font) face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); if (!face_nameW) - face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); - if (!face_nameW) { FIXME("failed to read face_nameW for font %s!\n", wine_dbgstr_w(font->name)); face_nameW = strdupW(font->name); @@ -7019,8 +7013,6 @@ static BOOL get_outline_text_metrics(GdiFont *font) full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); if (!full_nameW) - full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); - if (!full_nameW) { WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w(font->name));
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
42
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
Results per page:
10
25
50
100
200