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

Side by Side Diff: Source/platform/fonts/mac/ComplexTextController.cpp

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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 unsigned glyphCount = complexTextRun.glyphCount(); 518 unsigned glyphCount = complexTextRun.glyphCount();
519 const SimpleFontData* fontData = complexTextRun.fontData(); 519 const SimpleFontData* fontData = complexTextRun.fontData();
520 520
521 if (!complexTextRun.isLTR()) 521 if (!complexTextRun.isLTR())
522 m_isLTROnly = false; 522 m_isLTROnly = false;
523 523
524 const CGGlyph* glyphs = complexTextRun.glyphs(); 524 const CGGlyph* glyphs = complexTextRun.glyphs();
525 const CGSize* advances = complexTextRun.advances(); 525 const CGSize* advances = complexTextRun.advances();
526 526
527 bool lastRun = r + 1 == runCount; 527 bool lastRun = r + 1 == runCount;
528 bool roundsAdvances = !m_font.fontDescription().usePrinterFont() && font Data->platformData().roundsGlyphAdvances(); 528 bool roundsAdvances = fontData->platformData().roundsGlyphAdvances();
529 float spaceWidth = fontData->spaceWidth() - fontData->syntheticBoldOffse t(); 529 float spaceWidth = fontData->spaceWidth() - fontData->syntheticBoldOffse t();
530 CGFloat roundedSpaceWidth = roundCGFloat(spaceWidth); 530 CGFloat roundedSpaceWidth = roundCGFloat(spaceWidth);
531 const UChar* cp = complexTextRun.characters(); 531 const UChar* cp = complexTextRun.characters();
532 CGPoint glyphOrigin = CGPointZero; 532 CGPoint glyphOrigin = CGPointZero;
533 CFIndex lastCharacterIndex = m_run.ltr() ? numeric_limits<CFIndex>::min( ) : numeric_limits<CFIndex>::max(); 533 CFIndex lastCharacterIndex = m_run.ltr() ? numeric_limits<CFIndex>::min( ) : numeric_limits<CFIndex>::max();
534 bool isMonotonic = true; 534 bool isMonotonic = true;
535 535
536 for (unsigned i = 0; i < glyphCount; i++) { 536 for (unsigned i = 0; i < glyphCount; i++) {
537 CFIndex characterIndex = complexTextRun.indexAt(i); 537 CFIndex characterIndex = complexTextRun.indexAt(i);
538 if (m_run.ltr()) { 538 if (m_run.ltr()) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 660
661 lastCharacterIndex = characterIndex; 661 lastCharacterIndex = characterIndex;
662 } 662 }
663 if (!isMonotonic) 663 if (!isMonotonic)
664 complexTextRun.setIsNonMonotonic(); 664 complexTextRun.setIsNonMonotonic();
665 } 665 }
666 m_totalWidth += widthSinceLastCommit; 666 m_totalWidth += widthSinceLastCommit;
667 } 667 }
668 668
669 } // namespace WebCore 669 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm ('k') | Source/platform/fonts/mac/ComplexTextControllerCoreText.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698