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

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

Issue 1438113002: Factor CSS3 matching rules. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Tests can use C++11. Created 5 years, 1 month 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 | « src/fonts/SkFontMgr_indirect.cpp ('k') | tests/FontMgrTest.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 SkASSERT(sizeof(TCHAR) == sizeof(ref.elfStyle[0])); 2405 SkASSERT(sizeof(TCHAR) == sizeof(ref.elfStyle[0]));
2406 tchar_to_skstring((const TCHAR*)ref.elfStyle, styleName); 2406 tchar_to_skstring((const TCHAR*)ref.elfStyle, styleName);
2407 } 2407 }
2408 } 2408 }
2409 2409
2410 SkTypeface* createTypeface(int index) override { 2410 SkTypeface* createTypeface(int index) override {
2411 return SkCreateTypefaceFromLOGFONT(fArray[index].elfLogFont); 2411 return SkCreateTypefaceFromLOGFONT(fArray[index].elfLogFont);
2412 } 2412 }
2413 2413
2414 SkTypeface* matchStyle(const SkFontStyle& pattern) override { 2414 SkTypeface* matchStyle(const SkFontStyle& pattern) override {
2415 // todo: 2415 return this->matchStyleCSS3(pattern);
2416 return SkCreateTypefaceFromLOGFONT(fArray[0].elfLogFont);
2417 } 2416 }
2418 2417
2419 private: 2418 private:
2420 SkTDArray<ENUMLOGFONTEX> fArray; 2419 SkTDArray<ENUMLOGFONTEX> fArray;
2421 }; 2420 };
2422 2421
2423 class SkFontMgrGDI : public SkFontMgr { 2422 class SkFontMgrGDI : public SkFontMgr {
2424 public: 2423 public:
2425 SkFontMgrGDI() { 2424 SkFontMgrGDI() {
2426 LOGFONT lf; 2425 LOGFONT lf;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 2508
2510 private: 2509 private:
2511 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2512 }; 2511 };
2513 2512
2514 /////////////////////////////////////////////////////////////////////////////// 2513 ///////////////////////////////////////////////////////////////////////////////
2515 2514
2516 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } 2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; }
2517 2516
2518 #endif//defined(SK_BUILD_FOR_WIN32) 2517 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/fonts/SkFontMgr_indirect.cpp ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698