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

Side by Side Diff: Source/platform/fonts/Font.cpp

Issue 1135003004: Make small-caps work correctly with tr locale (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add boolean param Created 5 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 420 }
421 return data; 421 return data;
422 } 422 }
423 423
424 GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa ce, FontDataVariant variant) const 424 GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa ce, FontDataVariant variant) const
425 { 425 {
426 ASSERT(isMainThread()); 426 ASSERT(isMainThread());
427 427
428 if (variant == AutoVariant) { 428 if (variant == AutoVariant) {
429 if (m_fontDescription.variant() == FontVariantSmallCaps) { 429 if (m_fontDescription.variant() == FontVariantSmallCaps) {
430 UChar32 upperC = toUpper(c); 430 UChar32 upperC = toUpper(c, m_fontDescription.locale(false));
eae 2015/05/27 15:57:18 bool includeDefault = false; UChar32 upperC = toUp
431 if (upperC != c) { 431 if (upperC != c) {
432 c = upperC; 432 c = upperC;
433 variant = SmallCapsVariant; 433 variant = SmallCapsVariant;
434 } else { 434 } else {
435 variant = NormalVariant; 435 variant = NormalVariant;
436 } 436 }
437 } else { 437 } else {
438 variant = NormalVariant; 438 variant = NormalVariant;
439 } 439 }
440 } 440 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 { 871 {
872 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 872 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
873 } 873 }
874 874
875 bool Font::isFallbackValid() const 875 bool Font::isFallbackValid() const
876 { 876 {
877 return !m_fontFallbackList || m_fontFallbackList->isValid(); 877 return !m_fontFallbackList || m_fontFallbackList->isValid();
878 } 878 }
879 879
880 } // namespace blink 880 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698