win: Setup font.
This commit is contained in:
parent
0f5b427648
commit
8d3f615e61
1 changed files with 26 additions and 0 deletions
|
@ -24,8 +24,29 @@
|
|||
#include "browser/views/views_delegate.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/l10n/l10n_util_win.h"
|
||||
#include "ui/gfx/platform_font_win.h"
|
||||
#endif
|
||||
|
||||
namespace brightray {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
namespace {
|
||||
|
||||
// gfx::Font callbacks
|
||||
void AdjustUIFont(LOGFONT* logfont) {
|
||||
l10n_util::AdjustUIFont(logfont);
|
||||
}
|
||||
|
||||
int GetMinimumFontSize() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
BrowserMainParts::BrowserMainParts() {
|
||||
}
|
||||
|
||||
|
@ -51,6 +72,11 @@ void BrowserMainParts::ToolkitInitialized() {
|
|||
#if defined(TOOLKIT_VIEWS)
|
||||
views_delegate_.reset(new ViewsDelegate);
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont;
|
||||
gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize;
|
||||
#endif
|
||||
}
|
||||
|
||||
void BrowserMainParts::PreMainMessageLoopStart() {
|
||||
|
|
Loading…
Reference in a new issue