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

Side by Side Diff: skia/ext/SkFontHost_fontconfig_direct.cpp

Issue 3145014: Include ICU headers in a way that will also work with use_system_icu=1 (Closed)
Patch Set: rebase Created 10 years, 4 months 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 | « chrome/renderer/spellchecker/spellcheck_worditerator.cc ('k') | 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 /* libs/graphics/ports/SkFontHost_fontconfig_direct.cpp 1 /* libs/graphics/ports/SkFontHost_fontconfig_direct.cpp
2 ** 2 **
3 ** Copyright 2009, Google Inc. 3 ** Copyright 2009, Google Inc.
4 ** 4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License"); 5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License. 6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at 7 ** You may obtain a copy of the License at
8 ** 8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0 9 ** http://www.apache.org/licenses/LICENSE-2.0
10 ** 10 **
11 ** Unless required by applicable law or agreed to in writing, software 11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS, 12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and 14 ** See the License for the specific language governing permissions and
15 ** limitations under the License. 15 ** limitations under the License.
16 */ 16 */
17 17
18 #include "SkFontHost_fontconfig_direct.h" 18 #include "SkFontHost_fontconfig_direct.h"
19 19
20 #include <unistd.h> 20 #include <unistd.h>
21 #include <fcntl.h> 21 #include <fcntl.h>
22 22
23 #include <fontconfig/fontconfig.h> 23 #include <fontconfig/fontconfig.h>
24 24
25 #include "third_party/icu/public/common/unicode/utf16.h" 25 #include "unicode/utf16.h"
26 26
27 namespace { 27 namespace {
28 28
29 // Equivalence classes, used to match the Liberation and Ascender fonts 29 // Equivalence classes, used to match the Liberation and Ascender fonts
30 // with their metric-compatible replacements. See the discussion in 30 // with their metric-compatible replacements. See the discussion in
31 // GetFontEquivClass(). 31 // GetFontEquivClass().
32 enum FontEquivClass 32 enum FontEquivClass
33 { 33 {
34 OTHER, 34 OTHER,
35 SANS, 35 SANS,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 int FontConfigDirect::Open(unsigned filefaceid) { 362 int FontConfigDirect::Open(unsigned filefaceid) {
363 SkAutoMutexAcquire ac(mutex_); 363 SkAutoMutexAcquire ac(mutex_);
364 const std::map<unsigned, std::string>::const_iterator 364 const std::map<unsigned, std::string>::const_iterator
365 i = fileid_to_filename_.find(FileFaceIdToFileId(filefaceid)); 365 i = fileid_to_filename_.find(FileFaceIdToFileId(filefaceid));
366 if (i == fileid_to_filename_.end()) 366 if (i == fileid_to_filename_.end())
367 return -1; 367 return -1;
368 368
369 return open(i->second.c_str(), O_RDONLY); 369 return open(i->second.c_str(), O_RDONLY);
370 } 370 }
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_worditerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698