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

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: Address review comments Created 5 years, 6 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 bool includeDefault = false;
431 UChar32 upperC = toUpper(c, m_fontDescription.locale(includeDefault) .characters8());
tkent 2015/06/02 22:42:19 Why did you add .characters8()? It's wrong.
431 if (upperC != c) { 432 if (upperC != c) {
432 c = upperC; 433 c = upperC;
433 variant = SmallCapsVariant; 434 variant = SmallCapsVariant;
434 } else { 435 } else {
435 variant = NormalVariant; 436 variant = NormalVariant;
436 } 437 }
437 } else { 438 } else {
438 variant = NormalVariant; 439 variant = NormalVariant;
439 } 440 }
440 } 441 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 { 872 {
872 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 873 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
873 } 874 }
874 875
875 bool Font::isFallbackValid() const 876 bool Font::isFallbackValid() const
876 { 877 {
877 return !m_fontFallbackList || m_fontFallbackList->isValid(); 878 return !m_fontFallbackList || m_fontFallbackList->isValid();
878 } 879 }
879 880
880 } // namespace blink 881 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698