Commit 60c08536 authored by Linkun Chen's avatar Linkun Chen Committed by Commit Bot

[Chromecast] Bundle fonts into browser

Make chromecast load additional font files from fonts/.

Bug: 69627595
Test: On chromecast, force HTML elements to use local font.
Change-Id: Idcebbf197db2cbe9ebe8b88be8c690ae7440bc62
Reviewed-on: https://chromium-review.googlesource.com/902774Reviewed-by: default avatarStephen Lanham <slan@chromium.org>
Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Commit-Queue: Linkun Chen <lkchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534741}
parent 5740ca88
......@@ -395,7 +395,13 @@ void CastBrowserMainParts::ToolkitInitialized() {
// the background (resources have not yet been granted to cast) since it
// prevents the long delay the user would have seen on first rendering. Note
// that future calls to FcInit() are safe no-ops per the FontConfig interface.
FcChar8 bundle_dir[] = "fonts/";
FcInit();
if (FcConfigAppFontAddDir(nullptr, bundle_dir) == FcFalse) {
LOG(ERROR) << "Cannot load fonts from " << bundle_dir;
}
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment