diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-17 14:58:11 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 14:58:11 +1100 |
commit | 1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4 (patch) | |
tree | f25f7353ad23c041da607b07b5ddd247214ba90c /src/Editor.cxx | |
parent | 7fbe52f835688967a6079582ed8839cb55d0f9ea (diff) | |
download | scintilla-mirror-1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4.tar.gz |
Change Font to an interface and stop using FontID. Fonts are shared and
reference counted using std::shared_ptr. This optimizes memory and reduces
potential for allocation bugs.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index f9bf5a582..7fa790469 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1829,7 +1829,7 @@ long Editor::TextWidth(uptr_t style, const char *text) { RefreshStyleData(); AutoSurface surface(this); if (surface) { - return std::lround(surface->WidthText(vs.styles[style].font, text)); + return std::lround(surface->WidthText(vs.styles[style].font.get(), text)); } else { return 1; } |