77#include  < cstdio> 
88#include  < iterator> 
99#include  < set> 
10- #include  < sstream> 
1110#include  < stdexcept> 
1211#include  < string> 
1312#include  < vector> 
@@ -207,20 +206,14 @@ FT2Font::get_path(std::vector<double> &vertices, std::vector<unsigned char> &cod
207206    codes.push_back (CLOSEPOLY);
208207}
209208
210- FT2Font::FT2Font (FT_Open_Args &open_args,
211-                  long  hinting_factor_,
212-                  std::vector<FT2Font *> &fallback_list,
209+ FT2Font::FT2Font (long  hinting_factor_, std::vector<FT2Font *> &fallback_list,
213210                 FT2Font::WarnFunc warn, bool  warn_if_used)
214211    : ft_glyph_warn(warn), warn_if_used(warn_if_used), image({1 , 1 }), face(nullptr ),
215212      hinting_factor(hinting_factor_),
216213      //  set default kerning factor to 0, i.e., no kerning manipulation
217214      kerning_factor(0 )
218215{
219216    clear ();
220-     FT_CHECK (FT_Open_Face, _ft2Library, &open_args, 0 , &face);
221-     if  (open_args.stream  != nullptr ) {
222-         face->face_flags  |= FT_FACE_FLAG_EXTERNAL_STREAM;
223-     }
224217    //  Set fallbacks
225218    std::copy (fallback_list.begin (), fallback_list.end (), std::back_inserter (fallbacks));
226219}
@@ -236,6 +229,14 @@ FT2Font::~FT2Font()
236229    }
237230}
238231
232+ void  FT2Font::open (FT_Open_Args &open_args)
233+ {
234+     FT_CHECK (FT_Open_Face, _ft2Library, &open_args, 0 , &face);
235+     if  (open_args.stream  != nullptr ) {
236+         face->face_flags  |= FT_FACE_FLAG_EXTERNAL_STREAM;
237+     }
238+ }
239+ 
239240void  FT2Font::clear ()
240241{
241242    pen.x  = pen.y  = 0 ;
0 commit comments