diff --git a/ppl2psd.py b/ppl2psd.py index eb452bd..25a1cce 100644 --- a/ppl2psd.py +++ b/ppl2psd.py @@ -565,8 +565,8 @@ def build_type_layer_tysh(ly: dict, font_ps: str, text_w: Optional[float] = None # text box (0,0,tw,th) so the edit box is small and sits at the text. tysh.transform = [1.0, 0.0, 0.0, 1.0, float(l), float(t)] tysh.left, tysh.top, tysh.right, tysh.bottom = int(l), int(t), int(rr), int(bb2) - tw = text_w if text_w else (rr - l) - th = size_px * 0.9 # ~glyph height + tw = (text_w if text_w else (rr - l)) * 1.1 + size_px * 0.3 # headroom so the last glyph is not clipped + th = size_px * 1.1 bbd = td[b"boundingBox"] bbd[b"Left"].value = 0.0 bbd[b"Top "].value = 0.0