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

Side by Side Diff: sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp

Issue 1241673004: Minor sky/engine updates for Mac target (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove file added as a result of a bad merge Created 5 years, 5 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 | « sky/engine/platform/fonts/skia/FontCacheSkia.cpp ('k') | 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) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 SkPaint::FontMetrics metrics; 60 SkPaint::FontMetrics metrics;
61 61
62 m_platformData.setupPaint(&paint); 62 m_platformData.setupPaint(&paint);
63 paint.getFontMetrics(&metrics); 63 paint.getFontMetrics(&metrics);
64 SkTypeface* face = paint.getTypeface(); 64 SkTypeface* face = paint.getTypeface();
65 ASSERT(face); 65 ASSERT(face);
66 66
67 int vdmxAscent = 0, vdmxDescent = 0; 67 int vdmxAscent = 0, vdmxDescent = 0;
68 bool isVDMXValid = false; 68 bool isVDMXValid = false;
69 69
70 #if OS(LINUX) || OS(ANDROID) || OS(IOS) 70 #if OS(LINUX) || OS(ANDROID) || OS(IOS) || OS(MACOSX)
71 // Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType. 71 // Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType.
72 // With GDI, the metrics will already have taken this into account (as neede d). 72 // With GDI, the metrics will already have taken this into account (as neede d).
73 // With DirectWrite or CoreText, no bytecode hinting is ever done. 73 // With DirectWrite or CoreText, no bytecode hinting is ever done.
74 // This code should be pushed into FreeType (hinted font metrics). 74 // This code should be pushed into FreeType (hinted font metrics).
75 static const uint32_t vdmxTag = SkSetFourByteTag('V', 'D', 'M', 'X'); 75 static const uint32_t vdmxTag = SkSetFourByteTag('V', 'D', 'M', 'X');
76 int pixelSize = m_platformData.size() + 0.5; 76 int pixelSize = m_platformData.size() + 0.5;
77 if (!paint.isAutohinted() 77 if (!paint.isAutohinted()
78 && (paint.getHinting() == SkPaint::kFull_Hinting 78 && (paint.getHinting() == SkPaint::kFull_Hinting
79 || paint.getHinting() == SkPaint::kNormal_Hinting)) 79 || paint.getHinting() == SkPaint::kNormal_Hinting))
80 { 80 {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 if (glyphs[i]) { 292 if (glyphs[i]) {
293 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); 293 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
294 haveGlyphs = true; 294 haveGlyphs = true;
295 } 295 }
296 } 296 }
297 297
298 return haveGlyphs; 298 return haveGlyphs;
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/platform/fonts/skia/FontCacheSkia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698