mirror of
https://github.com/colinc86/LaTeXSwiftUI.git
synced 2026-04-03 00:09:29 -06:00
[BUG] Problem with localized texts #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yeahsilver on 7/7/2025
Hello! firstly, thank you for sharing this useful library.
I’m using this library to render LaTeX formulas in SwiftUI, and it’s working great overall. However, I’ve encountered an issue when rendering localized text (korean for me) text alongside formulas.
For example, when rendering something like Text("키를 입력하세요") (which means “Please enter height”) followed by a rendered LaTeX SVG image, the Korean text gets partially overlapped or clipped by the formula image.
After investigating, I suspect this might be due to how SVGGeometry handles the viewBox or vertical-align styles. It seems to work fine with Latin fonts, but Korean fonts typically have a larger x-height or vertical spacing, which results in the formula being rendered too low and interfering with the text.
Is there a recommended way to adjust for this — for example, by modifying the baseline offset when rendering SVGs next to languages like Korean that require more vertical space?
Thank you in advance!