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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp

Issue 1932593002: Remove out of date comment in SimpleFontData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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) 2005, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Alexey Proskuryakov 3 * Copyright (C) 2006 Alexey Proskuryakov
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 m_platformData.setupPaint(&paint); 97 m_platformData.setupPaint(&paint);
98 paint.getFontMetrics(&metrics); 98 paint.getFontMetrics(&metrics);
99 SkTypeface* face = paint.getTypeface(); 99 SkTypeface* face = paint.getTypeface();
100 ASSERT(face); 100 ASSERT(face);
101 101
102 int vdmxAscent = 0, vdmxDescent = 0; 102 int vdmxAscent = 0, vdmxDescent = 0;
103 bool isVDMXValid = false; 103 bool isVDMXValid = false;
104 104
105 #if OS(LINUX) || OS(ANDROID) 105 #if OS(LINUX) || OS(ANDROID)
106 // Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType. 106 // Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType.
107 // With GDI, the metrics will already have taken this into account (as neede d).
108 // With DirectWrite or CoreText, no bytecode hinting is ever done. 107 // With DirectWrite or CoreText, no bytecode hinting is ever done.
109 // This code should be pushed into FreeType (hinted font metrics). 108 // This code should be pushed into FreeType (hinted font metrics).
110 static const uint32_t vdmxTag = SkSetFourByteTag('V', 'D', 'M', 'X'); 109 static const uint32_t vdmxTag = SkSetFourByteTag('V', 'D', 'M', 'X');
111 int pixelSize = m_platformData.size() + 0.5; 110 int pixelSize = m_platformData.size() + 0.5;
112 if (!paint.isAutohinted() 111 if (!paint.isAutohinted()
113 && (paint.getHinting() == SkPaint::kFull_Hinting 112 && (paint.getHinting() == SkPaint::kFull_Hinting
114 || paint.getHinting() == SkPaint::kNormal_Hinting)) 113 || paint.getHinting() == SkPaint::kNormal_Hinting))
115 { 114 {
116 size_t vdmxSize = face->getTableSize(vdmxTag); 115 size_t vdmxSize = face->getTableSize(vdmxTag);
117 if (vdmxSize && vdmxSize < maxVDMXTableSize) { 116 if (vdmxSize && vdmxSize < maxVDMXTableSize) {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 if (glyphs[i]) { 446 if (glyphs[i]) {
448 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); 447 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
449 haveGlyphs = true; 448 haveGlyphs = true;
450 } 449 }
451 } 450 }
452 451
453 return haveGlyphs; 452 return haveGlyphs;
454 } 453 }
455 454
456 } // namespace blink 455 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698