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

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

Issue 248473005: Make CSSFontFace::willUseFontData() load fonts with unicode-range (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (!run.characterScanForCodePath()) 238 if (!run.characterScanForCodePath())
239 return SimplePath; 239 return SimplePath;
240 240
241 if (run.is8Bit()) 241 if (run.is8Bit())
242 return SimplePath; 242 return SimplePath;
243 243
244 // Start from 0 since drawing and highlighting also measure the characters b efore run->from. 244 // Start from 0 since drawing and highlighting also measure the characters b efore run->from.
245 return Character::characterRangeCodePath(run.characters16(), run.length()); 245 return Character::characterRangeCodePath(run.characters16(), run.length());
246 } 246 }
247 247
248 void Font::willUseFontData() const 248 void Font::willUseFontData(const String& text) const
249 { 249 {
250 const FontFamily& family = fontDescription().family(); 250 const FontFamily& family = fontDescription().family();
251 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami lyIsEmpty()) 251 if (m_fontFallbackList && m_fontFallbackList->fontSelector() && !family.fami lyIsEmpty())
252 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f amily.family()); 252 m_fontFallbackList->fontSelector()->willUseFontData(fontDescription(), f amily.family(), text);
253 } 253 }
254 254
255 static inline bool isInRange(UChar32 character, UChar32 lowerBound, UChar32 uppe rBound) 255 static inline bool isInRange(UChar32 character, UChar32 lowerBound, UChar32 uppe rBound)
256 { 256 {
257 return character >= lowerBound && character <= upperBound; 257 return character >= lowerBound && character <= upperBound;
258 } 258 }
259 259
260 static bool shouldIgnoreRotation(UChar32 character) 260 static bool shouldIgnoreRotation(UChar32 character)
261 { 261 {
262 if (character == 0x000A7 || character == 0x000A9 || character == 0x000AE) 262 if (character == 0x000A7 || character == 0x000A9 || character == 0x000AE)
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 if (delta <= 0) 825 if (delta <= 0)
826 break; 826 break;
827 } 827 }
828 } 828 }
829 } 829 }
830 830
831 return offset; 831 return offset;
832 } 832 }
833 833
834 } 834 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698