| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |