0ad/source/gui
trompetin17 dfb4598186
Align font height, capHeight to FreeType metrics
Previously, `height` was derived from a manually chosen glyph (typically
"I", Standard Cap Height) using FontBuilder, and `lineSpacing` was used
inconsistently for layout logic as a height.

Now, with the FreeType-based system:
- `height` uses `face->size->metrics.height`, which includes the
  recommended line height with internal leading/line gap as defined by
  the font designer.
- `lineSpacing` was removed
- `GetCapHeight` uses the standard cap height + ascender to have a
  visual virtual alignment

This change standardizes font metric usage:
- Use `height` for vertical layout and line progression.
- Use `GetCapheight` in layout engines like `CGUIText` or `CGUIString`,

This ensures better alignment across fonts and consistent spacing in
multiline text rendering.

Fixes: #7962
2025-06-11 08:10:18 -05:00
..
ObjectBases Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
ObjectTypes Align font height, capHeight to FreeType metrics 2025-06-11 08:10:18 -05:00
Scripting Rename PushGuiPage to OpenChildPage 2025-03-09 10:39:20 +01:00
SettingTypes Align font height, capHeight to FreeType metrics 2025-06-11 08:10:18 -05:00
tests Align font height, capHeight to FreeType metrics 2025-06-11 08:10:18 -05:00
CGUI.cpp Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
CGUI.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUIScrollBarHorizontal.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUIScrollBarHorizontal.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUIScrollBarVertical.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUIScrollBarVertical.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUISetting.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CGUISetting.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CGUISprite.cpp Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
CGUISprite.h Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
CGUIText.cpp Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
CGUIText.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
GUIManager.cpp Reduce allocations for GUI and Hotkeys. 2025-04-24 15:11:22 +02:00
GUIManager.h Reduce allocations for GUI and Hotkeys. 2025-04-24 15:11:22 +02:00
GUIObjectEventBroadcaster.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
GUIObjectTypes.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
GUIRenderer.cpp Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
GUIRenderer.h Add font engine aware of Gui.scale 2025-05-26 13:12:47 -05:00
GUIStringConversions.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
GUITooltip.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
GUITooltip.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
IGUIScrollBar.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
IGUIScrollBar.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
SGUIIcon.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
SGUIMessage.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
SGUIStyle.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00