Jake A.
Jake A.

Reputation: 550

Xcode: Editor line height inconsistent when inputting multibyte characters

The line height slightly gets larger when I type multibyte characters in Xcode (in the picture it's Japanese) and I find it very annoying.

I tried changing the system language to Japanese and also tried Japanese fonts but no luck. This issue doesn't happen in other editors e.g. VSCode.

Is there any way to fix it?

macOS: Big Sur 11.2.3
macOS System Language: English
Xcode: 12.4
Editor Font: SF Mono

Line height is slightly larger when inputting multibyte characters.

Upvotes: 0

Views: 72

Answers (2)

Spiderus
Spiderus

Reputation: 11

I had the same issue when using emoji's in Xcode editor e.g.:

 print("Lorem ipsum.")
 print("Lorem ipsum.")
 --- here there was an extra top line space due to the emoji used on the line below---
 print("➡️ Lorem ipsum.")
 print("Lorem ipsum.")

Solution: I increased the font size in: Xcode -> Settings -> Theme -> increased the font for all text (e.g. from 14 to 18) and the extra space is now gone.

NB: I am using Xcode v.14.3

Upvotes: 0

Jake A.
Jake A.

Reputation: 550

It turned out that it was a font related issue after all. I changed to another font and now the problem is gone. I'm still not sure what wasn't right and what solved the issue though.

Upvotes: 0

Related Questions