Description
Fix the dominant-baseline positioning discrepancy for bounding box text mentioned in the TODO comment at src/psd2svg/core/text.py:317.
Current Behavior
Bounding box text (ShapeType=1) positioning may not accurately match Photoshop's layout, particularly for baseline alignment.
Expected Behavior
Text baseline should align correctly within bounding boxes to match Photoshop's rendering as closely as possible.
Implementation Notes
- The TODO at line 317 in
text.py indicates a known issue with dominant_baseline positioning
- This affects the
_compute_paragraph_position method
- Needs empirical testing to determine correct baseline values
- Focus on achieving "acceptable tolerance" (e.g., ±2px) rather than pixel-perfect matching
Related
Success Criteria
Description
Fix the dominant-baseline positioning discrepancy for bounding box text mentioned in the TODO comment at
src/psd2svg/core/text.py:317.Current Behavior
Bounding box text (ShapeType=1) positioning may not accurately match Photoshop's layout, particularly for baseline alignment.
Expected Behavior
Text baseline should align correctly within bounding boxes to match Photoshop's rendering as closely as possible.
Implementation Notes
text.pyindicates a known issue withdominant_baselinepositioning_compute_paragraph_positionmethodRelated
src/psd2svg/core/text.py:310-347Success Criteria