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

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

Issue 542653002: Merge FontPlatformDataHarfBuzz and FontPlatformData headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mergePlatformData
Patch Set: Argument name incorrect Created 6 years, 3 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) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 bool FontPlatformFeatures::canExpandAroundIdeographsInComplexText() 52 bool FontPlatformFeatures::canExpandAroundIdeographsInComplexText()
53 { 53 {
54 return true; 54 return true;
55 } 55 }
56 56
57 static void setupPaint(SkPaint* paint, const SimpleFontData* fontData, const Fon t* font, bool shouldAntialias, bool shouldSmoothFonts) 57 static void setupPaint(SkPaint* paint, const SimpleFontData* fontData, const Fon t* font, bool shouldAntialias, bool shouldSmoothFonts)
58 { 58 {
59 const FontPlatformData& platformData = fontData->platformData(); 59 const FontPlatformData& platformData = fontData->platformData();
60 const float textSize = platformData.m_size >= 0 ? platformData.m_size : 12; 60 const float textSize = platformData.m_textSize >= 0 ? platformData.m_textSiz e : 12;
61 61
62 paint->setAntiAlias(shouldAntialias); 62 paint->setAntiAlias(shouldAntialias);
63 paint->setEmbeddedBitmapText(false); 63 paint->setEmbeddedBitmapText(false);
64 paint->setTextSize(SkFloatToScalar(textSize)); 64 paint->setTextSize(SkFloatToScalar(textSize));
65 paint->setVerticalText(platformData.orientation() == Vertical); 65 paint->setVerticalText(platformData.orientation() == Vertical);
66 paint->setTypeface(platformData.typeface()); 66 paint->setTypeface(platformData.typeface());
67 paint->setFakeBoldText(platformData.m_syntheticBold); 67 paint->setFakeBoldText(platformData.m_syntheticBold);
68 paint->setTextSkewX(platformData.m_syntheticOblique ? -SK_Scalar1 / 4 : 0); 68 paint->setTextSkewX(platformData.m_syntheticItalic ? -SK_Scalar1 / 4 : 0);
69 paint->setAutohinted(false); // freetype specific 69 paint->setAutohinted(false); // freetype specific
70 paint->setLCDRenderText(shouldSmoothFonts); 70 paint->setLCDRenderText(shouldSmoothFonts);
71 paint->setSubpixelText(true); 71 paint->setSubpixelText(true);
72 72
73 // When using CoreGraphics, disable hinting when webkit-font-smoothing:antia liased is used. 73 // When using CoreGraphics, disable hinting when webkit-font-smoothing:antia liased is used.
74 // See crbug.com/152304 74 // See crbug.com/152304
75 if (font->fontDescription().fontSmoothing() == Antialiased || font->fontDesc ription().textRendering() == GeometricPrecision) 75 if (font->fontDescription().fontSmoothing() == Antialiased || font->fontDesc ription().textRendering() == GeometricPrecision)
76 paint->setHinting(SkPaint::kNo_Hinting); 76 paint->setHinting(SkPaint::kNo_Hinting);
77 } 77 }
78 78
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // FIXME: Add text blob support to FontMac. 177 // FIXME: Add text blob support to FontMac.
178 } 178 }
179 179
180 PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia lAdvance, const FloatRect& bounds) const 180 PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia lAdvance, const FloatRect& bounds) const
181 { 181 {
182 // FIXME: Add text blob support to FontMac. 182 // FIXME: Add text blob support to FontMac.
183 return nullptr; 183 return nullptr;
184 } 184 }
185 185
186 } // namespace blink 186 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/mac/FontCacheMac.mm ('k') | Source/platform/fonts/mac/SimpleFontDataMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698