Skip to content

Commit

Permalink
[WIN32SS][FONT] Fix font metrics (#713)
Browse files Browse the repository at this point in the history
Fix vertical alignment and Aspect penalty; improve font penalty system; fixes for Wine tests.
This is an update of #706. See CORE-11536 for more details.

The display of the following programs is fixed:
- Total Commander 8.52 setup: font displayed too large - CORE-11620.
- Effective File Search 6.8.1 german localization text rendering issues - CORE-14378.
- Font garbage in register splash screen in Foxit Reader 7.1.5 - CORE-9767.
- Calipers-1 is not displayed correctly - CORE-14302.
- Some MSI-installers draw their dialogs too large (example: Click-N-Type Virtual Keyboard 3.03.0412) - CORE-13161.
- Irfanview 4.50: font in zoom combobox displayed too large - CORE-14396.
- Rufus: The window and controls are displayed larger than necessary - CORE-14461.
  • Loading branch information
katahiromz authored and HBelusca committed Aug 12, 2018
1 parent 956086d commit 35f62fc
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 54 deletions.
2 changes: 1 addition & 1 deletion base/shell/explorer/trayclock.cpp
Expand Up @@ -534,7 +534,7 @@ LRESULT CTrayClockWnd::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH

hPrevFont = (HFONT) SelectObject(hDC, hFont);

rcClient.top = (rcClient.bottom / 2) - (CurrentSize.cy / 2);
rcClient.top = (rcClient.bottom - CurrentSize.cy) / 2;
rcClient.bottom = rcClient.top + CurrentSize.cy;

for (i = 0, line = 0;
Expand Down
4 changes: 4 additions & 0 deletions win32ss/gdi/eng/engobjects.h
Expand Up @@ -160,8 +160,12 @@ typedef struct _FONTGDI {
LONG tmDescent;
LONG tmInternalLeading;
LONG EmHeight;
LONG Magic;
} FONTGDI, *PFONTGDI;

/* The initialized 'Magic' value in FONTGDI */
#define FONTGDI_MAGIC 0x20110311

typedef struct _PATHGDI {
PATHOBJ PathObj;
} PATHGDI;
Expand Down

1 comment on commit 35f62fc

@JoachimHenze
Copy link
Contributor

@JoachimHenze JoachimHenze commented on 35f62fc Mar 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.