Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: content/shell/app/blink_test_platform_support_linux.cc

Issue 749293002: Update location for Garuda font in Ubuntu 14.10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698