cbrewster / brewcode

Brew(ster) code editor
MIT License
19 stars 3 forks source link

Support better text metrics #8

Open cbrewster opened 4 years ago

cbrewster commented 4 years ago

Right now some text metrics are hard-coded (especially those related to hit_testing), we should instead use actual text metrics from the font itself. To do this, we probably need to store the text layout somewhere. Right now, we regenerate the text layout whenever we render, but this is expensive and we don't have access to the result text layout outside of the render method.