14 #ifndef RDKIT_DRAWTEXTFT_H
15 #define RDKIT_DRAWTEXTFT_H
20 #include FT_FREETYPE_H
35 const std::string &font_file);
43 const FT_Vector *to) = 0;
45 const FT_Vector *controlTwo,
46 const FT_Vector *to) = 0;
62 std::string font_file_;
63 double x_trans_, y_trans_;
71 void getStringRects(
const std::string &text,
72 std::vector<std::shared_ptr<StringRect>> &rects,
73 std::vector<TextDrawType> &draw_modes,
74 std::vector<char> &draw_chars)
const override;
78 void calcGlyphBBox(
char c, FT_Pos &x_min, FT_Pos &y_min, FT_Pos &x_max,
79 FT_Pos &y_max, FT_Pos &advance)
const;
88 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
#define RDKIT_MOLDRAW2D_EXPORT
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)