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

Side by Side Diff: Source/platform/fonts/mac/ComplexTextControllerCoreText.mm

Issue 275913005: Remove usePrinterFont() property of FontDescription (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselinining small caps cases, and subpixel virtual 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // NSFontRenderingMode. 272 // NSFontRenderingMode.
273 RetainPtr<CFStringRef> fontName(AdoptCF, CTFontCopyPostScrip tName(runFont)); 273 RetainPtr<CFStringRef> fontName(AdoptCF, CTFontCopyPostScrip tName(runFont));
274 if (CFEqual(fontName.get(), CFSTR("LastResort"))) { 274 if (CFEqual(fontName.get(), CFSTR("LastResort"))) {
275 m_complexTextRuns.append(ComplexTextRun::create(m_font.p rimaryFont(), cp, stringLocation + runRange.location, runRange.length, m_run.ltr ())); 275 m_complexTextRuns.append(ComplexTextRun::create(m_font.p rimaryFont(), cp, stringLocation + runRange.location, runRange.length, m_run.ltr ()));
276 continue; 276 continue;
277 } 277 }
278 runFontData = FontCache::fontCache()->getFontData(m_font.fon tDescription(), fontName.get(), false, DoNotRetain).get(); 278 runFontData = FontCache::fontCache()->getFontData(m_font.fon tDescription(), fontName.get(), false, DoNotRetain).get();
279 // Core Text may have used a font that is not known to NSFon tManager. In that case, fall back on 279 // Core Text may have used a font that is not known to NSFon tManager. In that case, fall back on
280 // using the font as returned, even though it may not have t he best NSFontRenderingMode. 280 // using the font as returned, even though it may not have t he best NSFontRenderingMode.
281 if (!runFontData) { 281 if (!runFontData) {
282 FontPlatformData runFontPlatformData((NSFont *)runFont, CTFontGetSize(runFont), m_font.fontDescription().usePrinterFont()); 282 FontPlatformData runFontPlatformData((NSFont *)runFont, CTFontGetSize(runFont));
283 runFontData = FontCache::fontCache()->fontDataFromFontPl atformData(&runFontPlatformData, DoNotRetain).get(); 283 runFontData = FontCache::fontCache()->fontDataFromFontPl atformData(&runFontPlatformData, DoNotRetain).get();
284 } 284 }
285 } 285 }
286 if (m_fallbackFonts && runFontData != m_font.primaryFont()) 286 if (m_fallbackFonts && runFontData != m_font.primaryFont())
287 m_fallbackFonts->add(runFontData); 287 m_fallbackFonts->add(runFontData);
288 } 288 }
289 } 289 }
290 if (m_fallbackFonts && runFontData != m_font.primaryFont()) 290 if (m_fallbackFonts && runFontData != m_font.primaryFont())
291 m_fallbackFonts->add(fontData); 291 m_fallbackFonts->add(fontData);
292 292
293 m_complexTextRuns.append(ComplexTextRun::create(ctRun, runFontData, cp, stringLocation, length, runRange)); 293 m_complexTextRuns.append(ComplexTextRun::create(ctRun, runFontData, cp, stringLocation, length, runRange));
294 } 294 }
295 } 295 }
296 296
297 } // namespace WebCore 297 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/mac/ComplexTextController.cpp ('k') | Source/platform/fonts/mac/FontCacheMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698