mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-18 06:13:55 -07:00
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 |
||
|---|---|---|
| .. | ||
| ObjectBases | ||
| ObjectTypes | ||
| Scripting | ||
| SettingTypes | ||
| tests | ||
| CGUI.cpp | ||
| CGUI.h | ||
| CGUIScrollBarHorizontal.cpp | ||
| CGUIScrollBarHorizontal.h | ||
| CGUIScrollBarVertical.cpp | ||
| CGUIScrollBarVertical.h | ||
| CGUISetting.cpp | ||
| CGUISetting.h | ||
| CGUISprite.cpp | ||
| CGUISprite.h | ||
| CGUIText.cpp | ||
| CGUIText.h | ||
| GUIManager.cpp | ||
| GUIManager.h | ||
| GUIObjectEventBroadcaster.h | ||
| GUIObjectTypes.cpp | ||
| GUIRenderer.cpp | ||
| GUIRenderer.h | ||
| GUIStringConversions.cpp | ||
| GUITooltip.cpp | ||
| GUITooltip.h | ||
| IGUIScrollBar.cpp | ||
| IGUIScrollBar.h | ||
| SGUIIcon.h | ||
| SGUIMessage.h | ||
| SGUIStyle.h | ||