ElasticNotepad icon indicating copy to clipboard operation
ElasticNotepad copied to clipboard

Spacing calculation with different fonts

Open geroldmeisinger opened this issue 1 year ago • 0 comments

if you define padding and width based on a font (like line-height or m character) how do you calculate the spacing if different proportional fonts are used for different language features and lines?

foobar() {
→   print("hello")↔ // print 
→   myvar = 1↔      /* assign */
}

(lets say we use a different font or even just a different font size for: function header, function call, line comment, assignment, block comment etc.)

or simplified as

m0m
    m1m    m3m
    m2m    m4m

each m could have a completely different width

geroldmeisinger avatar Nov 13 '24 11:11 geroldmeisinger