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

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 14884010: Mask orientation and layout correctly. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Our mac port doesn't support vertical or bgr either. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkDeviceProperties.h ('k') | src/ports/SkFontHost_win.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include <vector> 9 #include <vector>
10 #ifdef SK_BUILD_FOR_MAC 10 #ifdef SK_BUILD_FOR_MAC
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 memcpy(dstData, CFDataGetBytePtr(srcData) + offset, length); 1825 memcpy(dstData, CFDataGetBytePtr(srcData) + offset, length);
1826 } 1826 }
1827 return length; 1827 return length;
1828 } 1828 }
1829 1829
1830 SkScalerContext* SkTypeface_Mac::onCreateScalerContext(const SkDescriptor* desc) const { 1830 SkScalerContext* SkTypeface_Mac::onCreateScalerContext(const SkDescriptor* desc) const {
1831 return new SkScalerContext_Mac(const_cast<SkTypeface_Mac*>(this), desc); 1831 return new SkScalerContext_Mac(const_cast<SkTypeface_Mac*>(this), desc);
1832 } 1832 }
1833 1833
1834 void SkTypeface_Mac::onFilterRec(SkScalerContextRec* rec) const { 1834 void SkTypeface_Mac::onFilterRec(SkScalerContextRec* rec) const {
1835 unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag | 1835 if (rec->fFlags & SkScalerContext::kLCD_BGROrder_Flag ||
1836 SkScalerContext::kAutohinting_Flag; 1836 rec->fFlags & SkScalerContext::kLCD_Vertical_Flag)
1837 {
1838 rec->fMaskFormat = SkMask::kA8_Format;
1839 rec->setHinting(SkPaint::kNormal_Hinting);
reed1 2013/05/06 18:02:12 why do we explicitly set hinting in this case?
bungeman-skia 2013/05/06 18:16:10 Added comment. The issue is that LCD no-hinting me
1840 }
1841
1842 unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag |
1843 SkScalerContext::kAutohinting_Flag |
1844 SkScalerContext::kLCD_BGROrder_Flag |
1845 SkScalerContext::kLCD_Vertical_Flag;
1837 1846
1838 rec->fFlags &= ~flagsWeDontSupport; 1847 rec->fFlags &= ~flagsWeDontSupport;
1839 1848
1840 bool lcdSupport = supports_LCD(); 1849 bool lcdSupport = supports_LCD();
1841 1850
1842 // Only two levels of hinting are supported. 1851 // Only two levels of hinting are supported.
1843 // kNo_Hinting means avoid CoreGraphics outline dilation. 1852 // kNo_Hinting means avoid CoreGraphics outline dilation.
1844 // kNormal_Hinting means CoreGraphics outline dilation is allowed. 1853 // kNormal_Hinting means CoreGraphics outline dilation is allowed.
1845 // If there is no lcd support, hinting (dilation) cannot be supported. 1854 // If there is no lcd support, hinting (dilation) cannot be supported.
1846 SkPaint::Hinting hinting = rec->getHinting(); 1855 SkPaint::Hinting hinting = rec->getHinting();
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 return NULL; 2217 return NULL;
2209 } 2218 }
2210 return create_from_dataProvider(pr); 2219 return create_from_dataProvider(pr);
2211 } 2220 }
2212 }; 2221 };
2213 2222
2214 SkFontMgr* SkFontMgr::Factory() { 2223 SkFontMgr* SkFontMgr::Factory() {
2215 return SkNEW(SkFontMgr_Mac); 2224 return SkNEW(SkFontMgr_Mac);
2216 } 2225 }
2217 #endif 2226 #endif
OLDNEW
« no previous file with comments | « include/core/SkDeviceProperties.h ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698