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

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

Issue 1155543007: Revert 196325 "Make small-caps work correctly with tr locale" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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 | Annotate | Revision Log
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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 return data; 399 return data;
400 } 400 }
401 401
402 GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa ce, FontDataVariant variant) const 402 GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa ce, FontDataVariant variant) const
403 { 403 {
404 ASSERT(isMainThread()); 404 ASSERT(isMainThread());
405 405
406 if (variant == AutoVariant) { 406 if (variant == AutoVariant) {
407 if (m_fontDescription.variant() == FontVariantSmallCaps) { 407 if (m_fontDescription.variant() == FontVariantSmallCaps) {
408 bool includeDefault = false; 408 UChar32 upperC = toUpper(c);
409 UChar32 upperC = toUpper(c, m_fontDescription.locale(includeDefault) .characters8());
410 if (upperC != c) { 409 if (upperC != c) {
411 c = upperC; 410 c = upperC;
412 variant = SmallCapsVariant; 411 variant = SmallCapsVariant;
413 } else { 412 } else {
414 variant = NormalVariant; 413 variant = NormalVariant;
415 } 414 }
416 } else { 415 } else {
417 variant = NormalVariant; 416 variant = NormalVariant;
418 } 417 }
419 } 418 }
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 { 871 {
873 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 872 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
874 } 873 }
875 874
876 bool Font::isFallbackValid() const 875 bool Font::isFallbackValid() const
877 { 876 {
878 return !m_fontFallbackList || m_fontFallbackList->isValid(); 877 return !m_fontFallbackList || m_fontFallbackList->isValid();
879 } 878 }
880 879
881 } // namespace blink 880 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698