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

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

Issue 270813003: Reland r172943 "Make CSSFontFace::willUseFontData() load fonts with unicode-range" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/fonts/Font.h ('k') | Source/platform/fonts/FontSelector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(UChar32 character) 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(), character);
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 if (delta <= 0) 830 if (delta <= 0)
831 break; 831 break;
832 } 832 }
833 } 833 }
834 } 834 }
835 835
836 return offset; 836 return offset;
837 } 837 }
838 838
839 } 839 }
OLDNEW
« no previous file with comments | « Source/platform/fonts/Font.h ('k') | Source/platform/fonts/FontSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698