Chromium Code Reviews| Index: chrome/browser/android/vr_shell/textures/ui_texture.cc |
| diff --git a/chrome/browser/android/vr_shell/textures/ui_texture.cc b/chrome/browser/android/vr_shell/textures/ui_texture.cc |
| index 63299889200a2d7158006602f20e6aa0b5441584..ffe4fcb12a93926191d09d569385cf6f7104791f 100644 |
| --- a/chrome/browser/android/vr_shell/textures/ui_texture.cc |
| +++ b/chrome/browser/android/vr_shell/textures/ui_texture.cc |
| @@ -162,6 +162,21 @@ gfx::FontList UiTexture::GetDefaultFontList(int size) { |
| return gfx::FontList(gfx::Font(kDefaultFontFamily, size)); |
| } |
| +bool UiTexture::CheckFontList(int size, base::string16 text) { |
|
cjgrant
2017/05/25 17:47:24
I thought this change would use the existing chara
Ian Vollick
2017/05/26 03:48:09
It's true, they are slow. I may be misunderstandin
|
| + gfx::Font default_font(kDefaultFontFamily, size); |
| + |
| + // TODO(acondor): Query BrowserProcess to obtain the application locale. |
| + for (UChar32 c : CollectDifferentChars(text)) { |
| + std::string name = GetFallbackFontNameForChar(default_font, c, ""); |
|
cjgrant
2017/05/25 17:47:24
Up to you, but probably don't need "name";
if (Get
Ian Vollick
2017/05/26 03:48:09
The code ended up being structured differently, an
|
| + if (name.empty()) { |
| + // This happens a lot? |
|
acondor_
2017/05/25 15:51:42
GetFallbackFontNameForChar assumes that the defaul
cjgrant
2017/05/25 17:47:24
The comment and print look like leftover debug?
Ian Vollick
2017/05/26 03:48:09
Yeah, as we chatted about offline, this was in a W
|
| + LOG(ERROR) << "couldn't handle this char: " << c; |
| + return false; |
| + } |
| + } |
| + return true; |
| +} |
| + |
| gfx::FontList UiTexture::GetFontList(int size, base::string16 text) { |
| gfx::Font default_font(kDefaultFontFamily, size); |
| std::vector<gfx::Font> fonts{default_font}; |