| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/app/blink_test_platform_support.h" | 5 #include "content/shell/app/blink_test_platform_support.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 for (size_t i = 0; i < arraysize(kLocalFonts); ++i) { | 44 for (size_t i = 0; i < arraysize(kLocalFonts); ++i) { |
| 45 if (!gfx::LoadFontIntoFontconfig(base_path.Append(kLocalFonts[i]))) | 45 if (!gfx::LoadFontIntoFontconfig(base_path.Append(kLocalFonts[i]))) |
| 46 return false; | 46 return false; |
| 47 } | 47 } |
| 48 | 48 |
| 49 base::FilePath garuda_path("/usr/share/fonts/truetype/thai/Garuda.ttf"); | 49 base::FilePath garuda_path("/usr/share/fonts/truetype/thai/Garuda.ttf"); |
| 50 if (!base::PathExists(garuda_path)) | 50 if (!base::PathExists(garuda_path)) |
| 51 garuda_path = base::FilePath("/usr/share/fonts/truetype/tlwg/Garuda.ttf"); | 51 garuda_path = base::FilePath("/usr/share/fonts/truetype/tlwg/Garuda.ttf"); |
| 52 if (!base::PathExists(garuda_path)) |
| 53 garuda_path = base::FilePath("/usr/share/fonts/opentype/tlwg/Garuda.otf"); |
| 52 if (!gfx::LoadFontIntoFontconfig(garuda_path)) | 54 if (!gfx::LoadFontIntoFontconfig(garuda_path)) |
| 53 return false; | 55 return false; |
| 54 | 56 |
| 55 // We special case these fonts because they're only needed in a few layout | 57 // We special case these fonts because they're only needed in a few layout |
| 56 // tests. | 58 // tests. |
| 57 base::FilePath lohit_path( | 59 base::FilePath lohit_path( |
| 58 "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf"); | 60 "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf"); |
| 59 if (!base::PathExists(lohit_path)) { | 61 if (!base::PathExists(lohit_path)) { |
| 60 lohit_path = base::FilePath( | 62 lohit_path = base::FilePath( |
| 61 "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf"); | 63 "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf"); |
| 62 } | 64 } |
| 63 gfx::LoadFontIntoFontconfig(lohit_path); | 65 gfx::LoadFontIntoFontconfig(lohit_path); |
| 64 | 66 |
| 65 return true; | 67 return true; |
| 66 } | 68 } |
| 67 | 69 |
| 68 } // namespace content | 70 } // namespace content |
| OLD | NEW |