From 19706a12a4339e6c2adbcaa707ba1206fb7c0582 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Fri, 25 Oct 2019 18:12:56 +1100 Subject: [PATCH] 261 korean fonts (#276) * fix: linting * chore: bump version * fix: unicode text for Windows * fix: re-add webview_set_title --- CONTRIBUTORS.md | 1 + lib/renderer/webview/webview.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4204780d0..a0617490d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -20,3 +20,4 @@ Wails is what it is because of the time and effort given by these great people. * [Toyam Cox](https://github.com/Vaelatern) * [Robin Eklind](https://github.com/mewmew) * [Kris Raney](https://github.com/kraney) +* [soon cheol shin](https://github.com/scshin0572) diff --git a/lib/renderer/webview/webview.h b/lib/renderer/webview/webview.h index f6c4e36a5..d15777cce 100644 --- a/lib/renderer/webview/webview.h +++ b/lib/renderer/webview/webview.h @@ -217,6 +217,21 @@ struct webview_priv va_end(ap); } + WEBVIEW_API void webview_set_title(struct webview *w, const char *title) + { + #ifdef UNICODE + wchar_t *u16title = webview_to_utf16(title); + if (u16title == NULL) + { + return; + } + SetWindowText(w->priv.hwnd, u16title); + GlobalFree(u16title); + #else + SetWindowText(w->priv.hwnd, title); + #endif + } + static int webview_js_encode(const char *s, char *esc, size_t n) { int r = 1; /* At least one byte for trailing zero */