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
July
June
May
April
March
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
July 2008
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
3 participants
1114 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Properly update position after dragging an iconic window.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 2734fb44e0f4065179044b9eb93f87a7630f292d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2734fb44e0f4065179044b9eb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 7 15:51:30 2008 +0200 user32: Properly update position after dragging an iconic window. --- dlls/user32/winpos.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index a64c621..acfd481
…
[View More]
100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2591,7 +2591,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) if (!((msg.message == WM_KEYDOWN) && (msg.wParam == VK_ESCAPE)) ) { /* NOTE: SWP_NOACTIVATE prevents document window activation in Word 6 */ - if(!DragFullWindows) + if(!DragFullWindows || iconic) SetWindowPos( hwnd, 0, sizingRect.left, sizingRect.top, sizingRect.right - sizingRect.left, sizingRect.bottom - sizingRect.top,
[View Less]
1
0
0
0
Alexandre Julliard : winealsa.drv: Don't trace deprecated parameters.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 123f8d0f2c4ba19235c6c8dd1958c8882d9d2905 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=123f8d0f2c4ba19235c6c8dd1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 7 14:53:49 2008 +0200 winealsa.drv: Don't trace deprecated parameters. --- dlls/winealsa.drv/alsa.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index ce6b75d..a4b1008 100644 ---
…
[View More]
a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -735,7 +735,6 @@ if (err<0) { \ } while(0); X(period_time); - X(tick_time); #undef X if (!sw)
[View Less]
1
0
0
0
Alexandre Julliard : gdiplus: Store the family name directly in the GpFontFamily structure.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: ed985acd9ff9a772d14191610d8cd0a704513a05 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed985acd9ff9a772d14191610…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 7 14:53:10 2008 +0200 gdiplus: Store the family name directly in the GpFontFamily structure. --- dlls/gdiplus/font.c | 28 +++++----------------------- dlls/gdiplus/gdiplus_private.h | 2 +- 2 files changed, 6 insertions(+), 24 deletions(-)
…
[View More]
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 217481a..63e314d 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -98,7 +98,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily, const NEWTEXTMETRICW* tmw; GpStatus stat; - if (!fontFamily || !fontFamily->FamilyName || !font) + if (!fontFamily || !font) return InvalidParameter; TRACE("%p (%s), %f, %d, %d, %p\n", fontFamily, @@ -118,7 +118,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily, lfw->lfStrikeOut = tmw->tmStruckOut; lfw->lfCharSet = tmw->tmCharSet; lfw->lfPitchAndFamily = tmw->tmPitchAndFamily; - lstrcpynW((lfw->lfFaceName), facename, sizeof(WCHAR) * LF_FACESIZE); + lstrcpynW(lfw->lfFaceName, facename, LF_FACESIZE); switch (unit) { @@ -405,15 +405,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, if (!ffamily) return OutOfMemory; ffamily->tmw = ntm; - - ffamily->FamilyName = GdipAlloc(LF_FACESIZE * sizeof (WCHAR)); - if (!ffamily->FamilyName) - { - GdipFree(ffamily); - return OutOfMemory; - } - - lstrcpynW(ffamily->FamilyName, name, sizeof(WCHAR) * LF_FACESIZE); + lstrcpynW(ffamily->FamilyName, name, LF_FACESIZE); *FontFamily = ffamily; @@ -442,17 +434,8 @@ GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily** *clonedFontFamily = GdipAlloc(sizeof(GpFontFamily)); if (!*clonedFontFamily) return OutOfMemory; - **clonedFontFamily = *FontFamily; - - (*clonedFontFamily)->FamilyName = GdipAlloc(sizeof(WCHAR) * LF_FACESIZE); - if (!(*clonedFontFamily)->FamilyName) - { - GdipFree (clonedFontFamily); - return OutOfMemory; - } - - lstrcpynW((*clonedFontFamily)->FamilyName, FontFamily->FamilyName, - LF_FACESIZE); + (*clonedFontFamily)->tmw = FontFamily->tmw; + lstrcpyW((*clonedFontFamily)->FamilyName, FontFamily->FamilyName); return Ok; } @@ -510,7 +493,6 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily) return InvalidParameter; TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName)); - GdipFree (FontFamily->FamilyName); GdipFree (FontFamily); return Ok; diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 2b953bf..e7ca874 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -193,7 +193,7 @@ struct GpFontCollection{ struct GpFontFamily{ NEWTEXTMETRICW tmw; - WCHAR* FamilyName; + WCHAR FamilyName[LF_FACESIZE]; }; #endif
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Implement GdipGetEmHeight.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: d17d5664129c20c16282df1d05a9c67df258b11f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d17d5664129c20c16282df1d0…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:27:02 2008 -0400 gdiplus: Implement GdipGetEmHeight. --- dlls/gdiplus/font.c | 7 +++++-- dlls/gdiplus/tests/font.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index baba8e9..
…
[View More]
217481a 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -554,9 +554,12 @@ GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily *family, INT style, U { if (!(family && EmHeight)) return InvalidParameter; - FIXME("Stub!\n"); + TRACE("%p (%s), %d, %p, stub!\n", family, + debugstr_w(family->FamilyName), style, EmHeight); - return NotImplemented; + *EmHeight = family->tmw.ntmSizeEM; + + return Ok; } diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index b1cb340..51fd327 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -204,11 +204,11 @@ todo_wine stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok (result == 2355, "Expected 2355, got %d\n", result); +} result = 0; stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 2048, "Expected 2048, got %d\n", result); -} result = 0; stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); expect(Ok, stat); @@ -225,11 +225,11 @@ todo_wine stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 2355, "Expected 2355, got %d\n", result); +} result = 0; stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 2048, "Expected 2048, got %d\n", result); -} result = 0; stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); expect(Ok, stat);
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Implement GdipGetCellDescent.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: e96b07d73fe00ce39fa794fbc2eedf8eea812a0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e96b07d73fe00ce39fa794fbc…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:57 2008 -0400 gdiplus: Implement GdipGetCellDescent. --- dlls/gdiplus/font.c | 7 ++++--- dlls/gdiplus/tests/font.c | 6 ------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index
…
[View More]
bead434..baba8e9 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -526,13 +526,14 @@ GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family, return Ok; } -GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellDescent) +GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family, + INT style, UINT16* CellDescent) { if (!(family && CellDescent)) return InvalidParameter; - FIXME("stub!\n"); + *CellDescent = family->tmw.tmDescent; - return NotImplemented; + return Ok; } /******************************************************************************* diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 2160c9c..b1cb340 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -214,11 +214,8 @@ todo_wine expect(Ok, stat); ok(result == 1854, "Expected 1854, got %d\n", result); result = 0; -todo_wine -{ stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); ok(result == 434, "Expected 434, got %d\n", result); -} GdipDeleteFontFamily(FontFamily); GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily); @@ -238,11 +235,8 @@ todo_wine expect(Ok, stat); ok(result == 1825, "Expected 1825, got %d\n", result); result = 0; -todo_wine -{ stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); ok(result == 443, "Expected 443 got %d\n", result); -} GdipDeleteFontFamily(FontFamily); }
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Implement GdipGetCellAscent.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 6fabc9021961099e0674b0ed931ac483df351c67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6fabc9021961099e0674b0ed9…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:53 2008 -0400 gdiplus: Implement GdipGetCellAscent. --- dlls/gdiplus/font.c | 7 ++++--- dlls/gdiplus/tests/font.c | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index
…
[View More]
4e443cf..bead434 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -516,13 +516,14 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily) return Ok; } -GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellAscent) +GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family, + INT style, UINT16* CellAscent) { if (!(family && CellAscent)) return InvalidParameter; - FIXME("stub!\n"); + *CellAscent = family->tmw.tmAscent; - return NotImplemented; + return Ok; } GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellDescent) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index e09c937..2160c9c 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -208,11 +208,14 @@ todo_wine stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 2048, "Expected 2048, got %d\n", result); +} result = 0; stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 1854, "Expected 1854, got %d\n", result); result = 0; +todo_wine +{ stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); ok(result == 434, "Expected 434, got %d\n", result); } @@ -229,11 +232,14 @@ todo_wine stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 2048, "Expected 2048, got %d\n", result); +} result = 0; stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); expect(Ok, stat); ok(result == 1825, "Expected 1825, got %d\n", result); result = 0; +todo_wine +{ stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); ok(result == 443, "Expected 443 got %d\n", result); }
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Tests for FontFamily properties.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: b5505f63262728c8d1db371f10b16b558cb7bd06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5505f63262728c8d1db371f1…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:44 2008 -0400 gdiplus: Tests for FontFamily properties. --- dlls/gdiplus/tests/font.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.
…
[View More]
c index 0aa597d..e09c937 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -192,6 +192,53 @@ static void test_fontfamily (void) GdipDeleteFontFamily(clonedFontFamily); } +static void test_fontfamily_properties (void) +{ + GpFontFamily* FontFamily = NULL; + GpStatus stat; + UINT16 result = 0; + + GdipCreateFontFamilyFromName(arial, NULL, &FontFamily); +todo_wine +{ + stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok (result == 2355, "Expected 2355, got %d\n", result); + result = 0; + stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 2048, "Expected 2048, got %d\n", result); + result = 0; + stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 1854, "Expected 1854, got %d\n", result); + result = 0; + stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); + ok(result == 434, "Expected 434, got %d\n", result); +} + GdipDeleteFontFamily(FontFamily); + + GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily); + result = 0; +todo_wine +{ + stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 2355, "Expected 2355, got %d\n", result); + result = 0; + stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 2048, "Expected 2048, got %d\n", result); + result = 0; + stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 1825, "Expected 1825, got %d\n", result); + result = 0; + stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); + ok(result == 443, "Expected 443 got %d\n", result); +} + GdipDeleteFontFamily(FontFamily); +} static void test_getgenerics (void) { @@ -245,6 +292,7 @@ START_TEST(font) test_createfont(); test_logfont(); test_fontfamily(); + test_fontfamily_properties(); test_getgenerics(); GdiplusShutdown(gdiplusToken);
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Use a better framework for filling out FontFamilies.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: c027f427efbc98149f9f57197f354d0a2c26ec94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c027f427efbc98149f9f57197…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:50 2008 -0400 gdiplus: Use a better framework for filling out FontFamilies. --- dlls/gdiplus/font.c | 40 ++++++++++++++++++++-------------------- dlls/gdiplus/gdiplus_private.h | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-)
…
[View More]
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index c7cea81..4e443cf 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -95,7 +95,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily, { WCHAR facename[LF_FACESIZE]; LOGFONTW* lfw; - const TEXTMETRICW* tmw; + const NEWTEXTMETRICW* tmw; GpStatus stat; if (!fontFamily || !fontFamily->FamilyName || !font) @@ -333,19 +333,31 @@ GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, return NotImplemented; } -/* Borrowed from GDI32 */ +/*********************************************************************** + * Borrowed from GDI32: + * + * Elf is really an ENUMLOGFONTEXW, and ntm is a NEWTEXTMETRICEXW. + * We have to use other types because of the FONTENUMPROCW definition. + */ static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) { + if (!ntm) + { + return 1; + } + + *(NEWTEXTMETRICW*)lParam = *(const NEWTEXTMETRICW*)ntm; + return 0; } -static BOOL is_font_installed(const WCHAR *name) +static BOOL find_installed_font(const WCHAR *name, NEWTEXTMETRICW *ntm) { HDC hdc = GetDC(0); BOOL ret = FALSE; - if(!EnumFontFamiliesW(hdc, name, is_font_installed_proc, 0)) + if(!EnumFontFamiliesW(hdc, name, is_font_installed_proc, (LPARAM)ntm)) ret = TRUE; ReleaseDC(0, hdc); @@ -377,9 +389,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, GpFontFamily **FontFamily) { GpFontFamily* ffamily; - HDC hdc; - HFONT hFont, hfont_old; - LOGFONTW lfw; + NEWTEXTMETRICW ntm; TRACE("%s, %p %p\n", debugstr_w(name), fontCollection, FontFamily); @@ -387,35 +397,25 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, return InvalidParameter; if (fontCollection) FIXME("No support for FontCollections yet!\n"); - if (!is_font_installed(name)) + + if (!find_installed_font(name, &ntm)) return FontFamilyNotFound; ffamily = GdipAlloc(sizeof (GpFontFamily)); if (!ffamily) return OutOfMemory; - hdc = GetDC(0); - lstrcpynW(lfw.lfFaceName, name, sizeof(WCHAR) * LF_FACESIZE); - lfw.lfCharSet = DEFAULT_CHARSET; - lfw.lfEscapement = lfw.lfOrientation = 0; - - hFont = CreateFontIndirectW (&lfw); - hfont_old = SelectObject(hdc, hFont); - - GetTextMetricsW(hdc, &ffamily->tmw); - DeleteObject(SelectObject(hdc, hfont_old)); + ffamily->tmw = ntm; ffamily->FamilyName = GdipAlloc(LF_FACESIZE * sizeof (WCHAR)); if (!ffamily->FamilyName) { GdipFree(ffamily); - ReleaseDC(0, hdc); return OutOfMemory; } lstrcpynW(ffamily->FamilyName, name, sizeof(WCHAR) * LF_FACESIZE); *FontFamily = ffamily; - ReleaseDC(0, hdc); return Ok; } diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index b8269f2..2b953bf 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -192,7 +192,7 @@ struct GpFontCollection{ }; struct GpFontFamily{ - TEXTMETRICW tmw; + NEWTEXTMETRICW tmw; WCHAR* FamilyName; };
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Stub GdipGetFontHeightGivenDPI.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 25e4fd7d3cf557ac937051b979af778e7fe534b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25e4fd7d3cf557ac937051b97…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:41 2008 -0400 gdiplus: Stub GdipGetFontHeightGivenDPI. --- dlls/gdiplus/font.c | 25 +++++++++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 27 insertions(+), 1 deletions(-) diff --git a/
…
[View More]
dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 5337c6f..c7cea81 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -308,6 +308,31 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) return Ok; } +/******************************************************************************* + * GdipGetFontHeightGivenDPI [GDIPLUS.@] + * PARAMS + * font [I] Font to retrieve DPI from + * dpi [I] DPI to assume + * height [O] Return value + * + * RETURNS + * SUCCESS: Ok + * FAILURE: InvalidParameter if font or height is NULL + * + * NOTES + * According to MSDN, the result is (lineSpacing)*(fontSize / emHeight)*dpi + * (for anything other than unit Pixel) + */ +GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height) +{ + if (!(font && height)) return InvalidParameter; + + FIXME("%p (%s), %f, %p\n)", font, + debugstr_w(font->lfw.lfFaceName), dpi, height); + + return NotImplemented; +} + /* Borrowed from GDI32 */ static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index afd07c4..861b68d 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -268,7 +268,7 @@ @ stub GdipGetFontCollectionFamilyCount @ stub GdipGetFontCollectionFamilyList @ stub GdipGetFontHeight -@ stub GdipGetFontHeightGivenDPI +@ stdcall GdipGetFontHeightGivenDPI(ptr long ptr) @ stdcall GdipGetFontSize(ptr ptr) @ stub GdipGetFontStyle @ stdcall GdipGetFontUnit(ptr ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 5791168..3c8d587 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -372,6 +372,7 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*); +GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*); GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*, GpFontCollection*, GpFontFamily**);
[View Less]
1
0
0
0
Adam Petaccia : gdiplus: Stub GdipGetCellDescent.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: f6da80297dfe5b86ac60434c1b59c998d6d6042e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6da80297dfe5b86ac60434c1…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Thu Jul 3 14:26:37 2008 -0400 gdiplus: Stub GdipGetCellDescent. --- dlls/gdiplus/font.c | 9 +++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/
…
[View More]
dlls/gdiplus/font.c index a5e3b01..5337c6f 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -500,6 +500,15 @@ GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family, INT style, return NotImplemented; } +GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellDescent) +{ + if (!(family && CellDescent)) return InvalidParameter; + + FIXME("stub!\n"); + + return NotImplemented; +} + /******************************************************************************* * GdipGetEmHeight [GDIPLUS.@] * diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index d054503..afd07c4 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -243,7 +243,7 @@ @ stub GdipGetAllPropertyItems @ stdcall GdipGetBrushType(ptr ptr) @ stdcall GdipGetCellAscent(ptr long ptr) -@ stub GdipGetCellDescent +@ stdcall GdipGetCellDescent(ptr long ptr) @ stdcall GdipGetClip(ptr ptr) @ stub GdipGetClipBounds @ stub GdipGetClipBoundsI diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index cd940f0..5791168 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -379,6 +379,7 @@ GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily*, GpFontFamily**); GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*); GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*, WCHAR*, LANGID); GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily*, INT, UINT16*); +GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily*, INT, UINT16*); GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily*, INT, UINT16*); GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily*, INT, UINT16*);
[View Less]
1
0
0
0
← Newer
1
...
85
86
87
88
89
90
91
...
112
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200