-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Ref Create() comments say that one should "set your Config before creating App".
Line 51 in 0dfc793
| /// Config before creating App. (@see Platform::set_config) |
However, as AppWin::AppWin() constructor overrides with Platform::instance().set_config, it has no effect.
Line 23 in 0dfc793
| Platform::instance().set_config(config); |
For example, if I load https://google.co.kr like below,
auto& platform = ultralight::Platform::instance();
Config config;
config.font_family_standard = "Malgun Gothic";
config.font_family_fixed = "Malgun Gothic";
config.font_family_serif = "Malgun Gothic";
config.font_family_sans_serif = "Malgun Gothic";
config.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";
platform.set_config(config);
app_ = App::Create();
The CORRECT way to setup config is,
app_ = App::Create();
auto& platform = ultralight::Platform::instance();
Config config;
config.font_family_standard = "Malgun Gothic";
config.font_family_fixed = "Malgun Gothic";
config.font_family_serif = "Malgun Gothic";
config.font_family_sans_serif = "Malgun Gothic";
config.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";
platform.set_config(config);
app_->renderer() = Renderer::Create(); //this overides default config with 'my' config
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

