mirror of
https://github.com/akiyosi/goneovim.git
synced 2025-08-05 10:34:36 +02:00
Fix character drawing process
This commit is contained in:
parent
2a5da0a517
commit
154e5e5344
1 changed files with 6 additions and 5 deletions
|
@ -2716,11 +2716,12 @@ func (w *Window) newTextCache(text string, highlight *Highlight, isNormalWidth b
|
|||
)
|
||||
}
|
||||
|
||||
width := float64(len(text)-1)*font.cellwidth + font.italicWidth
|
||||
// width := float64(len(text)-1)*font.cellwidth + font.italicWidth
|
||||
width := fontfallbacked.fontMetrics.HorizontalAdvance(text, -1)
|
||||
fg := highlight.fg()
|
||||
if !isNormalWidth {
|
||||
width = fontfallbacked.fontMetrics.HorizontalAdvance(text, -1)
|
||||
}
|
||||
// if !isNormalWidth {
|
||||
// width = fontfallbacked.fontMetrics.HorizontalAdvance(text, -1)
|
||||
// }
|
||||
|
||||
// QImage default device pixel ratio is 1.0,
|
||||
// So we set the correct device pixel ratio
|
||||
|
@ -3516,7 +3517,7 @@ func (w *Window) focusGrid() {
|
|||
}
|
||||
|
||||
// convertWindowsToUnixPath converts a Windows path to a Unix path as wslpath does.
|
||||
func convertWindowsToUnixPath(winPath string) string {
|
||||
func convertWindowsToUnixPath(winPath string) string {
|
||||
unixPath := strings.ReplaceAll(winPath, `\`, `/`)
|
||||
if len(unixPath) <= 2 {
|
||||
return unixPath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue