Closed thecoolwinter closed 1 year ago
Very nice! Just thinking ahead here, but how would this affect ligatures?
@austincondiff After some investigation, any letterSpacing > 1.0
disables ligatures as each character can no longer be connected visually. In CE we could add a small warning when enabling both ligatures and letterSpacing > 1 but that should be expected behavior.
@thecoolwinter I was trying to find this comment yesterday to respond to it. I think we disable the ligatures toggle if letters spacing is greater than one and add a description to why it is disabled.
Description
Adds a
letterSpacing
parameter that determines the amount of space between characters. The parameter is a multiplier of the font's character width so1.0
indicates no space,2.0
indicates a full character width's space. This is exactly as described in #153.In detail:
kern
variable that is used for all default attributes.This PR also adds documentation for a couple undocumented parameters in the initializer and moves
lineHeight
into theSTTextViewController
initializer for a cleanerCodeEditTextView
.Related Issues
Checklist
Screenshots
The below recording shows a placeholder settings adjusting the letter spacing, as well as the spacing being applied while typing.
https://user-images.githubusercontent.com/35942988/230160550-c540523c-4fb9-4984-8564-5bdebb7fbcb3.mov