Bug 1463 - Graph Font: Whitespace or undefined Glyphs shall not cover (any) height exceeding overall CharSequence
Summary: Graph Font: Whitespace or undefined Glyphs shall not cover (any) height excee...
Alias: None
Product: Jogl
Classification: JogAmp
Component: graph (show other bugs)
Version: 2.6.0
Hardware: All all
: P4 normal
Assignee: Sven Gothel
Depends on:
Reported: 2023-09-26 04:52 CEST by Sven Gothel
Modified: 2023-09-26 04:53 CEST (History)
2 users (show)

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2023-09-26 04:52:14 CEST
TypecastFont using `metrics.getAscentFU() - metrics.getDescentFU()` for ascent used for all undefined and whitespace Glyphs w/o a spatial outline,
leads to a potential exceeding height compared to the actual used
bounding box of the rendered text.
This in turn leads to layout issues, e.g. button labels are placed too low.

- Whitespace/Undefined: Drop full height 'metrics.getAscentFU() - metrics.getDescentFU()', b/c of non-existing shape height.
- Otherwise, layout on AABBox or created empty shape would pick up such default hhea-table ascent which might exceed actual string height.

Sideeffect would be if user relies on height of a whitespace.
However, knowing this fact - a user may always pick the hhea-table's ascent metric values as exposed in Font and Font.Metric.

This resolves remaining layout issues, including button labels.
Comment 1 Sven Gothel 2023-09-26 04:53:32 CEST
Fixed as described in commit 949558bc0bcd10a24293b5880c90940008d0118a