Commit eae454fe authored by Dominik Röttsches's avatar Dominik Röttsches Committed by Commit Bot

Address additional review comments in font_fallback_linux.cc

Tbr: asvitkine
Bug: 785517
Change-Id: I406718042e7ee595a5597a80ebc8e8250f139a7e
Reviewed-on: https://chromium-review.googlesource.com/784932Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518603}
parent 678d7225
......@@ -19,15 +19,15 @@ namespace gfx {
namespace {
const char kFontFormatTrueType[] = "TrueType";
const char kFontFormatCFF[] = "CFF";
typedef std::map<std::string, std::vector<Font> > FallbackCache;
base::LazyInstance<FallbackCache>::Leaky g_fallback_cache =
LAZY_INSTANCE_INITIALIZER;
} // namespace
const char* kFontFormatTrueType = "TrueType";
const char* kFontFormatCFF = "CFF";
std::vector<Font> GetFallbackFonts(const Font& font) {
std::string font_family = font.GetFontName();
std::vector<Font>* fallback_fonts =
......@@ -218,8 +218,9 @@ class CachedFontSet {
// Take only supported font formats on board.
FcChar8* font_format;
if (FcPatternGetString(pattern, FC_FONTFORMAT, 0, &font_format) !=
FcResultMatch)
FcResultMatch) {
continue;
}
if (font_format &&
strcmp(reinterpret_cast<char*>(font_format), kFontFormatTrueType) &&
strcmp(reinterpret_cast<char*>(font_format), kFontFormatCFF)) {
......
// Copyright 2015 The Chromium Authors. All rights reserved.
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......
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