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

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

Issue 1817633002: Make FreeType usable on Windows. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: add missing file Created 4 years, 9 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 | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontMgr_custom_empty_factory.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 "SkFontDescriptor.h" 8 #include "SkFontDescriptor.h"
9 #include "SkFontHost_FreeType_common.h" 9 #include "SkFontHost_FreeType_common.h"
10 #include "SkFontMgr.h" 10 #include "SkFontMgr.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 addTo->appendTypeface(tf); 499 addTo->appendTypeface(tf);
500 } 500 }
501 } 501 }
502 502
503 const SkEmbeddedResourceHeader* fHeader; 503 const SkEmbeddedResourceHeader* fHeader;
504 }; 504 };
505 505
506 SkFontMgr* SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header) { 506 SkFontMgr* SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header) {
507 return new SkFontMgr_Custom(EmbeddedSystemFontLoader(header)); 507 return new SkFontMgr_Custom(EmbeddedSystemFontLoader(header));
508 } 508 }
509
510 ///////////////////////////////////////////////////////////////////////////////
511
512 class EmptyFontLoader : public SkFontMgr_Custom::SystemFontLoader {
513 public:
514 EmptyFontLoader() { }
515
516 void loadSystemFonts(const SkTypeface_FreeType::Scanner& scanner,
517 SkFontMgr_Custom::Families* families) const override
518 {
519 SkFontStyleSet_Custom* family = new SkFontStyleSet_Custom(SkString());
520 families->push_back().reset(family);
521 family->appendTypeface(new SkTypeface_Empty);
522 }
523
524 };
525
526 SK_API SkFontMgr* SkFontMgr_New_Custom_Empty() {
527 return new SkFontMgr_Custom(EmptyFontLoader());
528 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontMgr_custom_empty_factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698