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

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 back TestExpectations change 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 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 UChar32 upperC = toUpper(c); 408 bool includeDefault = false;
409 UChar32 upperC = toUpper(c, m_fontDescription.locale(includeDefault) );
409 if (upperC != c) { 410 if (upperC != c) {
410 c = upperC; 411 c = upperC;
411 variant = SmallCapsVariant; 412 variant = SmallCapsVariant;
412 } else { 413 } else {
413 variant = NormalVariant; 414 variant = NormalVariant;
414 } 415 }
415 } else { 416 } else {
416 variant = NormalVariant; 417 variant = NormalVariant;
417 } 418 }
418 } 419 }
(...skipping 452 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