0ad/source/gui/ObjectTypes
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
..
CButton.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CButton.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CChart.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CChart.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CCheckBox.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CCheckBox.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CDropDown.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CDropDown.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CGUIDummyObject.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CHotkeyPicker.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CHotkeyPicker.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CImage.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CImage.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CInput.cpp Align font height, capHeight to FreeType metrics 2025-06-11 08:10:18 -05:00
CInput.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CList.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CList.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CMiniMap.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CMiniMap.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
COList.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
COList.h Finish implementing property "textcolor_selected" for list GUI objects 2024-07-03 08:32:52 +00:00
CProgressBar.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CProgressBar.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CRadioButton.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CRadioButton.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CScrollPanel.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CScrollPanel.h Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CSlider.cpp Remove FALLTHROUGH on empty cases 2025-01-29 19:34:12 +01:00
CSlider.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CText.cpp Add scrollpanel widget 2024-11-12 15:01:42 -05:00
CText.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CTooltip.cpp Tooltip set like ghost 2024-10-27 17:18:42 -05:00
CTooltip.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00