Bug 1463

Summary: Graph Font: Whitespace or undefined Glyphs shall not cover (any) height exceeding overall CharSequence
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: graphAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal CC: rami.santina, sgothel
Priority: P4    
Version: 2.6.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
949558bc0bcd10a24293b5880c90940008d0118a
Workaround: ---

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.

Solution:
- 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