14 #ifndef RDKIT_DRAWTEXTFT_H
15 #define RDKIT_DRAWTEXTFT_H
20 #include FT_FREETYPE_H
34 const std::string &font_file);
42 const FT_Vector *to) = 0;
44 const FT_Vector *controlTwo,
45 const FT_Vector *to) = 0;
61 std::string font_file_;
62 double x_trans_, y_trans_;
70 void getStringRects(
const std::string &text,
71 std::vector<std::shared_ptr<StringRect>> &rects,
72 std::vector<TextDrawType> &draw_modes,
73 std::vector<char> &draw_chars)
const override;
77 void calcGlyphBBox(
char c, FT_Pos &x_min, FT_Pos &y_min, FT_Pos &x_max,
78 FT_Pos &y_max, FT_Pos &advance)
const;
87 const FT_Vector *to,
void *user);
virtual int LineToFunctionImpl(const FT_Vector *to)=0
virtual double extractOutline()
DrawTextFT(double max_fnt_sz, double min_fnt_sz, const std::string &font_file)
void drawChar(char c, const Point2D &cds) override
virtual int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to)=0
virtual int MoveToFunctionImpl(const FT_Vector *to)=0
void setFontFile(const std::string &font_file) override
double fontCoordToDrawCoord(FT_Pos fc) const
std::string getFontFile() const override
void fontPosToDrawPos(FT_Pos fx, FT_Pos fy, double &dx, double &dy) const
virtual int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to)=0
int conicToFunction(const FT_Vector *control, const FT_Vector *to, void *user)
int cubicToFunction(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to, void *user)
int lineToFunction(const FT_Vector *to, void *user)
int moveToFunction(const FT_Vector *to, void *user)