| 137 | } |
| 138 | |
| 139 | base::Ref<FreeTypeFont> FreeTypeFont::LoadFont(ft::Lib& lib, const char* filename, const int height) |
| 140 | { |
| 141 | auto font = base::make_ref<FreeTypeFont>(lib, filename, height); |
| 142 | if (!font->isValid()) |
| 143 | font.reset(); // delete font |
| 144 | return font; |
| 145 | } |
| 146 | |
| 147 | } // namespace text |