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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.h

Issue 2858573002: Use FreeType for OpenType Variations on CoreText < 10.12 (Closed)
Patch Set: Use FreeType for OpenType Variations on CoreText < 10.12 Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #endif 103 #endif
104 FontPlatformData(sk_sp<SkTypeface>, 104 FontPlatformData(sk_sp<SkTypeface>,
105 const char* name, 105 const char* name,
106 float text_size, 106 float text_size,
107 bool synthetic_bold, 107 bool synthetic_bold,
108 bool synthetic_italic, 108 bool synthetic_italic,
109 FontOrientation = FontOrientation::kHorizontal); 109 FontOrientation = FontOrientation::kHorizontal);
110 ~FontPlatformData(); 110 ~FontPlatformData();
111 111
112 #if OS(MACOSX) 112 #if OS(MACOSX)
113 // These methods return a nullptr for FreeType backed SkTypefaces, compare
114 // FontCustomPlatformData, which are used for variable fonts on Mac OS <
115 // 10.12. They should not return nullptr otherwise. So they allow
116 // distinguishing which backend the SkTypeface is using.
113 CTFontRef CtFont() const; 117 CTFontRef CtFont() const;
114 CGFontRef CgFont() const; 118 CGFontRef CgFont() const;
115 #endif 119 #endif
116 120
117 String FontFamilyName() const; 121 String FontFamilyName() const;
118 float size() const { return text_size_; } 122 float size() const { return text_size_; }
119 bool SyntheticBold() const { return synthetic_bold_; } 123 bool SyntheticBold() const { return synthetic_bold_; }
120 bool SyntheticItalic() const { return synthetic_italic_; } 124 bool SyntheticItalic() const { return synthetic_italic_; }
121 125
122 SkTypeface* Typeface() const; 126 SkTypeface* Typeface() const;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 mutable RefPtr<HarfBuzzFace> harf_buzz_face_; 188 mutable RefPtr<HarfBuzzFace> harf_buzz_face_;
185 bool is_hash_table_deleted_value_; 189 bool is_hash_table_deleted_value_;
186 #if OS(WIN) 190 #if OS(WIN)
187 int paint_text_flags_; 191 int paint_text_flags_;
188 #endif 192 #endif
189 }; 193 };
190 194
191 } // namespace blink 195 } // namespace blink
192 196
193 #endif // ifdef FontPlatformData_h 197 #endif // ifdef FontPlatformData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698