Skip to content

Commit

Permalink
Fix an issue where drawn text would flicker slightly when moving the …
Browse files Browse the repository at this point in the history
…cursor.
  • Loading branch information
akiyosi committed Jan 26, 2024
1 parent 1ee80bc commit 7d02616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/font.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func initFontNew(family string, size float64, weight gui.QFont__Weight, stretch,
// font := gui.NewQFont2(family, size, int(gui.QFont__Normal), false)
font := gui.NewQFont()
if editor.config.Editor.ManualFontFallback {
font.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__NoFontMerging)
font.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__NoFontMerging|gui.QFont__ForceIntegerMetrics)
} else {
font.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__PreferDefault|gui.QFont__ForceIntegerMetrics)
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func (f *Font) change(family string, size float64, weight gui.QFont__Weight, str
f.qfont.SetFamily(family)

if editor.config.Editor.ManualFontFallback {
f.qfont.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__NoFontMerging)
f.qfont.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__NoFontMerging|gui.QFont__ForceIntegerMetrics)
} else {
f.qfont.SetStyleHint(gui.QFont__TypeWriter, gui.QFont__PreferDefault|gui.QFont__ForceIntegerMetrics)
}
Expand Down

0 comments on commit 7d02616

Please sign in to comment.